[milter-regex/el6] Clean up, drop Sendmail references
Paul Howarth
pghmcfc at fedoraproject.org
Mon Mar 2 20:21:39 UTC 2015
commit 6711c39575d61345232fee43bc0fc74d311d5c3e
Author: Paul Howarth <paul at city-fan.org>
Date: Mon Mar 2 14:39:44 2015 +0000
Clean up, drop Sendmail references
- clean up for modern rpmbuild
- drop Sendmail references as the milter should work with Postfix too
- nobody else likes macros for commands
.gitignore | 2 +-
milter-regex.spec | 46 +++++++++++++++++++++++-----------------------
2 files changed, 24 insertions(+), 24 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 27f5542..667041c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1 @@
-milter-regex-1.8.tar.gz
+/milter-regex-[0-9.]*.tar.gz
diff --git a/milter-regex.spec b/milter-regex.spec
index 2837bdf..c667810 100644
--- a/milter-regex.spec
+++ b/milter-regex.spec
@@ -1,7 +1,7 @@
Name: milter-regex
Version: 1.8
-Release: 1%{?dist}
-Summary: Sendmail milter plug-in for regular expression filtering
+Release: 3%{?dist}
+Summary: Milter plug-in for regular expression filtering
Group: System Environment/Daemons
License: BSD
URL: http://www.benzedrine.cx/milter-regex.html
@@ -11,12 +11,7 @@ Source2: milter-regex-options
Source3: milter-regex.conf
Patch0: milter-regex-1.6-gcc.patch
Patch1: milter-regex-1.8-strlcat.patch
-Buildroot: %{_tmppath}/%{name}-%{release}-root-%(%{__id_u} -n)
-Buildrequires: sendmail-devel >= 8.13, byacc, groff
-Requires: sendmail
-
-# This macro only defined by default around Fedora 10 time
-%{?!_initddir:%global _initddir %{_initrddir}}
+BuildRequires: sendmail-devel >= 8.13, byacc, groff
Requires(pre): shadow-utils
Requires(post): /sbin/chkconfig
@@ -30,26 +25,30 @@ emails using regular expressions.
%setup -q
%patch0 -p1 -b .gcc
%patch1 -p0 -b .strlcat
-%{__sed} -i -e 's|/etc/milter-regex\.conf|%{_sysconfdir}/mail/milter-regex.conf|;
- s|_milter-regex|mregex|' milter-regex.[8c]
-/usr/bin/head -n +31 milter-regex.c > LICENSE
+
+# Customize config file location and dæmon user
+sed -i -e 's|/etc/milter-regex\.conf|%{_sysconfdir}/mail/milter-regex.conf|;
+ s|_milter-regex|mregex|' milter-regex.[8c]
+
+# Copy out the license text from the source code
+head -n +31 milter-regex.c > LICENSE
%build
-%{__make} %{?_smp_mflags} -f Makefile.linux CFLAGS="%{optflags} -DYYMAXDEPTH=8192"
+make %{?_smp_mflags} -f Makefile.linux CFLAGS="%{optflags} -DYYMAXDEPTH=8192"
%install
-%{__rm} -rf %{buildroot}
-%{__mkdir} -p \
+rm -rf %{buildroot}
+mkdir -p \
%{buildroot}%{_initddir} \
%{buildroot}%{_localstatedir}/spool/milter-regex \
%{buildroot}%{_mandir}/man8 \
%{buildroot}%{_sbindir} \
%{buildroot}%{_sysconfdir}/{mail,sysconfig}
-%{__install} -p -m 755 milter-regex %{buildroot}%{_sbindir}/
-%{__install} -p -m 644 milter-regex.8 %{buildroot}%{_mandir}/man8/
-%{__install} -p -m 755 %{SOURCE1} %{buildroot}%{_initddir}/milter-regex
-%{__install} -p -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/sysconfig/milter-regex
-%{__install} -p -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/mail/milter-regex.conf
+install -p -m 755 milter-regex %{buildroot}%{_sbindir}/
+install -p -m 644 milter-regex.8 %{buildroot}%{_mandir}/man8/
+install -p -m 755 %{SOURCE1} %{buildroot}%{_initddir}/milter-regex
+install -p -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/sysconfig/milter-regex
+install -p -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/mail/milter-regex.conf
# Create a ghost sock file so we can remove it on package deletion
: > %{buildroot}%{_localstatedir}/spool/milter-regex/sock
@@ -73,11 +72,7 @@ fi
%postun
[ $1 -ge 1 ] && %{_initddir}/milter-regex try-restart &> /dev/null || :
-%clean
-%{__rm} -rf %{buildroot}
-
%files
-%defattr(-,root,root,-)
%doc LICENSE
%{_sbindir}/milter-regex
%{_initddir}/milter-regex
@@ -88,6 +83,11 @@ fi
%{_mandir}/man8/milter-regex.8*
%changelog
+* Mon Mar 2 2015 Paul Howarth <paul at city-fan.org> - 1.8-3
+- clean up for modern rpmbuild
+- drop Sendmail references as the milter should work with Postfix too
+- nobody else likes macros for commands
+
* Fri Aug 13 2010 Paul Howarth <paul at city-fan.org> - 1.8-1
- update to 1.8 (log symbolic host name together with numeric IP address)
- add missing function strlcat from openbsd libc
More information about the scm-commits
mailing list