|
|
|
@ -24,9 +24,17 @@
|
|
|
|
|
|
|
|
|
|
%define V_here 20010228.5 |
|
|
|
|
%define V_real 20010228-pl05 |
|
|
|
|
%define V_ipv6 20010228pl04-v6-20010913a |
|
|
|
|
%define V_tls 0.7.9-20010228-pl04-0.9.6b |
|
|
|
|
%define V_pflogsumm 1.0.3 |
|
|
|
|
|
|
|
|
|
# build options |
|
|
|
|
# (attention: ipv6 and tls at the same time conflicts!) |
|
|
|
|
%define with_db yes |
|
|
|
|
%define with_pcre yes |
|
|
|
|
%define with_ipv6 yes |
|
|
|
|
%define with_tls no |
|
|
|
|
|
|
|
|
|
# package information |
|
|
|
|
Name: postfix |
|
|
|
|
Summary: Mail Transfer Agent (MTA) |
|
|
|
@ -37,34 +45,63 @@ Distribution: OpenPKG [EXP]
|
|
|
|
|
Group: Mail |
|
|
|
|
License: GPL |
|
|
|
|
Version: %{V_here} |
|
|
|
|
Release: 11 |
|
|
|
|
Release: 12 |
|
|
|
|
|
|
|
|
|
# list of sources |
|
|
|
|
Source0: ftp://ftp.porcupine.org/mirrors/postfix-release/official/postfix-%{V_real}.tar.gz |
|
|
|
|
Source1: ftp://ftp.aet.tu-cottbus.de/pub/postfix_tls/pfixtls-%{V_tls}.tar.gz |
|
|
|
|
Source2: ftp://ftp.openpkg.org/DST/postfix/fakesyslog.tar.gz |
|
|
|
|
Source3: http://jimsun.linxnet.com/downloads/pflogsumm-%{V_pflogsumm}.pl |
|
|
|
|
Source4: rc.postfix |
|
|
|
|
Source3: ftp://ftp.kame.net/pub/kame/misc/postfix-%{V_ipv6}.diff.gz |
|
|
|
|
Source4: http://jimsun.linxnet.com/downloads/pflogsumm-%{V_pflogsumm}.pl |
|
|
|
|
Source5: rc.postfix |
|
|
|
|
|
|
|
|
|
# build information |
|
|
|
|
Prefix: %{l_prefix} |
|
|
|
|
BuildRoot: %{l_buildroot} |
|
|
|
|
BuildPreReq: OpenPKG, openpkg >= 0.9-33, db, openssl, perl >= 5.6.1-10, pcre, patch |
|
|
|
|
PreReq: OpenPKG, openpkg >= 0.9-33, db, openssl, perl >= 5.6.1-10, pcre |
|
|
|
|
BuildPreReq: OpenPKG, openpkg >= 0.9-33, perl >= 5.6.1-10 |
|
|
|
|
PreReq: OpenPKG, openpkg >= 0.9-33, perl >= 5.6.1-10 |
|
|
|
|
%if "%{with_db}" == "yes" |
|
|
|
|
BuildPreReq: db |
|
|
|
|
%endif |
|
|
|
|
%if "%{with_pcre}" == "yes" |
|
|
|
|
BuildPreReq: pcre |
|
|
|
|
%endif |
|
|
|
|
%if "%{with_tls}" == "yes" |
|
|
|
|
BuildPreReq: openssl |
|
|
|
|
%endif |
|
|
|
|
%if "%{with_ipv6}" == "yes" || "%{with_tls}" == "yes" |
|
|
|
|
BuildPreReq: patch |
|
|
|
|
%endif |
|
|
|
|
AutoReq: no |
|
|
|
|
AutoReqProv: no |
|
|
|
|
Provides: MTA |
|
|
|
|
|
|
|
|
|
%description |
|
|
|
|
Postfix is a new-generation Mail Transfer Agent (MTA) aimed to |
|
|
|
|
replace the Sendmail MTA. |
|
|
|
|
Postfix is a new-generation Mail Transfer Agent (MTA) able to |
|
|
|
|
fully replace the Sendmail MTA. |
|
|
|
|
|
|
|
|
|
Local specifics in this OpenPKG version: |
|
|
|
|
o Postfix logs directly to the filesystem and not via syslog(3) |
|
|
|
|
o Optional IPv6 support |
|
|
|
|
o Optional STARTTLS support |
|
|
|
|
o Optional Berkely-DB lookup table support |
|
|
|
|
o Optional PCRE matching support |
|
|
|
|
|
|
|
|
|
%prep |
|
|
|
|
%setup0 -q -c |
|
|
|
|
%setup1 -q -T -D -a 1 |
|
|
|
|
%setup2 -q -T -D -a 2 |
|
|
|
|
cd postfix-%{V_real} |
|
|
|
|
%if "%{with_ipv6}" == "yes" |
|
|
|
|
%{l_gzip} -d -c %{SOURCE postfix-20010228pl04-v6-20010913a.diff.gz} |\ |
|
|
|
|
%{l_perl} -e 'my $c = ""; $c .= $_ while (<STDIN>); |
|
|
|
|
$c =~ s/(^|\n)diff[^\n]+(\.indent\.pro|\.cvsignore).+?(?=\ndiff)//sg; |
|
|
|
|
print $c;' |\ |
|
|
|
|
%{l_patch} -p1 |
|
|
|
|
%endif |
|
|
|
|
%if "%{with_tls}" == "yes" |
|
|
|
|
%{l_patch} -p1 < ../pfixtls-%{V_tls}/pfixtls.diff |
|
|
|
|
%endif |
|
|
|
|
%{l_rpmtool} subst \ |
|
|
|
|
's/var_config_dir, /var_command_dir, /' \ |
|
|
|
|
-- src/postfix/postfix.c |
|
|
|
@ -91,9 +128,20 @@ Provides: MTA
|
|
|
|
|
CCARGS="$CCARGS %{l_cflags -O}" |
|
|
|
|
CCARGS="$CCARGS -I%{l_prefix}/include" |
|
|
|
|
CCARGS="$CCARGS -DDEF_CONFIG_DIR=\\\\\\\"%{l_prefix}/etc/postfix\\\\\\\"" |
|
|
|
|
CCARGS="$CCARGS -DHAS_PCRE -DHAS_DB -DHAS_SSL" |
|
|
|
|
AUXLIBS="" |
|
|
|
|
AUXLIBS="$AUXLIBS -L%{l_prefix}/lib -ldb -lssl -lcrypto -lpcre" |
|
|
|
|
AUXLIBS="$AUXLIBS -L%{l_prefix}/lib" |
|
|
|
|
%if "%{with_db}" == "yes" |
|
|
|
|
CCARGS="$CCARGS -DHAS_DB" |
|
|
|
|
AUXLIBS="$AUXLIBS -ldb" |
|
|
|
|
%endif |
|
|
|
|
%if "%{with_pcre}" == "yes" |
|
|
|
|
CCARGS="$CCARGS -DHAS_PCRE" |
|
|
|
|
AUXLIBS="$AUXLIBS -lpcre" |
|
|
|
|
%endif |
|
|
|
|
%if "%{with_tls}" == "yes" |
|
|
|
|
CCARGS="$CCARGS -DHAS_SSL" |
|
|
|
|
AUXLIBS="$AUXLIBS -lssl -lcrypto" |
|
|
|
|
%endif |
|
|
|
|
AUXLIBS="$AUXLIBS -L$fakesyslogdir -lfakesyslog" |
|
|
|
|
%{l_make} %{l_mflags} makefiles \ |
|
|
|
|
CC="%{l_cc}" CCARGS="$CCARGS" AUXLIBS="$AUXLIBS" |
|
|
|
@ -152,9 +200,9 @@ Provides: MTA
|
|
|
|
|
# pre-create variable stuff |
|
|
|
|
( cd $RPM_BUILD_ROOT%{l_prefix}/var/postfix |
|
|
|
|
%{l_shtool} mkdir -f -p -m 700 \ |
|
|
|
|
active bounce corrupt defer deferred flush incoming private saved |
|
|
|
|
incoming active bounce defer deferred flush saved corrupt |
|
|
|
|
%{l_shtool} mkdir -f -p -m 755 \ |
|
|
|
|
log pid public queue |
|
|
|
|
log pid public |
|
|
|
|
%{l_shtool} install -c -m 755 \ |
|
|
|
|
/dev/null log/postfix.log |
|
|
|
|
%{l_shtool} install -c -m 755 \ |
|
|
|
@ -187,7 +235,7 @@ Provides: MTA
|
|
|
|
|
%files -f files |
|
|
|
|
|
|
|
|
|
%clean |
|
|
|
|
# rm -rf $RPM_BUILD_ROOT |
|
|
|
|
rm -rf $RPM_BUILD_ROOT |
|
|
|
|
|
|
|
|
|
%preun |
|
|
|
|
$RPM_INSTALL_PREFIX/sbin/postfix stop |
|
|
|
|