|
|
@@ -33,18 +33,27 @@ Distribution: OpenPKG [BASE]
|
|
|
Group: Mail
|
|
|
License: GPL
|
|
|
Version: 3.22
|
|
|
-Release: 20030330
|
|
|
+Release: 20030703
|
|
|
+
|
|
|
+# package options
|
|
|
+%option with_fsl yes
|
|
|
|
|
|
# list of sources
|
|
|
Source0: ftp://ftp.procmail.org/pub/procmail/procmail-%{version}.tar.gz
|
|
|
Source1: procmailrc
|
|
|
+Source2: rc.procmail
|
|
|
+Source3: fsl.procmail
|
|
|
Patch0: procmail.patch
|
|
|
|
|
|
# build information
|
|
|
Prefix: %{l_prefix}
|
|
|
BuildRoot: %{l_buildroot}
|
|
|
-BuildPreReq: OpenPKG, openpkg >= 20020206
|
|
|
-PreReq: OpenPKG, openpkg >= 20020206
|
|
|
+BuildPreReq: OpenPKG, openpkg >= 20030415
|
|
|
+PreReq: OpenPKG, openpkg >= 20030415
|
|
|
+%if "%{with_fsl}" == "yes"
|
|
|
+BuildPreReq: fsl
|
|
|
+PreReq: fsl
|
|
|
+%endif
|
|
|
AutoReq: no
|
|
|
AutoReqProv: no
|
|
|
|
|
|
@@ -60,10 +69,12 @@ AutoReqProv: no
|
|
|
%prep
|
|
|
%setup -q
|
|
|
%patch -p0
|
|
|
-
|
|
|
-%build
|
|
|
%{l_shtool} subst \
|
|
|
-e 's;^\(BASENAME[^=]*=\).*;\1 %{l_prefix};' \
|
|
|
+ -e 's;^CFLAGS0.*=.*$;CFLAGS0 = %{l_cflags -O};' \
|
|
|
+ -e 's;^LDFLAGS0.*=\(.*\)$;LDFLAGS0 = %{l_ldflags} %{l_fsl_ldflags};' \
|
|
|
+ -e 's;^LIBS.*=.*$;LIBS = %{l_fsl_libs};' \
|
|
|
+ -e 's;^[#]*CC.*=.*$;CC = %{l_cc};' \
|
|
|
Makefile
|
|
|
%{l_shtool} subst \
|
|
|
-e 's;^/\*\(#define NO_fcntl_LOCK\);\1;' \
|
|
|
@@ -71,6 +82,13 @@ AutoReqProv: no
|
|
|
-e 's;\(#define.*ETCRC[^"]"\)[^"]*\(".*\);\1%{l_prefix}/etc/procmail/procmailrc\2;' \
|
|
|
-e 's;\(#define.*ETCRCS[^"]"\)[^"]*\(".*\);\1%{l_prefix}/etc/procmail/\2;' \
|
|
|
config.h
|
|
|
+ %if "%{with_fsl}" == "yes"
|
|
|
+ %{l_shtool} subst \
|
|
|
+ -e 's;openlog(ident,logopt,facility);openlog(ident,logopt,LOG_USER);' \
|
|
|
+ src/includes.h
|
|
|
+ %endif
|
|
|
+
|
|
|
+%build
|
|
|
( unset LD_LIBRARY_PATH 2>/dev/null || true
|
|
|
dirlist=""
|
|
|
for dir in "$HOME/tmp" /tmp $RPM_SOURCE_DIR $RPM_BUILD_DIR; do
|
|
|
@@ -84,14 +102,12 @@ AutoReqProv: no
|
|
|
%{l_shtool} subst \
|
|
|
-e 's;\(#define.*SENDMAIL[^"]*"\)[^"]*\(".*\);\1%{l_prefix}/sbin/sendmail\2;' \
|
|
|
autoconf.h
|
|
|
- %{l_make} %{l_mflags} \
|
|
|
- CC="%{l_cc}" \
|
|
|
- CFLAGS="%{l_cflags -O}"
|
|
|
+ %{l_make} %{l_mflags}
|
|
|
|
|
|
%install
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
-
|
|
|
%{l_shtool} mkdir -f -p -m 755 \
|
|
|
+ $RPM_BUILD_ROOT%{l_prefix}/var/%{name} \
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/bin \
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/etc/procmail \
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/man/man1 \
|
|
|
@@ -110,8 +126,28 @@ AutoReqProv: no
|
|
|
-e 's;@l_prefix@;%{l_prefix};g' \
|
|
|
%{SOURCE procmailrc} $RPM_BUILD_ROOT%{l_prefix}/etc/procmail/
|
|
|
|
|
|
+ # Creating run-command script
|
|
|
+ %{l_shtool} mkdir -f -p -m 755 \
|
|
|
+ $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
|
|
|
+ %{l_shtool} install -c -m 755 \
|
|
|
+ -e 's;@l_prefix@;%{l_prefix};g' \
|
|
|
+ -e 's;@l_susr@;%{l_susr};g' \
|
|
|
+ -e 's;@l_rusr@;%{l_rusr};g' \
|
|
|
+ -e 's;@l_rgrp@;%{l_rgrp};g' \
|
|
|
+ %{SOURCE rc.%{name}} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
|
|
|
+
|
|
|
+ # OSSP fake syslog library
|
|
|
+ %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/etc/fsl
|
|
|
+ %{l_shtool} install -c -m 644 \
|
|
|
+ -e 's;@l_prefix@;%{l_prefix};g' \
|
|
|
+ %{SOURCE fsl.%{name}} \
|
|
|
+ $RPM_BUILD_ROOT%{l_prefix}/etc/fsl/
|
|
|
+
|
|
|
+ # determine installation files
|
|
|
%{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
|
|
|
%{l_files_std} \
|
|
|
+ '%not %dir %{l_prefix}/etc/fsl' \
|
|
|
+ '%config %{l_prefix}/etc/fsl/fsl.%{name}' \
|
|
|
'%attr(6755,%{l_susr},mail) %{l_prefix}/bin/procmail' \
|
|
|
'%attr(2755,%{l_mgrp},mail) %{l_prefix}/bin/lockfile'
|
|
|
|