dovecot/dovecot.spec

changeset 204
5aa32536e189
parent 187
0cbfb8a2de97
child 237
76b4896bea63
equal deleted inserted replaced
5:f97cb7afd707 6:6274093980b6
21 ## SUCH DAMAGE. 21 ## SUCH DAMAGE.
22 ## 22 ##
23 23
24 # package version 24 # package version
25 %define V_major 1.1 25 %define V_major 1.1
26 %define V_minor 13 26 %define V_minor 15
27 %define V_minor_sieve 6 27 %define V_minor_sieve 6
28 %define V_minor_managesieve 1 28 %define V_managesieve 0.10.6
29 %define V_managesieve 0.10.3
30 29
31 # package information 30 # package information
32 Name: dovecot 31 Name: dovecot
33 Summary: IMAP4 & POP3 Server 32 Summary: IMAP4 & POP3 Server
34 URL: http://www.dovecot.org/ 33 URL: http://www.dovecot.org/
37 Distribution: OpenPKG Community 36 Distribution: OpenPKG Community
38 Class: EVAL 37 Class: EVAL
39 Group: Mail 38 Group: Mail
40 License: MIT+LGPL 39 License: MIT+LGPL
41 Version: %{V_major}.%{V_minor} 40 Version: %{V_major}.%{V_minor}
42 Release: 20090418 41 Release: 20090521
43 42
44 # package options 43 # package options
45 %option with_fsl yes 44 %option with_fsl yes
46 %option with_pam yes 45 %option with_pam yes
47 %option with_ldap no 46 %option with_ldap no
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

mercurial