packages: milter-greylist/milter-greylist.spec - use configure opts, instea...
glen
glen at pld-linux.org
Mon Aug 8 22:22:56 CEST 2011
Author: glen Date: Mon Aug 8 20:22:56 2011 GMT
Module: packages Tag: HEAD
---- Log message:
- use configure opts, instead of manual *FLAGS, fix deps
---- Files affected:
packages/milter-greylist:
milter-greylist.spec (1.1 -> 1.2)
---- Diffs:
================================================================
Index: packages/milter-greylist/milter-greylist.spec
diff -u packages/milter-greylist/milter-greylist.spec:1.1 packages/milter-greylist/milter-greylist.spec:1.2
--- packages/milter-greylist/milter-greylist.spec:1.1 Mon Aug 8 22:00:55 2011
+++ packages/milter-greylist/milter-greylist.spec Mon Aug 8 22:22:51 2011
@@ -7,7 +7,7 @@
Summary: Milter for greylisting, the next step in the spam control war
Name: milter-greylist
Version: 4.2.7
-Release: 0.1
+Release: 0.2
License: BSD with advertising
Group: Daemons
URL: http://hcpnet.free.fr/milter-greylist/
@@ -25,14 +25,15 @@
Requires(postun): /usr/sbin/userdel
Requires(pre): /bin/id
Requires(pre): /usr/sbin/useradd
-%{?with_libbind:BuildRequires: %{_libdir}/libbind.so}
+%{?with_libbind:BuildRequires: libbind-devel}
+BuildRequires: autoconf
BuildRequires: GeoIP-devel
BuildRequires: bison
BuildRequires: curl-devel
BuildRequires: flex
+BuildRequires: libmilter-devel
%{?with_spf:BuildRequires: libspf-devel}
BuildRequires: m4
-BuildRequires: sendmail-devel
Provides: group(%{username})
Provides: user(%{username})
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -59,7 +60,10 @@
%patch9 -p1
%patch10 -p1
-sed -i -e 's!/libresolv.a!/../../../no-such-lib.a!g' configure
+%{__sed} -i -e 's!/libresolv.a!/../../../no-such-lib.a!g' configure.ac
+
+# drop rpath and wrong lib dir
+%{__sed} -i -e 's#-L$withval/lib -Wl,$rpath$withval/lib##' configure.ac
grep -rl /var/milter-greylist . | xargs sed -i -e '
s!/var/milter-greylist/milter-greylist.sock!%{rundir}/milter-greylist.sock!g;
@@ -68,10 +72,9 @@
'
%build
-_comps="%{?with_libbind:libbind} libcurl"
-export CPPFLAGS="-DUSE_CURL -DUSE_GEOIP -D_GNU_SOURCE -D_REENTRANT $(pkg-config --cflags-only-I $_comps)"
-export LDFLAGS="-Wl,--as-needed $(pkg-config --libs $_comps) -lGeoIP"
-
+%{__aclocal}
+%{__autoconf}
+%{__autoheader}
%configure \
--disable-rpath \
--with-user=%{username} \
@@ -80,8 +83,10 @@
--enable-p0f \
--disable-drac \
--with-drac-db=%{vardir}/drac/drac.db \
+ --with-libGeoIP=/usr \
+ --with-libcurl=/usr \
+ %{?with_libbind:--with-libbind=/usr} \
%{?with_spf:--with-libspf=/usr}
-
## is not SMP safe :(
%{__make} -j1 \
TEST=false \
@@ -90,7 +95,7 @@
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{rundir},%{dbdir},%{_var}/run}
+install -d $RPM_BUILD_ROOT{%{rundir},%{dbdir},%{_var}/run,/etc/rc.d/init.d}
%{__make} install \
TEST=false \
USER=%(id -u) \
@@ -104,7 +109,7 @@
touch $RPM_BUILD_ROOT%{_var}/run/milter-greylist.pid
%pre
-%groupadd -g 7 -r %{username}
+%groupadd -g 7 -r %{username}
%useradd -u 7 -r -s /sbin/nologin -M -d %{vardir} -c 'Greylist-milter user' -g %{username} %{username}
%postun
@@ -140,5 +145,8 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.2 2011/08/08 20:22:51 glen
+- use configure opts, instead of manual *FLAGS, fix deps
+
Revision 1.1 2011/08/08 20:00:55 glen
- new, based on fedora package
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/milter-greylist/milter-greylist.spec?r1=1.1&r2=1.2&f=u
More information about the pld-cvs-commit
mailing list