| 46 %option with_sqlite no |
46 %option with_sqlite no |
| 47 %option with_mysql no |
47 %option with_mysql no |
| 48 %option with_pgsql no |
48 %option with_pgsql no |
| 49 %option with_ldap no |
49 %option with_ldap no |
| 50 %option with_whoson no |
50 %option with_whoson no |
| |
51 %option with_spfsrs no |
| 51 %option with_fdsetsize no |
52 %option with_fdsetsize no |
| 52 |
53 |
| 53 # list of sources |
54 # list of sources |
| 54 Source0: ftp://ftp.porcupine.org/mirrors/postfix-release/official/postfix-%{V_postfix}.tar.gz |
55 Source0: ftp://ftp.porcupine.org/mirrors/postfix-release/official/postfix-%{V_postfix}.tar.gz |
| 55 Source1: http://jimsun.linxnet.com/downloads/pflogsumm-%{V_pflogsumm}.tar.gz |
56 Source1: http://jimsun.linxnet.com/downloads/pflogsumm-%{V_pflogsumm}.tar.gz |
| 57 Source3: fsl.postfix |
58 Source3: fsl.postfix |
| 58 Source4: rc.postfix |
59 Source4: rc.postfix |
| 59 Patch0: postfix.patch |
60 Patch0: postfix.patch |
| 60 Patch1: postfix.patch.pfls |
61 Patch1: postfix.patch.pfls |
| 61 Patch2: http://download.openpkg.org/components/versioned/postfix/postfix-%{V_whoson}-whoson.patch |
62 Patch2: http://download.openpkg.org/components/versioned/postfix/postfix-%{V_whoson}-whoson.patch |
| |
63 Patch3: postfix-srs.patch |
| 62 |
64 |
| 63 # build information |
65 # build information |
| 64 BuildPreReq: OpenPKG, openpkg >= 20100101, perl, gcc |
66 BuildPreReq: OpenPKG, openpkg >= 20100101, perl, gcc |
| 65 PreReq: OpenPKG, openpkg >= 20100101, perl, procmail, perl-time |
67 PreReq: OpenPKG, openpkg >= 20100101, perl, procmail, perl-time |
| 66 BuildPreReq: make, pcre, db |
68 BuildPreReq: make, pcre, db |
| 115 o Optional SQLite dictionary support (see package options) |
121 o Optional SQLite dictionary support (see package options) |
| 116 o Optional MySQL dictionary support (see package options) |
122 o Optional MySQL dictionary support (see package options) |
| 117 o Optional PostgreSQL dictionary support (see package options) |
123 o Optional PostgreSQL dictionary support (see package options) |
| 118 o Optional OpenLDAP dictionary support (see package options) |
124 o Optional OpenLDAP dictionary support (see package options) |
| 119 o Optional WHOSON dictionary support (see package options) |
125 o Optional WHOSON dictionary support (see package options) |
| |
126 o Optional SPF SRS protection support (see package options) |
| 120 |
127 |
| 121 %track |
128 %track |
| 122 prog postfix = { |
129 prog postfix = { |
| 123 version = %{V_postfix} |
130 version = %{V_postfix} |
| 124 url = ftp://ftp.porcupine.org/mirrors/postfix-release/official/ |
131 url = ftp://ftp.porcupine.org/mirrors/postfix-release/official/ |
| 132 prog postfix:whoson = { |
139 prog postfix:whoson = { |
| 133 version = %{V_whoson} |
140 version = %{V_whoson} |
| 134 url = http://download.openpkg.org/components/versioned/postfix/ |
141 url = http://download.openpkg.org/components/versioned/postfix/ |
| 135 regex = postfix-(__VER__)-whoson.patch |
142 regex = postfix-(__VER__)-whoson.patch |
| 136 } |
143 } |
| |
144 prog postfix:spfsrs = { |
| |
145 version = %{V_spfsrs} |
| |
146 url = http://www.codefrickler.de/srs/ |
| |
147 regex = postfix-srs-(__VER__).patch |
| |
148 } |
| 137 |
149 |
| 138 %prep |
150 %prep |
| 139 # unpack distribution files |
151 # unpack distribution files |
| 140 %setup -q |
152 %setup -q |
| 141 %setup -q -T -D -a 1 |
153 %setup -q -T -D -a 1 |
| 145 ( cd pflogsumm-%{V_pflogsumm} && %{l_patch} -p0 -b <%{PATCH1} ) || exit $? |
157 ( cd pflogsumm-%{V_pflogsumm} && %{l_patch} -p0 -b <%{PATCH1} ) || exit $? |
| 146 |
158 |
| 147 # apply vendor WHOSON patch |
159 # apply vendor WHOSON patch |
| 148 %if "%{with_whoson}" == "yes" |
160 %if "%{with_whoson}" == "yes" |
| 149 %patch -p0 -P 2 |
161 %patch -p0 -P 2 |
| |
162 %endif |
| |
163 |
| |
164 # apply vendor SPF SRS patch |
| |
165 %if "%{with_spfsrs}" == "yes" |
| |
166 %patch -p0 -P 3 |
| 150 %endif |
167 %endif |
| 151 |
168 |
| 152 # remove OpenPKG privelege model incompatible exit conditions |
169 # remove OpenPKG privelege model incompatible exit conditions |
| 153 %{l_shtool} subst \ |
170 %{l_shtool} subst \ |
| 154 -e 's;msg_fatal\(.*attribute specifies mail system\);msg_info\1;g' \ |
171 -e 's;msg_fatal\(.*attribute specifies mail system\);msg_info\1;g' \ |
| 227 %endif |
244 %endif |
| 228 %if "%{with_fsl}" == "yes" |
245 %if "%{with_fsl}" == "yes" |
| 229 AUXLIBS="$AUXLIBS %{l_fsl_ldflags} %{l_fsl_libs}" |
246 AUXLIBS="$AUXLIBS %{l_fsl_ldflags} %{l_fsl_libs}" |
| 230 CCARGS="$CCARGS -DUSE_SOFTLIMITONLY" |
247 CCARGS="$CCARGS -DUSE_SOFTLIMITONLY" |
| 231 %endif |
248 %endif |
| |
249 %if "%{with_spfsrs}" == "yes" |
| |
250 CCARGS="$CCARGS -DHAS_SRS" |
| |
251 AUXLIBS="$AUXLIBS -lsrs2" |
| |
252 %endif |
| 232 %if "%{with_fdsetsize}" != "no" |
253 %if "%{with_fdsetsize}" != "no" |
| 233 %if "%{with_fdsetsize}" == "yes" |
254 %if "%{with_fdsetsize}" == "yes" |
| 234 CCARGS="$CCARGS -DFD_SETSIZE=1024" |
255 CCARGS="$CCARGS -DFD_SETSIZE=1024" |
| 235 %else |
256 %else |
| 236 CCARGS="$CCARGS -DFD_SETSIZE=%{with_fdsetsize}" |
257 CCARGS="$CCARGS -DFD_SETSIZE=%{with_fdsetsize}" |