diff -r 8b89c85ab535 -r 76b4896bea63 dovecot/dovecot.spec --- a/dovecot/dovecot.spec Tue Nov 03 16:05:28 2009 +0100 +++ b/dovecot/dovecot.spec Thu Nov 05 13:42:13 2009 +0100 @@ -1,6 +1,6 @@ ## ## dovecot.spec -- OpenPKG RPM Package Specification -## Copyright (c) 2000-2008 OpenPKG Foundation e.V. +## Copyright (c) 2000-2009 OpenPKG Foundation e.V. ## ## Permission to use, copy, modify, and distribute this software for ## any purpose with or without fee is hereby granted, provided that @@ -22,10 +22,14 @@ ## # package version -%define V_major 1.1 -%define V_minor 15 -%define V_minor_sieve 6 -%define V_managesieve 0.10.6 +%define V_major 1.2 +%define V_minor 6 +%define V_sieve_base 1.2 +%define V_sieve 0.1.13 +%define V_managesieve_base 1.2.6 +%define V_managesieve 0.11.9 +%define V_managesieved_base 1.2 +%define V_managesieved 0.11.9 # package information Name: dovecot @@ -38,33 +42,33 @@ Group: Mail License: MIT+LGPL Version: %{V_major}.%{V_minor} -Release: 20090521 +Release: 20091101 # package options %option with_fsl yes %option with_pam yes +%option with_sieve yes +%option with_managesieve yes %option with_ldap no %option with_mysql no %option with_pgsql no %option with_sqlite no -%option with_pop3d no -%option with_managesieve no -%option with_sieve yes # list of sources Source0: http://www.dovecot.org/releases/%{V_major}/dovecot-%{V_major}.%{V_minor}.tar.gz -Source1: http://www.dovecot.org/releases/sieve/dovecot-sieve-%{V_major}.%{V_minor_sieve}.tar.gz -Source2: http://www.rename-it.nl/dovecot/%{V_major}/dovecot-%{V_major}-managesieve-%{V_managesieve}.tar.gz +Source1: http://www.rename-it.nl/dovecot/%{V_major}/dovecot-%{V_sieve_base}-sieve-%{V_sieve}.tar.gz +Source2: http://www.rename-it.nl/dovecot/%{V_major}/dovecot-%{V_managesieved_base}-managesieve-%{V_managesieved}.tar.gz Source3: fsl.dovecot Source4: rc.dovecot +Source5: dovecot.conf Patch0: dovecot.patch -Patch1: http://www.rename-it.nl/dovecot/%{V_major}/dovecot-%{V_major}.%{V_minor}-managesieve-%{V_managesieve}.diff.gz +Patch1: http://www.rename-it.nl/dovecot/%{V_major}/dovecot-%{V_managesieve_base}-managesieve-%{V_managesieve}.diff.gz # build information Prefix: %{l_prefix} BuildRoot: %{l_buildroot} BuildPreReq: OpenPKG, openpkg >= 20060823 -PreReq: OpenPKG, openpkg >= 20060823, MTA +PreReq: OpenPKG, openpkg >= 20060823, MTA, x509 BuildPreReq: libiconv, openssl PreReq: libiconv, openssl %if "%{with_fsl}" == "yes" @@ -76,7 +80,6 @@ PreReq: openldap %endif %if "%{with_managesieve}" == "yes" -BuildPreReq: autoconf, automake, pkgconfig, libtool BuildPreReq: gettext PreReq: gettext %endif @@ -109,17 +112,22 @@ prog dovecot = { version = %{V_major}.%{V_minor} url = http://www.dovecot.org/download.html - regex = dovecot-(1\.1(\.\d+)+)\.tar\.gz + regex = dovecot-(__VER__)\.tar\.gz } prog dovecot:sieve = { - version = %{V_major}.%{V_minor_sieve} - url = http://www.dovecot.org/download.html - regex = dovecot-sieve-(%{V_major}(\.\d+)+)\.tar\.gz + version = %{V_sieve} + url = http://www.rename-it.nl/dovecot/%{V_major}/ + regex = dovecot-%{V_sieve_base}-sieve-(__VER__)\.tar\.gz + } + prog dovecot:managesieved = { + version = %{V_managesieved} + url = http://www.rename-it.nl/dovecot/%{V_major}/ + regex = dovecot-%{V_managesieved_base}-managesieve-(__VER__)\.tar\.gz } prog dovecot:managesieve = { version = %{V_managesieve} url = http://www.rename-it.nl/dovecot/%{V_major}/ - regex = dovecot-%{V_major}-managesieve-(__VER__)\.tar\.gz + regex = dovecot-%{V_managesieve_base}-managesieve-(__VER__)\.diff\.gz } %prep @@ -130,16 +138,10 @@ %if "%{with_managesieve}" == "yes" %setup -q -T -D -a 2 %{l_gzip} -dc <%{PATCH1} | %{l_patch} -p1 -b - %{l_shtool} subst \ - -e 's;/usr/\(libexec/dovecot/managesieve\);%{l_prefix}/\1;g' \ - dovecot-example.conf %endif %{l_sed} <%{PATCH0} %{l_value -s -a} | %{l_patch} -p0 -b %build -%if "%{with_managesieve}" == "yes" - autoreconf -i --force || true -%endif cppflags="%{l_cppflags}" ldflags="%{l_ldflags} %{l_fsl_ldflags}" libs="%{l_fsl_libs}" @@ -166,18 +168,16 @@ CPPFLAGS="$cppflags" \ LDFLAGS="$ldflags" \ LIBS="$libs" \ - GREP="grep" \ ./configure \ --prefix=%{l_prefix} \ + --mandir=%{l_prefix}/man \ --sysconfdir=%{l_prefix}/etc/dovecot \ --with-ssldir=%{l_prefix}/etc/dovecot/ssl \ --datadir=%{l_prefix}/share/dovecot \ --docdir=%{l_prefix}/share/dovecot/doc \ --with-rundir=%{l_prefix}/var/dovecot/run \ - --with-statedir=%{l_prefix}/var/dovecot/dat \ --with-libiconv-prefix=%{l_prefix} \ --with-ssl=openssl \ - --with-deliver \ --with-docs \ %if "%{with_ldap}" == "yes" --with-ldap \ @@ -214,122 +214,108 @@ %else --without-pam \ %endif -%if "%{with_pop3d}" == "yes" - --with-pop3d \ -%else - --without-pop3d \ -%endif --without-gc \ --without-gssapi \ --without-lucene \ - --without-vpopmail + --without-vpopmail \ + --enable-shared \ + --disable-static %{l_make} %{l_mflags -O} %if "%{with_sieve}" == "yes" # build optional Dovecot LDA sieve plugin - ( cd dovecot-sieve-%{V_major}.%{V_minor_sieve} + ( cd dovecot-%{V_sieve_base}-sieve-%{V_sieve} CC="%{l_cc}" \ CFLAGS="%{l_cflags -O}" \ CPPFLAGS="%{l_cppflags}" \ LDFLAGS="%{l_ldflags}" \ - GREP="grep" \ ./configure \ --prefix=%{l_prefix} \ - --with-dovecot=.. + --mandir=%{l_prefix}/man \ + --with-dovecot=`pwd`/.. %{l_make} %{l_mflags -O} ) || exit $? %endif - %if "%{with_managesieve}" == "yes" - # build optional Dovecot managesieve package - ( cd dovecot-%{V_major}-managesieve-%{V_managesieve} + # build optional Dovecot LDA managesieve daemon + ( cd dovecot-%{V_managesieved_base}-managesieve-%{V_managesieved} CC="%{l_cc}" \ CFLAGS="%{l_cflags -O}" \ CPPFLAGS="%{l_cppflags}" \ LDFLAGS="%{l_ldflags}" \ - GREP="grep" \ ./configure \ --prefix=%{l_prefix} \ - --with-dovecot=.. \ - --with-dovecot-sieve=../dovecot-sieve-%{V_major}.%{V_minor_sieve} + --mandir=%{l_prefix}/man \ + --with-dovecot-sieve=`pwd`/../dovecot-%{V_sieve_base}-sieve-%{V_sieve} \ + --with-dovecot=`pwd`/.. %{l_make} %{l_mflags -O} ) || exit $? %endif %install rm -rf $RPM_BUILD_ROOT - %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT + %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT" %if "%{with_sieve}" == "yes" # install optional Dovecot LDA sieve plugin - ( cd dovecot-sieve-%{V_major}.%{V_minor_sieve} - %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT + ( cd dovecot-%{V_sieve_base}-sieve-%{V_sieve} + %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT" ) || exit $? %endif - %if "%{with_managesieve}" == "yes" - # install optional Dovecot managesieve package - ( cd dovecot-%{V_major}-managesieve-%{V_managesieve} - %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT + # install optional Dovecot LDA managesieve daemon + ( cd dovecot-%{V_managesieved_base}-managesieve-%{V_managesieved} + %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT" ) || exit $? %endif - # adjust file names of configuration files - ( cd $RPM_BUILD_ROOT%{l_prefix}/etc/dovecot - for i in dovecot dovecot-db dovecot-ldap dovecot-sql; do - mv ${i}{-example,}.conf - done - ) || exit $? - # create additional dirctories %{l_shtool} mkdir -f -p -m 755 \ $RPM_BUILD_ROOT%{l_prefix}/etc/dovecot/ssl \ - $RPM_BUILD_ROOT%{l_prefix}/var/dovecot/dat \ $RPM_BUILD_ROOT%{l_prefix}/var/dovecot/log \ $RPM_BUILD_ROOT%{l_prefix}/var/dovecot/run/login - # install runcommand script + # install run-command script %{l_shtool} mkdir -f -p -m 755 \ $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d -%if "%{with_pop3d}" == "yes" - cmd='/<\/\{0,1\}with_pop3d>/d' -%else - cmd='//,/<\/with_pop3d>/d' -%endif %{l_shtool} install -c -m 755 %{l_value -s -a} \ - -e "$cmd" \ %{SOURCE rc.dovecot} \ $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/ - # install OSSP fsl configuration - %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/etc/fsl - %{l_shtool} install -c -m 644 %{l_value -s -a} \ - %{SOURCE fsl.dovecot} \ - $RPM_BUILD_ROOT%{l_prefix}/etc/fsl/ - # strip installation + rm -f $RPM_BUILD_ROOT%{l_prefix}/etc/dovecot/dovecot*example.conf rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/dovecot/{,*}/*.la \ >/dev/null 2>&1 || true - rmdir $RPM_BUILD_ROOT%{l_prefix}/include/dovecot \ - $RPM_BUILD_ROOT%{l_prefix}/include \ - >/dev/null 2>&1 || true strip \ $RPM_BUILD_ROOT%{l_prefix}/sbin/* \ $RPM_BUILD_ROOT%{l_prefix}/libexec/dovecot/* \ >/dev/null 2>&1 || true + # install default server configuration + %{l_shtool} mkdir -f -p -m 755 \ + $RPM_BUILD_ROOT%{l_prefix}/etc/dovecot + %{l_shtool} install -c -m 644 %{l_value -s -a} \ + %{SOURCE dovecot.conf} \ + $RPM_BUILD_ROOT%{l_prefix}/etc/dovecot/ + + # install OSSP fsl configuration + %{l_shtool} mkdir -f -p -m 755 \ + $RPM_BUILD_ROOT%{l_prefix}/etc/fsl + %{l_shtool} install -c -m 644 %{l_value -s -a} \ + %{SOURCE fsl.dovecot} \ + $RPM_BUILD_ROOT%{l_prefix}/etc/fsl/ + # generate file list %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} \ '%not %dir %{l_prefix}/etc/fsl' \ '%config %{l_prefix}/etc/fsl/fsl.dovecot' \ '%config %attr(0600,%{l_musr},%{l_mgrp}) %{l_prefix}/etc/dovecot/*' \ - '%config %attr(0640,%{l_musr},%{l_rgrp}) %{l_prefix}/etc/dovecot/dovecot.conf' \ + '%config %attr(0644,%{l_musr},%{l_rgrp}) %{l_prefix}/etc/dovecot/dovecot.conf' \ '%dir %attr(0700,%{l_susr},%{l_mgrp}) %{l_prefix}/etc/dovecot/ssl' \ - '%dir %attr(0755,%{l_musr},%{l_mgrp}) %{l_prefix}/var/dovecot' \ - '%dir %attr(0770,%{l_musr},%{l_rgrp}) %{l_prefix}/var/dovecot/dat' \ - '%dir %attr(0770,%{l_musr},%{l_rgrp}) %{l_prefix}/var/dovecot/log' \ - '%dir %attr(0750,%{l_musr},%{l_rgrp}) %{l_prefix}/var/dovecot/run' \ - '%dir %attr(0750,%{l_musr},%{l_ngrp}) %{l_prefix}/var/dovecot/run/login' \ + '%dir %attr(0755,%{l_susr},%{l_mgrp}) %{l_prefix}/var/dovecot' \ + '%dir %attr(0770,%{l_susr},%{l_rgrp}) %{l_prefix}/var/dovecot/log' \ + '%dir %attr(0755,%{l_susr},%{l_mgrp}) %{l_prefix}/var/dovecot/run' \ + '%dir %attr(0750,%{l_susr},%{l_mgrp}) %{l_prefix}/var/dovecot/run/login' \ '%doc %{l_prefix}/share/dovecot/doc' \ '%doc %{l_prefix}/share/dovecot/doc/wiki' @@ -350,7 +336,6 @@ [ $1 -eq 0 ] || exit 0 %{l_rc} dovecot stop 2>/dev/null rm -f $RPM_INSTALL_PREFIX/var/dovecot/* >/dev/null 2>&1 || true - rm -f $RPM_INSTALL_PREFIX/var/dovecot/dat/* >/dev/null 2>&1 || true rm -f $RPM_INSTALL_PREFIX/var/dovecot/log/* >/dev/null 2>&1 || true rm -f $RPM_INSTALL_PREFIX/var/dovecot/run/* >/dev/null 2>&1 || true rm -f $RPM_INSTALL_PREFIX/var/dovecot/run/login/* >/dev/null 2>&1 || true