Import Upstream version 0.69.0
[hcoop/debian/courier-authlib.git] / courier-authlib.spec
index ca551a1..3312d99 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright 1998 - 2010 Double Precision, Inc.  See COPYING for
+# Copyright 1998 - 2017 Double Precision, Inc.  See COPYING for
 # distribution information.
 
 # No dist tag from mock; detect mandrake, redhat, etc. the old fashioned way
@@ -14,7 +14,7 @@
 ################################################################################
 
 Name:           courier-authlib
-Version:        0.66.4
+Version:        0.69.0
 Release:        1%{?dist}%{?courier_release}
 Summary:        Courier authentication library
 
@@ -24,7 +24,7 @@ URL:            http://www.courier-mta.org
 
 ################################################################################
 
-Source:         http://dl.sourceforge.net/courier/%{name}-%{version}.tar.bz2
+Source:         http://downloads.sourceforge.net/courier/%{name}-%{version}.tar.bz2
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
@@ -45,6 +45,7 @@ BuildRequires:      %{_includedir}/ltdl.h
 
 %if 0%(rpm -q redhat-release >/dev/null 2>&1 || rpm -q fedora-release >/dev/null 2>&1 || exit 0; echo "1")
 BuildRequires:      redhat-rpm-config
+BuildRequires:      /usr/bin/ps
 %endif
 
 %if %using_systemd
@@ -56,6 +57,12 @@ Requires(post):     /sbin/chkconfig
 Requires(preun):    /sbin/chkconfig
 %endif
 
+%define need_perl_generators %(if rpm -q fedora-release >/dev/null 2>/dev/null; then echo "1"; exit 0; fi; echo "1"; exit 1)
+
+%if %need_perl_generators
+BuildRequires: perl-generators
+%endif
+
 ################################################################################
 
 %description
@@ -277,16 +284,15 @@ then
         /bin/systemctl stop courier-authlib.service || :
 fi
 %systemd_post courier-authlib.service
+if [ $1 -eq 1 ]
+then
+    /bin/systemctl daemon-reload >/dev/null 2>&1 || :
+fi
 %else
 /sbin/chkconfig --del courier-authlib
 /sbin/chkconfig --add courier-authlib
 %endif
 %preun
-if test -x %{_sbindir}/authdaemond
-then
-       %{_sbindir}/authdaemond stop >/dev/null 2>&1 || /bin/true
-fi
-
 if test "$1" = "0"
 then
 %if %using_systemd
@@ -298,6 +304,10 @@ fi
 
 %postun
 %if %using_systemd
+if [ $1 -eq 0 ]
+then
+    /bin/systemctl daemon-reload
+fi
 %systemd_postun_with_restart courier-authlib.service
 %endif
 
@@ -354,4 +364,3 @@ rm -rf $RPM_BUILD_ROOT
 
 * Sun Oct  3 2004 Mr. Sam <sam@email-scan.com>                          0.50-1
 - Initial build.
-