summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2015-03-05 15:56:01 -0500
committerAdam Jackson <ajax@redhat.com>2015-03-05 15:56:01 -0500
commit50bd122ede5be7b89e10195ba538fb57b544bd7d (patch)
tree9c8e6b1702cc356252741da3471080cffa07894b
parent8dbc469ae021fedcd66e70dfe27099d99a57a900 (diff)
downloadopendkim_EL6-50bd122ede5be7b89e10195ba538fb57b544bd7d.tar.gz
Drop sysvinit subpackage from F23+
-rw-r--r--opendkim.spec47
1 files changed, 29 insertions, 18 deletions
diff --git a/opendkim.spec b/opendkim.spec
index 50aecfd..d1d3012 100644
--- a/opendkim.spec
+++ b/opendkim.spec
@@ -5,7 +5,7 @@
Summary: A DomainKeys Identified Mail (DKIM) milter to sign and/or verify mail
Name: opendkim
Version: 2.10.1
-Release: 2%{?dist}
+Release: 3%{?dist}
License: BSD and Sendmail
URL: http://opendkim.org/
Group: System Environment/Daemons
@@ -62,6 +62,7 @@ Requires: libopendkim = %{version}-%{release}
This package contains the static libraries, headers, and other support files
required for developing applications against libopendkim.
+%if 0%{?fedora} < 23
%package sysvinit
Summary: The SysV init script to manage the OpenDKIM milter.
Group: System Environmnt/Daemons
@@ -76,6 +77,7 @@ contains the SysV init script to manage the OpenDKIM milter when running a
legacy SysV-compatible init system.
It is not required when the init system used is systemd.
+%endif
%prep
%setup -q
@@ -92,11 +94,13 @@ rm -rf %{buildroot}
make DESTDIR=%{buildroot} install %{?_smp_mflags}
install -d %{buildroot}%{_sysconfdir}
install -d %{buildroot}%{_sysconfdir}/sysconfig
-install -d %{buildroot}%{_initrddir}
install -d -m 0755 %{buildroot}%{_unitdir}
install -m 0644 contrib/systemd/%{name}.service %{buildroot}%{_unitdir}/%{name}.service
-install -m 0755 contrib/init/redhat/%{name} %{buildroot}%{_initrddir}/%{name}
install -m 0755 contrib/init/redhat/%{name}-default-keygen %{buildroot}%{_sbindir}/%{name}-default-keygen
+%if 0%{?fedora} < 23
+install -d %{buildroot}%{_initrddir}
+install -m 0755 contrib/init/redhat/%{name} %{buildroot}%{_initrddir}/%{name}
+%endif
cat > %{buildroot}%{_sysconfdir}/%{name}.conf << 'EOF'
## BASIC OPENDKIM CONFIGURATION FILE
@@ -357,9 +361,6 @@ if [ $1 -eq 1 ] ; then
/bin/systemctl enable %{name}.service >/dev/null 2>&1 || :
fi
-%post sysvinit
-/sbin/chkconfig --add %{name} || :
-
%preun
if [ $1 -eq 0 ] ; then
# Package removal, not upgrade
@@ -367,13 +368,6 @@ if [ $1 -eq 0 ] ; then
/bin/systemctl stop %{name}.service > /dev/null 2>&1 || :
fi
-%preun sysvinit
-if [ $1 -eq 0 ]; then
- service %{name} stop >/dev/null || :
- /sbin/chkconfig --del %{name} || :
-fi
-exit 0
-
%postun
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
if [ $1 -ge 1 ] ; then
@@ -381,19 +375,31 @@ if [ $1 -ge 1 ] ; then
/bin/systemctl try-restart %{name}.service >/dev/null 2>&1 || :
fi
+%triggerun -- %{name} < 2.8.0-1
+/bin/systemctl enable %{name}.service >/dev/null 2>&1
+/sbin/chkconfig --del %{name} >/dev/null 2>&1 || :
+/bin/systemctl try-restart %{name}.service >/dev/null 2>&1 || :
+
+%if 0%{?fedora} < 23
+%post sysvinit
+/sbin/chkconfig --add %{name} || :
+
+%preun sysvinit
+if [ $1 -eq 0 ]; then
+ service %{name} stop >/dev/null || :
+ /sbin/chkconfig --del %{name} || :
+fi
+exit 0
+
%postun sysvinit
if [ "$1" -ge "1" ] ; then
/sbin/service %{name} condrestart >/dev/null 2>&1 || :
fi
exit 0
-%triggerun -- %{name} < 2.8.0-1
-/bin/systemctl enable %{name}.service >/dev/null 2>&1
-/sbin/chkconfig --del %{name} >/dev/null 2>&1 || :
-/bin/systemctl try-restart %{name}.service >/dev/null 2>&1 || :
-
%triggerpostun -n opendkim-sysvinit -- %{name} < 2.8.0-1
/sbin/chkconfig --add %{name} >/dev/null 2>&1 || :
+%endif
%post -n libopendkim -p /sbin/ldconfig
@@ -424,9 +430,11 @@ rm -rf %{buildroot}
%attr(0644,root,root) %{_unitdir}/%{name}.service
%attr(0755,root,root) %{_sbindir}/%{name}-default-keygen
+%if 0%{?fedora} < 23
%files sysvinit
%defattr(-,root,root)
%attr(0755,root,root) %{_initrddir}/%{name}
+%endif
%files -n libopendkim
%defattr(-,root,root)
@@ -442,6 +450,9 @@ rm -rf %{buildroot}
%{_libdir}/pkgconfig/*.pc
%changelog
+* Thu Mar 05 2015 Adam Jackson <ajax@redhat.com> 2.10.1-3
+- Drop sysvinit subpackage from F23+
+
* Tue Mar 03 2015 Steve Jenkins <steve@stevejenkins.com> - 2.10.1-2
- Added IPv6 ::1 support to TrustedHosts (RH Bugzilla #1049204)