1.1 --- a/postfix/postfix.spec Wed Aug 08 20:36:32 2012 +0200 1.2 +++ b/postfix/postfix.spec Thu Aug 09 00:41:14 2012 +0200 1.3 @@ -22,8 +22,8 @@ 1.4 ## 1.5 1.6 # package versions 1.7 -%define V_postfix 2.5.6 1.8 -%define V_pflogsumm 1.1.2 1.9 +%define V_postfix 2.9.4 1.10 +%define V_pflogsumm 1.1.5 1.11 %define V_whoson 2.4.0 1.12 1.13 # package information 1.14 @@ -37,12 +37,13 @@ 1.15 Group: Mail 1.16 License: IPL 1.17 Version: %{V_postfix} 1.18 -Release: 20090418 1.19 +Release: 20120800 1.20 1.21 # package options 1.22 %option with_fsl yes 1.23 %option with_ssl no 1.24 %option with_sasl no 1.25 +%option with_sqlite no 1.26 %option with_mysql no 1.27 %option with_pgsql no 1.28 %option with_ldap no 1.29 @@ -57,13 +58,11 @@ 1.30 Source4: rc.postfix 1.31 Patch0: postfix.patch 1.32 Patch1: postfix.patch.pfls 1.33 -Patch2: ftp://ftp.openpkg.org/sources/CPY/postfix/postfix-%{V_whoson}-whoson.patch 1.34 +Patch2: http://download.openpkg.org/components/versioned/postfix/postfix-%{V_whoson}-whoson.patch 1.35 1.36 # build information 1.37 -Prefix: %{l_prefix} 1.38 -BuildRoot: %{l_buildroot} 1.39 -BuildPreReq: OpenPKG, openpkg >= 20060823, perl, gcc 1.40 -PreReq: OpenPKG, openpkg >= 20060823, perl, procmail, perl-time 1.41 +BuildPreReq: OpenPKG, openpkg >= 20120101, perl, gcc 1.42 +PreReq: OpenPKG, openpkg >= 20120101, perl, procmail, perl-time 1.43 BuildPreReq: make, pcre, db 1.44 PreReq: make, pcre, db 1.45 %if "%{with_fsl}" == "yes" 1.46 @@ -78,6 +77,10 @@ 1.47 BuildPreReq: sasl 1.48 PreReq: sasl 1.49 %endif 1.50 +%if "%{with_sqlite}" == "yes" 1.51 +BuildPreReq: sqlite 1.52 +PreReq: sqlite 1.53 +%endif 1.54 %if "%{with_mysql}" == "yes" 1.55 BuildPreReq: mysql 1.56 PreReq: mysql 1.57 @@ -94,8 +97,6 @@ 1.58 BuildPreReq: whoson 1.59 PreReq: whoson 1.60 %endif 1.61 -AutoReq: no 1.62 -AutoReqProv: no 1.63 Provides: MTA 1.64 Conflicts: exim, sendmail, ssmtp 1.65 1.66 @@ -111,6 +112,7 @@ 1.67 o PCRE matching support 1.68 o Optional STARTTLS encryption support (see package options) 1.69 o Optional SASL2 authentication support (see package options) 1.70 + o Optional SQLite dictionary support (see package options) 1.71 o Optional MySQL dictionary support (see package options) 1.72 o Optional PostgreSQL dictionary support (see package options) 1.73 o Optional OpenLDAP dictionary support (see package options) 1.74 @@ -129,7 +131,7 @@ 1.75 } 1.76 prog postfix:whoson = { 1.77 version = %{V_whoson} 1.78 - url = ftp://ftp.openpkg.org/sources/CPY/postfix/ 1.79 + url = http://download.openpkg.org/components/versioned/postfix/ 1.80 regex = postfix-(__VER__)-whoson.patch 1.81 } 1.82 1.83 @@ -142,15 +144,24 @@ 1.84 %patch -p0 1.85 ( cd pflogsumm-%{V_pflogsumm} && %{l_patch} -p0 -b <%{PATCH1} ) || exit $? 1.86 1.87 + # apply vendor WHOSON patch 1.88 +%if "%{with_whoson}" == "yes" 1.89 + %patch -p0 -P 2 1.90 +%endif 1.91 + 1.92 # remove OpenPKG privelege model incompatible exit conditions 1.93 %{l_shtool} subst \ 1.94 -e 's;msg_fatal\(.*attribute specifies mail system\);msg_info\1;g' \ 1.95 src/pipe/pipe.c 1.96 1.97 - # apply vendor WHOSON patch 1.98 -%if "%{with_whoson}" == "yes" 1.99 - %patch -p0 -P 2 1.100 -%endif 1.101 + # platform specific corrections 1.102 + case "%{l_platform -t}" in 1.103 + *-sunos5.11 ) 1.104 + %{l_shtool} subst \ 1.105 + -e 's;#define HAS_NISPLUS;#undef HAS_NISPLUS;' \ 1.106 + src/util/sys_defs.h 1.107 + ;; 1.108 + esac 1.109 1.110 %build 1.111 # configure Postfix (hard-core part I) 1.112 @@ -182,6 +193,10 @@ 1.113 AUXLIBS="$AUXLIBS -ldb" 1.114 CCARGS="$CCARGS -DHAS_PCRE" 1.115 AUXLIBS="$AUXLIBS -lpcre" 1.116 +%if "%{with_sqlite}" == "yes" 1.117 + CCARGS="$CCARGS -DHAS_SQLITE" 1.118 + AUXLIBS="$AUXLIBS -lsqlite3" 1.119 +%endif 1.120 %if "%{with_mysql}" == "yes" 1.121 CCARGS="$CCARGS -DHAS_MYSQL %{l_cppflags mysql .}" 1.122 AUXLIBS="$AUXLIBS %{l_ldflags mysql .} -lmysqlclient -lz -lm" 1.123 @@ -232,10 +247,9 @@ 1.124 src/util/sys_defs.h 1.125 1.126 # build Postfix 1.127 - %{l_make} %{l_mflags} 1.128 + %{l_make} %{l_mflags -O} 1.129 1.130 %install 1.131 - rm -rf $RPM_BUILD_ROOT 1.132 1.133 # perform standard installation procedure 1.134 %{l_shtool} subst -e "s;chown;true;" postfix-install 1.135 @@ -270,11 +284,6 @@ 1.136 main.cf master.cf main.cf.default; do 1.137 rm -f $RPM_BUILD_ROOT%{l_prefix}/etc/postfix/$cfg 1.138 done 1.139 - mv $RPM_BUILD_ROOT%{l_prefix}/etc/postfix/postfix-script \ 1.140 - $RPM_BUILD_ROOT%{l_prefix}/sbin/postfix-script 1.141 - rm -f $RPM_BUILD_ROOT%{l_prefix}/etc/postfix/postfix-script* 1.142 - mv $RPM_BUILD_ROOT%{l_prefix}/etc/postfix/post-install \ 1.143 - $RPM_BUILD_ROOT%{l_prefix}/sbin/postfix-install 1.144 1.145 # install default configuration 1.146 for name in `grep "^<file" %{SOURCE postfix.txt} | sed -e 's;^.*name=";;' -e 's;".*$;;'`; do 1.147 @@ -335,12 +344,12 @@ 1.148 '%attr(2755,%{l_musr},%{l_rgrp}) %{l_prefix}/sbin/{postdrop,postqueue}' \ 1.149 '%dir %attr(-,%{l_susr},%{l_mgrp}) %{l_prefix}/libexec/postfix' \ 1.150 '%dir %attr(-,%{l_susr},%{l_mgrp}) %{l_prefix}/var/postfix' \ 1.151 + '%dir %attr(-,%{l_susr},%{l_mgrp}) %{l_prefix}/var/postfix/pid' \ 1.152 '%dir %attr(-,%{l_musr},%{l_rgrp}) %{l_prefix}/var/postfix/{maildrop,public}' 1.153 1.154 %files -f files 1.155 1.156 %clean 1.157 - rm -rf $RPM_BUILD_ROOT 1.158 1.159 %pre 1.160 # before upgrade, save status and stop service 1.161 @@ -371,8 +380,8 @@ 1.162 rm -f $RPM_INSTALL_PREFIX/var/postfix/log/postfix.sum* >/dev/null 2>&1 || true 1.163 # remove generated configuration files 1.164 ( cd $RPM_INSTALL_PREFIX/etc/postfix && %{l_make} clean >/dev/null 2>&1; true ) || true 1.165 - # remove generated run-time files and directories 1.166 - rm -rf $RPM_INSTALL_PREFIX/etc/postfix/data/* 1.167 + # remove generated runtime files and directories 1.168 + rm -rf $RPM_INSTALL_PREFIX/var/postfix/data/* 1.169 rm -rf $RPM_INSTALL_PREFIX/var/postfix/pid/* 1.170 rm -rf $RPM_INSTALL_PREFIX/var/postfix/private/* 1.171 rm -rf $RPM_INSTALL_PREFIX/var/postfix/public/*