53 %option with_sieve yes |
52 %option with_sieve yes |
54 |
53 |
55 # list of sources |
54 # list of sources |
56 Source0: http://www.dovecot.org/releases/%{V_major}/dovecot-%{V_major}.%{V_minor}.tar.gz |
55 Source0: http://www.dovecot.org/releases/%{V_major}/dovecot-%{V_major}.%{V_minor}.tar.gz |
57 Source1: http://www.dovecot.org/releases/sieve/dovecot-sieve-%{V_major}.%{V_minor_sieve}.tar.gz |
56 Source1: http://www.dovecot.org/releases/sieve/dovecot-sieve-%{V_major}.%{V_minor_sieve}.tar.gz |
58 Source2: fsl.dovecot |
57 Source2: http://www.rename-it.nl/dovecot/%{V_major}/dovecot-%{V_major}-managesieve-%{V_managesieve}.tar.gz |
59 Source3: rc.dovecot |
58 Source3: fsl.dovecot |
|
59 Source4: rc.dovecot |
60 Patch0: dovecot.patch |
60 Patch0: dovecot.patch |
61 Patch1: http://www.rename-it.nl/dovecot/%{V_major}/dovecot-%{V_major}.%{V_minor_managesieve}-managesieve-%{V_managesieve}.diff.gz |
61 Patch1: http://www.rename-it.nl/dovecot/%{V_major}/dovecot-%{V_major}.%{V_minor}-managesieve-%{V_managesieve}.diff.gz |
62 |
62 |
63 # build information |
63 # build information |
64 Prefix: %{l_prefix} |
64 Prefix: %{l_prefix} |
65 BuildRoot: %{l_buildroot} |
65 BuildRoot: %{l_buildroot} |
66 BuildPreReq: OpenPKG, openpkg >= 20060823 |
66 BuildPreReq: OpenPKG, openpkg >= 20060823 |
117 regex = dovecot-sieve-(%{V_major}(\.\d+)+)\.tar\.gz |
117 regex = dovecot-sieve-(%{V_major}(\.\d+)+)\.tar\.gz |
118 } |
118 } |
119 prog dovecot:managesieve = { |
119 prog dovecot:managesieve = { |
120 version = %{V_managesieve} |
120 version = %{V_managesieve} |
121 url = http://www.rename-it.nl/dovecot/%{V_major}/ |
121 url = http://www.rename-it.nl/dovecot/%{V_major}/ |
122 regex = dovecot-%{V_major}\.%{V_minor_managesieve}-managesieve-(__VER__)\.diff\.gz |
122 regex = dovecot-%{V_major}-managesieve-(__VER__)\.tar\.gz |
123 } |
123 } |
124 |
124 |
125 %prep |
125 %prep |
126 %setup -q |
126 %setup -q |
127 %if "%{with_sieve}" == "yes" |
127 %if "%{with_sieve}" == "yes" |
128 %setup -q -T -D -a 1 |
128 %setup -q -T -D -a 1 |
129 %endif |
129 %endif |
|
130 %if "%{with_managesieve}" == "yes" |
|
131 %setup -q -T -D -a 2 |
|
132 %{l_gzip} -dc <%{PATCH1} | %{l_patch} -p1 -b |
|
133 %{l_shtool} subst \ |
|
134 -e 's;/usr/\(libexec/dovecot/managesieve\);%{l_prefix}/\1;g' \ |
|
135 dovecot-example.conf |
|
136 %endif |
130 %{l_sed} <%{PATCH0} %{l_value -s -a} | %{l_patch} -p0 -b |
137 %{l_sed} <%{PATCH0} %{l_value -s -a} | %{l_patch} -p0 -b |
131 %if "%{with_managesieve}" == "yes" |
138 |
132 sleep 1 |
139 %build |
133 %{l_gzip} -dc <%{PATCH1} | %{l_patch} -p1 -b |
140 %if "%{with_managesieve}" == "yes" |
134 sleep 1 |
|
135 autoreconf -i --force || true |
141 autoreconf -i --force || true |
136 %endif |
142 %endif |
137 |
|
138 %build |
|
139 cppflags="%{l_cppflags}" |
143 cppflags="%{l_cppflags}" |
140 ldflags="%{l_ldflags} %{l_fsl_ldflags}" |
144 ldflags="%{l_ldflags} %{l_fsl_ldflags}" |
141 libs="%{l_fsl_libs}" |
145 libs="%{l_fsl_libs}" |
142 sql_drivers="" |
146 sql_drivers="" |
143 %if "%{with_ldap}" == "yes" |
147 %if "%{with_ldap}" == "yes" |
234 --with-dovecot=.. |
238 --with-dovecot=.. |
235 %{l_make} %{l_mflags -O} |
239 %{l_make} %{l_mflags -O} |
236 ) || exit $? |
240 ) || exit $? |
237 %endif |
241 %endif |
238 |
242 |
|
243 %if "%{with_managesieve}" == "yes" |
|
244 # build optional Dovecot managesieve package |
|
245 ( cd dovecot-%{V_major}-managesieve-%{V_managesieve} |
|
246 CC="%{l_cc}" \ |
|
247 CFLAGS="%{l_cflags -O}" \ |
|
248 CPPFLAGS="%{l_cppflags}" \ |
|
249 LDFLAGS="%{l_ldflags}" \ |
|
250 GREP="grep" \ |
|
251 ./configure \ |
|
252 --prefix=%{l_prefix} \ |
|
253 --with-dovecot=.. \ |
|
254 --with-dovecot-sieve=../dovecot-sieve-%{V_major}.%{V_minor_sieve} |
|
255 %{l_make} %{l_mflags -O} |
|
256 ) || exit $? |
|
257 %endif |
|
258 |
239 %install |
259 %install |
240 rm -rf $RPM_BUILD_ROOT |
260 rm -rf $RPM_BUILD_ROOT |
241 %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT |
261 %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT |
242 |
262 |
243 %if "%{with_sieve}" == "yes" |
263 %if "%{with_sieve}" == "yes" |
244 # install optional Dovecot LDA sieve plugin |
264 # install optional Dovecot LDA sieve plugin |
245 ( cd dovecot-sieve-%{V_major}.%{V_minor_sieve} |
265 ( cd dovecot-sieve-%{V_major}.%{V_minor_sieve} |
|
266 %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT |
|
267 ) || exit $? |
|
268 %endif |
|
269 |
|
270 %if "%{with_managesieve}" == "yes" |
|
271 # install optional Dovecot managesieve package |
|
272 ( cd dovecot-%{V_major}-managesieve-%{V_managesieve} |
246 %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT |
273 %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT |
247 ) || exit $? |
274 ) || exit $? |
248 %endif |
275 %endif |
249 |
276 |
250 # adjust file names of configuration files |
277 # adjust file names of configuration files |