X-Git-Url: http://git.hcoop.net/hcoop/debian/courier-authlib.git/blobdiff_plain/d50284c4aa46bdb558ab92276d4e3ebd856fe9a6..HEAD:/courier-authlib.spec.in diff --git a/courier-authlib.spec.in b/courier-authlib.spec.in index f2933bd..508c4d3 100644 --- a/courier-authlib.spec.in +++ b/courier-authlib.spec.in @@ -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 @@ -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 0.50-1 - Initial build. -