[packages/opendmarc] move tmpfiles config to file; general cleanups

glen glen at pld-linux.org
Thu May 29 12:08:00 CEST 2014


commit c93675fc4c10a30b72a0d139f1c638547b28bbf8
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Thu May 29 13:06:45 2014 +0300

    move tmpfiles config to file; general cleanups

 opendmarc.spec     | 21 +++++++++------------
 opendmarc.tmpfiles |  1 +
 2 files changed, 10 insertions(+), 12 deletions(-)
---
diff --git a/opendmarc.spec b/opendmarc.spec
index 0aee7c2..56e5492 100644
--- a/opendmarc.spec
+++ b/opendmarc.spec
@@ -9,6 +9,7 @@ License:	BSD
 Group:		Daemons
 Source0:	http://downloads.sourceforge.net/opendmarc/%{name}-%{version}.tar.gz
 # Source0-md5:	bad2c454841cf7711fc148e114620051
+Source1:	opendmarc.tmpfiles
 URL:		http://www.trusteddomain.org/opendmarc.html
 BuildRequires:	libtool
 BuildRequires:	mysql-devel
@@ -61,33 +62,29 @@ files required for developing applications against libopendmarc.
 
 %install
 rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/rc.d/init.d,%{systemdtmpfilesdir}} \
+	$RPM_BUILD_ROOT%{_localstatedir}/{run,spool}/%{name}
+
 %{__make} install \
 	DESTDIR=$RPM_BUILD_ROOT
 
-install -d $RPM_BUILD_ROOT%{_sysconfdir}
-install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
 install -p contrib/init/redhat/%{name} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
 cp -p opendmarc/%{name}.conf.sample $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.conf
+
 # Set some basic settings in the default config file
 perl -pi -e 's|^# (HistoryFile /var/run)/(opendmarc.dat)|$1/opendmarc/$2/;
              s|^# (Socket )|$1|;
              s|^# (UserId )|$1|;
             ' $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.conf
 
-install -p -d $RPM_BUILD_ROOT%{systemdtmpfilesdir}
-cat > $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf <<EOF
-D %{_localstatedir}/run/%{name} 0700 %{name} %{name} -
-EOF
-
-rm $RPM_BUILD_ROOT%{_libdir}/*.la
-# packaged as %doc
-rm -r $RPM_BUILD_ROOT%{_docdir}/%{name}
+cp -p %{SOURCE1} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
 
 install -d $RPM_BUILD_ROOT%{_includedir}/%{name}
 cp -p libopendmarc/dmarc.h $RPM_BUILD_ROOT%{_includedir}/%{name}
 
-install -d $RPM_BUILD_ROOT%{_localstatedir}/spool/%{name}
-install -d $RPM_BUILD_ROOT%{_localstatedir}/run/%{name}
+rm $RPM_BUILD_ROOT%{_libdir}/*.la
+# packaged as %doc
+rm -r $RPM_BUILD_ROOT%{_docdir}/%{name}
 
 %clean
 rm -rf $RPM_BUILD_ROOT
diff --git a/opendmarc.tmpfiles b/opendmarc.tmpfiles
new file mode 100644
index 0000000..ed7900a
--- /dev/null
+++ b/opendmarc.tmpfiles
@@ -0,0 +1 @@
+D /var/run/opendmarc 0700 opendmarc opendmarc -
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/opendmarc.git/commitdiff/6c0044ad522c591e75b95f7d38f468e1dc04004e



More information about the pld-cvs-commit mailing list