stevej pushed to opendkim (f21). "Update to 2.8.0-3"

notifications at fedoraproject.org notifications at fedoraproject.org
Mon Mar 30 02:06:20 UTC 2015


>From b387a90a07729a9c5b4e72f9a04e38dc221c8a77 Mon Sep 17 00:00:00 2001
From: stevejenkins <steve at stevejenkins.com>
Date: Tue, 26 Feb 2013 12:08:40 -0800
Subject: Update to 2.8.0-3


diff --git a/opendkim.spec b/opendkim.spec
index 1664367..b481c54 100644
--- a/opendkim.spec
+++ b/opendkim.spec
@@ -1,31 +1,31 @@
-# Copyright (c) 2010, 2011, The OpenDKIM Project.
-#
-# $Id: opendkim.spec.in,v 1.2 2010/10/25 17:13:47 cm-msk Exp $
+# SystemV-compatible version
 
 Summary: A DomainKeys Identified Mail (DKIM) milter to sign and/or verify mail
 Name: opendkim
 Version: 2.8.0
-Release: 2%{?dist}
+Release: 3%{?dist}
 License: BSD and Sendmail
 URL: http://opendkim.org/
 Group: System Environment/Daemons
 Requires: lib%{name} = %{version}-%{release}
 Requires (pre): shadow-utils
-Requires (post): systemd-units
-Requires (preun): systemd-units
-Requires (postun): systemd-units
-# This is actually needed for the %triggerun script but Requires(triggerun)
-# is not valid.  We can use %post because this particular %triggerun script
-# should fire just after this package is installed.
-Requires (post): systemd-sysv
+
+# Uncomment for systemd version
+#Requires (post): systemd-units
+#Requires (preun): systemd-units
+#Requires (postun): systemd-units
+#Requires (post): systemd-sysv
+
+# Uncomment for SystemV version
+Requires (post): chkconfig
+Requires (preun): chkconfig, initscripts
+Requires (postun): initscripts
 
 BuildRequires: openssl-devel
 BuildRequires: pkgconfig
 BuildRequires: sendmail-devel
 
 Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
-#Source1: %{name}.service
-#Source2: %{name}-default-keygen
 
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
@@ -52,20 +52,20 @@ Requires: libopendkim = %{version}-%{release}
 This package contains the static libraries, headers, and other support files
 required for developing applications against libopendkim.
 
-%package sysvinit
-Summary: The SysV init script to manage the OpenDKIM milter.
-Group: System Environmnt/Daemons
-Requires: %{name} = %{version}-%{release}
+#%package sysvinit
+#Summary: The SysV init script to manage the OpenDKIM milter.
+#Group: System Environmnt/Daemons
+#Requires: %{name} = %{version}-%{release}
 
-%description sysvinit
-OpenDKIM allows signing and/or verification of email through an open source
-library that implements the DKIM service, plus a milter-based filter
-application that can plug in to any milter-aware MTA, including sendmail,
-Postfix, or any other MTA that supports the milter protocol. This package
-contains the SysV init script to manage the OpenDKIM milter when running a
-legacy SysV-compatible init system.
+#%description sysvinit
+#OpenDKIM allows signing and/or verification of email through an open source
+#library that implements the DKIM service, plus a milter-based filter
+#application that can plug in to any milter-aware MTA, including sendmail,
+#Postfix, or any other MTA that supports the milter protocol. This package
+#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.
+#It is not required when the init system used is systemd.
 
 %prep
 %setup -q
@@ -82,9 +82,9 @@ 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 -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 0644 contrib/systemd/%{name}.service %{buildroot}/%{_unitdir}/%{name}.service
 install -m 0755 contrib/init/redhat/%{name}-default-keygen %{buildroot}%{_sbindir}/%{name}-default-keygen
 
 cat > %{buildroot}%{_sysconfdir}/%{name}.conf << 'EOF'
@@ -263,24 +263,22 @@ getent passwd %{name} >/dev/null || \
 exit 0
 
 %post
-#%systemd_post %{name}.service
-if [ $1 -eq 1 ] ; then 
-    # Initial installation 
-    /bin/systemctl enable %{name}.service >/dev/null 2>&1 || :
-fi
+#if [ $1 -eq 1 ] ; then 
+#    # Initial installation 
+#    /bin/systemctl enable %{name}.service >/dev/null 2>&1 || :
+#fi
 
-%post sysvinit
+#%post sysvinit
 /sbin/chkconfig --add %{name} || :
 
 %preun
-#%systemd_preun %{name}.service
-if [ $1 -eq 0 ] ; then
-    # Package removal, not upgrade
-    /bin/systemctl --no-reload disable %{name}.service > /dev/null 2>&1 || :
-    /bin/systemctl stop %{name}.service > /dev/null 2>&1 || :
-fi
+#if [ $1 -eq 0 ] ; then
+#    # Package removal, not upgrade
+#    /bin/systemctl --no-reload disable %{name}.service > /dev/null 2>&1 || :
+#    /bin/systemctl stop %{name}.service > /dev/null 2>&1 || :
+#fi
 
-%preun sysvinit
+#%preun sysvinit
 if [ $1 -eq 0 ]; then
 	service %{name} stop >/dev/null || :
 	/sbin/chkconfig --del %{name} || :
@@ -288,27 +286,26 @@ fi
 exit 0
 
 %postun
-#%systemd_postun_with_restart %{name}.service
-/bin/systemctl daemon-reload >/dev/null 2>&1 || :
-if [ $1 -ge 1 ] ; then
-    # Package upgrade, not uninstall
-    /bin/systemctl try-restart %{name}.service >/dev/null 2>&1 || :
-fi
+#/bin/systemctl daemon-reload >/dev/null 2>&1 || :
+#if [ $1 -ge 1 ] ; then
+#    # Package upgrade, not uninstall
+#    /bin/systemctl try-restart %{name}.service >/dev/null 2>&1 || :
+#fi
 
-%postun sysvinit
+#%postun sysvinit
 if [ "$1" -ge "1" ] ; then
 	/sbin/service %{name} condrestart >/dev/null 2>&1 || :
 fi
 exit 0
 
-%triggerun -- %{name} < 2.8.0-1
-/usr/bin/systemd-sysv-convert --save %{name} >/dev/null 2>&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 || :
+#%triggerun -- %{name} < 2.8.0-1
+#/usr/bin/systemd-sysv-convert --save %{name} >/dev/null 2>&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 || :
+#%triggerpostun -n opendkim-sysvinit -- %{name} < 2.8.0-1
+#/sbin/chkconfig --add %{name} >/dev/null 2>&1 || :
 
 %post -n libopendkim -p /sbin/ldconfig
 
@@ -336,12 +333,11 @@ rm -rf %{buildroot}
 %dir %attr(-,%{name},%{name}) %{_localstatedir}/run/%{name}
 %dir %attr(-,root,%{name}) %{_sysconfdir}/%{name}
 %dir %attr(750,root,%{name}) %{_sysconfdir}/%{name}/keys
-%attr(0644,root,root) %{_unitdir}/%{name}.service
-%attr(0755,root,root) %{_sbindir}/%{name}-default-keygen
+#%attr(0644,root,root) %{_unitdir}/%{name}.service
+#%attr(0755,root,root) %{_sbindir}/%{name}-default-keygen
 
-%files sysvinit
-%defattr(-,root,root)
-#%{_initrddir}/%{name}
+#%files sysvinit
+#%defattr(-,root,root)
 %attr(0755,root,root) %{_initrddir}/%{name}
 
 %files -n libopendkim
@@ -361,7 +357,13 @@ rm -rf %{buildroot}
 %{_libdir}/pkgconfig/*.pc
 
 %changelog
-* Thu Feb 25 2013 Steve Jenkins <steve stevejenkins com> 2.8.0-2
+* Tue Feb 26 2013 Steve Jenkins <steve stevejenkins com> 2.8.0-3
+- Split into two spec files: systemd (F17+) and SysV (EL5-6)
+- systemd-only: Removed leading / from unitdir variables
+- Removed commented source lines
+- Created comment sections for easy switching between systemd and SysV
+
+* Mon Feb 25 2013 Steve Jenkins <steve stevejenkins com> 2.8.0-2
 - Added / in front of unitdir variables
 
 * Thu Feb 21 2013 Steve Jenkins <steve stevejenkins com> 2.8.0-1
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/opendkim.git/commit/?h=f21&id=b387a90a07729a9c5b4e72f9a04e38dc221c8a77


More information about the scm-commits mailing list