diff -r fd1de0c7bc20 -r 01294b31a79e postfix/postfix.spec --- a/postfix/postfix.spec Wed Aug 08 20:36:32 2012 +0200 +++ b/postfix/postfix.spec Thu Aug 09 00:41:14 2012 +0200 @@ -22,8 +22,8 @@ ## # package versions -%define V_postfix 2.5.6 -%define V_pflogsumm 1.1.2 +%define V_postfix 2.9.4 +%define V_pflogsumm 1.1.5 %define V_whoson 2.4.0 # package information @@ -37,12 +37,13 @@ Group: Mail License: IPL Version: %{V_postfix} -Release: 20090418 +Release: 20120800 # package options %option with_fsl yes %option with_ssl no %option with_sasl no +%option with_sqlite no %option with_mysql no %option with_pgsql no %option with_ldap no @@ -57,13 +58,11 @@ Source4: rc.postfix Patch0: postfix.patch Patch1: postfix.patch.pfls -Patch2: ftp://ftp.openpkg.org/sources/CPY/postfix/postfix-%{V_whoson}-whoson.patch +Patch2: http://download.openpkg.org/components/versioned/postfix/postfix-%{V_whoson}-whoson.patch # build information -Prefix: %{l_prefix} -BuildRoot: %{l_buildroot} -BuildPreReq: OpenPKG, openpkg >= 20060823, perl, gcc -PreReq: OpenPKG, openpkg >= 20060823, perl, procmail, perl-time +BuildPreReq: OpenPKG, openpkg >= 20120101, perl, gcc +PreReq: OpenPKG, openpkg >= 20120101, perl, procmail, perl-time BuildPreReq: make, pcre, db PreReq: make, pcre, db %if "%{with_fsl}" == "yes" @@ -78,6 +77,10 @@ BuildPreReq: sasl PreReq: sasl %endif +%if "%{with_sqlite}" == "yes" +BuildPreReq: sqlite +PreReq: sqlite +%endif %if "%{with_mysql}" == "yes" BuildPreReq: mysql PreReq: mysql @@ -94,8 +97,6 @@ BuildPreReq: whoson PreReq: whoson %endif -AutoReq: no -AutoReqProv: no Provides: MTA Conflicts: exim, sendmail, ssmtp @@ -111,6 +112,7 @@ o PCRE matching support o Optional STARTTLS encryption support (see package options) o Optional SASL2 authentication support (see package options) + o Optional SQLite dictionary support (see package options) o Optional MySQL dictionary support (see package options) o Optional PostgreSQL dictionary support (see package options) o Optional OpenLDAP dictionary support (see package options) @@ -129,7 +131,7 @@ } prog postfix:whoson = { version = %{V_whoson} - url = ftp://ftp.openpkg.org/sources/CPY/postfix/ + url = http://download.openpkg.org/components/versioned/postfix/ regex = postfix-(__VER__)-whoson.patch } @@ -142,15 +144,24 @@ %patch -p0 ( cd pflogsumm-%{V_pflogsumm} && %{l_patch} -p0 -b <%{PATCH1} ) || exit $? + # apply vendor WHOSON patch +%if "%{with_whoson}" == "yes" + %patch -p0 -P 2 +%endif + # remove OpenPKG privelege model incompatible exit conditions %{l_shtool} subst \ -e 's;msg_fatal\(.*attribute specifies mail system\);msg_info\1;g' \ src/pipe/pipe.c - # apply vendor WHOSON patch -%if "%{with_whoson}" == "yes" - %patch -p0 -P 2 -%endif + # platform specific corrections + case "%{l_platform -t}" in + *-sunos5.11 ) + %{l_shtool} subst \ + -e 's;#define HAS_NISPLUS;#undef HAS_NISPLUS;' \ + src/util/sys_defs.h + ;; + esac %build # configure Postfix (hard-core part I) @@ -182,6 +193,10 @@ AUXLIBS="$AUXLIBS -ldb" CCARGS="$CCARGS -DHAS_PCRE" AUXLIBS="$AUXLIBS -lpcre" +%if "%{with_sqlite}" == "yes" + CCARGS="$CCARGS -DHAS_SQLITE" + AUXLIBS="$AUXLIBS -lsqlite3" +%endif %if "%{with_mysql}" == "yes" CCARGS="$CCARGS -DHAS_MYSQL %{l_cppflags mysql .}" AUXLIBS="$AUXLIBS %{l_ldflags mysql .} -lmysqlclient -lz -lm" @@ -232,10 +247,9 @@ src/util/sys_defs.h # build Postfix - %{l_make} %{l_mflags} + %{l_make} %{l_mflags -O} %install - rm -rf $RPM_BUILD_ROOT # perform standard installation procedure %{l_shtool} subst -e "s;chown;true;" postfix-install @@ -270,11 +284,6 @@ main.cf master.cf main.cf.default; do rm -f $RPM_BUILD_ROOT%{l_prefix}/etc/postfix/$cfg done - mv $RPM_BUILD_ROOT%{l_prefix}/etc/postfix/postfix-script \ - $RPM_BUILD_ROOT%{l_prefix}/sbin/postfix-script - rm -f $RPM_BUILD_ROOT%{l_prefix}/etc/postfix/postfix-script* - mv $RPM_BUILD_ROOT%{l_prefix}/etc/postfix/post-install \ - $RPM_BUILD_ROOT%{l_prefix}/sbin/postfix-install # install default configuration for name in `grep "^/dev/null 2>&1 || true # remove generated configuration files ( cd $RPM_INSTALL_PREFIX/etc/postfix && %{l_make} clean >/dev/null 2>&1; true ) || true - # remove generated run-time files and directories - rm -rf $RPM_INSTALL_PREFIX/etc/postfix/data/* + # remove generated runtime files and directories + rm -rf $RPM_INSTALL_PREFIX/var/postfix/data/* rm -rf $RPM_INSTALL_PREFIX/var/postfix/pid/* rm -rf $RPM_INSTALL_PREFIX/var/postfix/private/* rm -rf $RPM_INSTALL_PREFIX/var/postfix/public/*