1.1 --- a/dovecot/dovecot.spec Wed Feb 08 20:16:40 2012 +0200 1.2 +++ b/dovecot/dovecot.spec Wed Feb 08 20:16:25 2012 +0200 1.3 @@ -1,6 +1,6 @@ 1.4 ## 1.5 ## dovecot.spec -- OpenPKG RPM Package Specification 1.6 -## Copyright (c) 2000-2009 OpenPKG Foundation e.V. <http://openpkg.net/> 1.7 +## Copyright (c) 2000-2012 OpenPKG Foundation e.V. <http://openpkg.net/> 1.8 ## 1.9 ## Permission to use, copy, modify, and distribute this software for 1.10 ## any purpose with or without fee is hereby granted, provided that 1.11 @@ -21,20 +21,10 @@ 1.12 ## SUCH DAMAGE. 1.13 ## 1.14 1.15 -# MSvB: 1.16 -# MSvB: Problem, dovecot is creating %{l_prefix}/var/lib 1.17 -# MSvB: ...and /opmi/var/dovecot/users/n ??? 1.18 -# MSvB: 1.19 - 1.20 # package version 1.21 -%define V_major 1.2 1.22 -%define V_minor 6 1.23 -%define V_sieve_base 1.2 1.24 -%define V_sieve 0.1.13 1.25 -%define V_managesieve_base 1.2.6 1.26 -%define V_managesieve 0.11.9 1.27 -%define V_managesieved_base 1.2 1.28 -%define V_managesieved 0.11.9 1.29 +%define V_major 2.0 1.30 +%define V_minor 18 1.31 +%define V_pigeonhole 0.2.6 1.32 1.33 # package information 1.34 Name: dovecot 1.35 @@ -47,13 +37,12 @@ 1.36 Group: Mail 1.37 License: MIT+LGPL 1.38 Version: %{V_major}.%{V_minor} 1.39 -Release: 20091104 1.40 +Release: 20120208 1.41 1.42 # package options 1.43 %option with_fsl yes 1.44 -%option with_pam yes 1.45 %option with_sieve yes 1.46 -%option with_managesieve yes 1.47 +%option with_pam no 1.48 %option with_ldap no 1.49 %option with_mysql no 1.50 %option with_pgsql no 1.51 @@ -61,21 +50,19 @@ 1.52 1.53 # list of sources 1.54 Source0: http://www.dovecot.org/releases/%{V_major}/dovecot-%{V_major}.%{V_minor}.tar.gz 1.55 -Source1: http://www.rename-it.nl/dovecot/%{V_major}/dovecot-%{V_sieve_base}-sieve-%{V_sieve}.tar.gz 1.56 -Source2: http://www.rename-it.nl/dovecot/%{V_major}/dovecot-%{V_managesieved_base}-managesieve-%{V_managesieved}.tar.gz 1.57 -Source3: fsl.dovecot 1.58 -Source4: rc.dovecot 1.59 -Source5: dovecot.conf 1.60 +Source1: http://www.rename-it.nl/dovecot/%{V_major}/dovecot-%{V_major}-pigeonhole-%{V_pigeonhole}.tar.gz 1.61 +Source2: fsl.dovecot 1.62 +Source3: rc.dovecot 1.63 +Source4: dovecot.conf 1.64 Patch0: dovecot.patch 1.65 -Patch1: http://www.rename-it.nl/dovecot/%{V_major}/dovecot-%{V_managesieve_base}-managesieve-%{V_managesieve}.diff.gz 1.66 1.67 # build information 1.68 Prefix: %{l_prefix} 1.69 BuildRoot: %{l_buildroot} 1.70 BuildPreReq: OpenPKG, openpkg >= 20060823 1.71 PreReq: OpenPKG, openpkg >= 20060823, MTA, x509 1.72 -BuildPreReq: libiconv, openssl 1.73 -PreReq: libiconv, openssl 1.74 +BuildPreReq: libiconv, openssl, zlib, bzip2 1.75 +PreReq: libiconv, openssl, zlib, bzip2 1.76 %if "%{with_fsl}" == "yes" 1.77 BuildPreReq: fsl 1.78 PreReq: fsl 1.79 @@ -84,8 +71,8 @@ 1.80 BuildPreReq: openldap 1.81 PreReq: openldap 1.82 %endif 1.83 -%if "%{with_managesieve}" == "yes" 1.84 -BuildPreReq: gettext 1.85 +%if "%{with_sieve}" == "yes" 1.86 +BuildPreReq: gettext, autoconf, automake, libtool 1.87 PreReq: gettext 1.88 %endif 1.89 %if "%{with_pam}" == "yes" 1.90 @@ -117,22 +104,12 @@ 1.91 prog dovecot = { 1.92 version = %{V_major}.%{V_minor} 1.93 url = http://www.dovecot.org/download.html 1.94 - regex = dovecot-(__VER__)\.tar\.gz 1.95 + regex = dovecot-(\d+\.\d+(?:\.\d+))\.tar\.gz 1.96 } 1.97 prog dovecot:sieve = { 1.98 - version = %{V_sieve} 1.99 + version = %{V_pigeonhole} 1.100 url = http://www.rename-it.nl/dovecot/%{V_major}/ 1.101 - regex = dovecot-%{V_sieve_base}-sieve-(__VER__)\.tar\.gz 1.102 - } 1.103 - prog dovecot:managesieved = { 1.104 - version = %{V_managesieved} 1.105 - url = http://www.rename-it.nl/dovecot/%{V_major}/ 1.106 - regex = dovecot-%{V_managesieved_base}-managesieve-(__VER__)\.tar\.gz 1.107 - } 1.108 - prog dovecot:managesieve = { 1.109 - version = %{V_managesieve} 1.110 - url = http://www.rename-it.nl/dovecot/%{V_major}/ 1.111 - regex = dovecot-%{V_managesieve_base}-managesieve-(__VER__)\.diff\.gz 1.112 + regex = dovecot-%{V_major}-pigeonhole-(__VER__)\.tar\.gz 1.113 } 1.114 1.115 %prep 1.116 @@ -140,13 +117,14 @@ 1.117 %if "%{with_sieve}" == "yes" 1.118 %setup -q -T -D -a 1 1.119 %endif 1.120 -%if "%{with_managesieve}" == "yes" 1.121 - %setup -q -T -D -a 2 1.122 - %{l_gzip} -dc <%{PATCH1} | %{l_patch} -p1 -b 1.123 -%endif 1.124 %{l_sed} <%{PATCH0} %{l_value -s -a} | %{l_patch} -p0 -b 1.125 1.126 %build 1.127 + # build Dovecot 1.128 + %{l_shtool} subst \ 1.129 + -e 's;/usr/sbin/sendmail;%{l_prefix}/sbin/sendmail;g' \ 1.130 + src/config/all-settings.c \ 1.131 + src/lib-lda/lda-settings.c 1.132 cppflags="%{l_cppflags}" 1.133 ldflags="%{l_ldflags} %{l_fsl_ldflags}" 1.134 libs="%{l_fsl_libs}" 1.135 @@ -157,17 +135,11 @@ 1.136 %if "%{with_mysql}" == "yes" 1.137 cppflags="$cppflags %{l_cppflags mysql}" 1.138 ldflags="$ldflags %{l_ldflags mysql}" 1.139 - sql_drivers="$sql_drivers,mysql" 1.140 %endif 1.141 %if "%{with_pgsql}" == "yes" 1.142 libs="$libs -lssl -lcrypto -lcrypt" 1.143 - sql_drivers="$sql_drivers,pgsql" 1.144 -%endif 1.145 -%if "%{with_sqlite}" == "yes" 1.146 - sql_drivers="$sql_drivers,sqlite" 1.147 %endif 1.148 sql_drivers=`echo "$sql_drivers" | sed 's;^,;;'` 1.149 - 1.150 CC="%{l_cc}" \ 1.151 CFLAGS="%{l_cflags -O}" \ 1.152 CPPFLAGS="$cppflags" \ 1.153 @@ -176,12 +148,11 @@ 1.154 ./configure \ 1.155 --prefix=%{l_prefix} \ 1.156 --mandir=%{l_prefix}/man \ 1.157 - --sysconfdir=%{l_prefix}/etc/dovecot \ 1.158 + --sysconfdir=%{l_prefix}/etc \ 1.159 --with-ssldir=%{l_prefix}/etc/dovecot/ssl \ 1.160 --datadir=%{l_prefix}/share/dovecot \ 1.161 --docdir=%{l_prefix}/share/dovecot/doc \ 1.162 --with-rundir=%{l_prefix}/var/dovecot/run \ 1.163 - --with-statedir=%{l_prefix}/var/dovecot/dat \ 1.164 --with-libiconv-prefix=%{l_prefix} \ 1.165 --with-ssl=openssl \ 1.166 --with-docs \ 1.167 @@ -192,7 +163,6 @@ 1.168 %endif 1.169 %if "%{with_mysql}" == "yes" || "%{with_pgsql}" == "yes" || "%{with_sqlite}" == "yes" 1.170 --with-sql \ 1.171 - --with-sql-drivers="$sql_drivers" \ 1.172 %if "%{with_mysql}" == "yes" 1.173 --with-mysql \ 1.174 %else 1.175 @@ -210,7 +180,6 @@ 1.176 %endif 1.177 %else 1.178 --without-sql \ 1.179 - --without-sql-drivers \ 1.180 --without-mysql \ 1.181 --without-pgsql \ 1.182 --without-sqlite \ 1.183 @@ -224,12 +193,14 @@ 1.184 --without-gssapi \ 1.185 --without-lucene \ 1.186 --without-vpopmail \ 1.187 + --enable-shared \ 1.188 --disable-static 1.189 %{l_make} %{l_mflags -O} 1.190 1.191 %if "%{with_sieve}" == "yes" 1.192 # build optional Dovecot LDA sieve plugin 1.193 - ( cd dovecot-%{V_sieve_base}-sieve-%{V_sieve} 1.194 + ( cd dovecot-*-pigeonhole-* 1.195 + ./autogen.sh 1.196 CC="%{l_cc}" \ 1.197 CFLAGS="%{l_cflags -O}" \ 1.198 CPPFLAGS="%{l_cppflags}" \ 1.199 @@ -237,51 +208,33 @@ 1.200 ./configure \ 1.201 --prefix=%{l_prefix} \ 1.202 --mandir=%{l_prefix}/man \ 1.203 - --with-dovecot=`pwd`/.. 1.204 - %{l_make} %{l_mflags -O} 1.205 - ) || exit $? 1.206 -%endif 1.207 -%if "%{with_managesieve}" == "yes" 1.208 - # build optional Dovecot LDA managesieve daemon 1.209 - ( cd dovecot-%{V_managesieved_base}-managesieve-%{V_managesieved} 1.210 - CC="%{l_cc}" \ 1.211 - CFLAGS="%{l_cflags -O}" \ 1.212 - CPPFLAGS="%{l_cppflags}" \ 1.213 - LDFLAGS="%{l_ldflags}" \ 1.214 - ./configure \ 1.215 - --prefix=%{l_prefix} \ 1.216 - --mandir=%{l_prefix}/man \ 1.217 - --with-dovecot-sieve=`pwd`/../dovecot-%{V_sieve_base}-sieve-%{V_sieve} \ 1.218 - --with-dovecot=`pwd`/.. 1.219 + --with-dovecot=`pwd`/.. \ 1.220 + --with-managesieve 1.221 %{l_make} %{l_mflags -O} 1.222 ) || exit $? 1.223 %endif 1.224 1.225 %install 1.226 + # clean build cruft 1.227 rm -rf $RPM_BUILD_ROOT 1.228 - %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT 1.229 + 1.230 + # install Dovecot 1.231 + %{l_make} %{l_mflags} install DESTDIR="$RPM_BUILD_ROOT" 1.232 1.233 %if "%{with_sieve}" == "yes" 1.234 # install optional Dovecot LDA sieve plugin 1.235 - ( cd dovecot-%{V_sieve_base}-sieve-%{V_sieve} 1.236 - %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT 1.237 - ) || exit $? 1.238 -%endif 1.239 -%if "%{with_managesieve}" == "yes" 1.240 - # install optional Dovecot LDA managesieve daemon 1.241 - ( cd dovecot-%{V_managesieved_base}-managesieve-%{V_managesieved} 1.242 - %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT 1.243 + ( cd dovecot-*-pigeonhole-* 1.244 + %{l_make} %{l_mflags} install DESTDIR="$RPM_BUILD_ROOT" 1.245 ) || exit $? 1.246 %endif 1.247 1.248 # create additional dirctories 1.249 %{l_shtool} mkdir -f -p -m 755 \ 1.250 $RPM_BUILD_ROOT%{l_prefix}/etc/dovecot/ssl \ 1.251 - $RPM_BUILD_ROOT%{l_prefix}/var/dovecot/dat \ 1.252 $RPM_BUILD_ROOT%{l_prefix}/var/dovecot/log \ 1.253 $RPM_BUILD_ROOT%{l_prefix}/var/dovecot/run/login 1.254 1.255 - # install runcommand script 1.256 + # install run-command script 1.257 %{l_shtool} mkdir -f -p -m 755 \ 1.258 $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d 1.259 %{l_shtool} install -c -m 755 %{l_value -s -a} \ 1.260 @@ -289,13 +242,12 @@ 1.261 $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/ 1.262 1.263 # strip installation 1.264 - rm -f $RPM_BUILD_ROOT%{l_prefix}/etc/dovecot/dovecot*example.conf 1.265 - rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/dovecot/{,*}/*.la \ 1.266 - >/dev/null 2>&1 || true 1.267 - rmdir $RPM_BUILD_ROOT%{l_prefix}/lib/dovecot/auth \ 1.268 - $RPM_BUILD_ROOT%{l_prefix}/include/dovecot \ 1.269 - $RPM_BUILD_ROOT%{l_prefix}/include \ 1.270 - >/dev/null 2>&1 || true 1.271 + rm -rf $RPM_BUILD_ROOT%{l_prefix}/etc/dovecot/dovecot 1.272 + rm -f $RPM_BUILD_ROOT%{l_prefix}/etc/dovecot/README 1.273 + rm -f $RPM_BUILD_ROOT%{l_prefix}/etc/dovecot/dovecot*example.conf 1.274 + rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/dovecot 1.275 + rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/dovecot/{,*}/*.a >/dev/null 2>&1 || true 1.276 + rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/dovecot/{,*}/*.la >/dev/null 2>&1 || true 1.277 strip \ 1.278 $RPM_BUILD_ROOT%{l_prefix}/sbin/* \ 1.279 $RPM_BUILD_ROOT%{l_prefix}/libexec/dovecot/* \ 1.280 @@ -304,7 +256,7 @@ 1.281 # install default server configuration 1.282 %{l_shtool} mkdir -f -p -m 755 \ 1.283 $RPM_BUILD_ROOT%{l_prefix}/etc/dovecot 1.284 - %{l_shtool} install -c -m 640 %{l_value -s -a} \ 1.285 + %{l_shtool} install -c -m 644 %{l_value -s -a} \ 1.286 %{SOURCE dovecot.conf} \ 1.287 $RPM_BUILD_ROOT%{l_prefix}/etc/dovecot/ 1.288 1.289 @@ -320,15 +272,12 @@ 1.290 '%not %dir %{l_prefix}/etc/fsl' \ 1.291 '%config %{l_prefix}/etc/fsl/fsl.dovecot' \ 1.292 '%config %attr(0600,%{l_musr},%{l_mgrp}) %{l_prefix}/etc/dovecot/*' \ 1.293 - '%config %attr(0640,%{l_musr},%{l_rgrp}) %{l_prefix}/etc/dovecot/dovecot.conf' \ 1.294 + '%config %attr(0644,%{l_musr},%{l_rgrp}) %{l_prefix}/etc/dovecot/dovecot.conf' \ 1.295 '%dir %attr(0700,%{l_susr},%{l_mgrp}) %{l_prefix}/etc/dovecot/ssl' \ 1.296 - '%dir %attr(0755,%{l_musr},%{l_mgrp}) %{l_prefix}/var/dovecot' \ 1.297 - '%dir %attr(0770,%{l_musr},%{l_rgrp}) %{l_prefix}/var/dovecot/dat' \ 1.298 - '%dir %attr(0770,%{l_musr},%{l_rgrp}) %{l_prefix}/var/dovecot/log' \ 1.299 - '%dir %attr(0750,%{l_musr},%{l_rgrp}) %{l_prefix}/var/dovecot/run' \ 1.300 - '%dir %attr(0750,%{l_musr},%{l_ngrp}) %{l_prefix}/var/dovecot/run/login' \ 1.301 - '%doc %{l_prefix}/share/dovecot/doc' \ 1.302 - '%doc %{l_prefix}/share/dovecot/doc/wiki' 1.303 + '%dir %attr(0755,%{l_susr},%{l_mgrp}) %{l_prefix}/var/dovecot' \ 1.304 + '%dir %attr(0770,%{l_susr},%{l_rgrp}) %{l_prefix}/var/dovecot/log' \ 1.305 + '%dir %attr(0755,%{l_susr},%{l_mgrp}) %{l_prefix}/var/dovecot/run' \ 1.306 + '%dir %attr(0750,%{l_susr},%{l_mgrp}) %{l_prefix}/var/dovecot/run/login' 1.307 1.308 %files -f files 1.309 1.310 @@ -347,7 +296,6 @@ 1.311 [ $1 -eq 0 ] || exit 0 1.312 %{l_rc} dovecot stop 2>/dev/null 1.313 rm -f $RPM_INSTALL_PREFIX/var/dovecot/* >/dev/null 2>&1 || true 1.314 - rm -f $RPM_INSTALL_PREFIX/var/dovecot/dat/* >/dev/null 2>&1 || true 1.315 rm -f $RPM_INSTALL_PREFIX/var/dovecot/log/* >/dev/null 2>&1 || true 1.316 rm -f $RPM_INSTALL_PREFIX/var/dovecot/run/* >/dev/null 2>&1 || true 1.317 rm -f $RPM_INSTALL_PREFIX/var/dovecot/run/login/* >/dev/null 2>&1 || true