diff -r 3f80fa12b972 -r 09548e292fb1 dovecot/dovecot.spec
--- a/dovecot/dovecot.spec Wed Feb 08 20:16:40 2012 +0200
+++ b/dovecot/dovecot.spec Wed Feb 08 20:16:25 2012 +0200
@@ -1,6 +1,6 @@
##
## dovecot.spec -- OpenPKG RPM Package Specification
-## Copyright (c) 2000-2009 OpenPKG Foundation e.V.
+## Copyright (c) 2000-2012 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
@@ -21,20 +21,10 @@
## SUCH DAMAGE.
##
-# MSvB:
-# MSvB: Problem, dovecot is creating %{l_prefix}/var/lib
-# MSvB: ...and /opmi/var/dovecot/users/n ???
-# MSvB:
-
# package version
-%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
+%define V_major 2.0
+%define V_minor 18
+%define V_pigeonhole 0.2.6
# package information
Name: dovecot
@@ -47,13 +37,12 @@
Group: Mail
License: MIT+LGPL
Version: %{V_major}.%{V_minor}
-Release: 20091104
+Release: 20120208
# package options
%option with_fsl yes
-%option with_pam yes
%option with_sieve yes
-%option with_managesieve yes
+%option with_pam no
%option with_ldap no
%option with_mysql no
%option with_pgsql no
@@ -61,21 +50,19 @@
# list of sources
Source0: http://www.dovecot.org/releases/%{V_major}/dovecot-%{V_major}.%{V_minor}.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
+Source1: http://www.rename-it.nl/dovecot/%{V_major}/dovecot-%{V_major}-pigeonhole-%{V_pigeonhole}.tar.gz
+Source2: fsl.dovecot
+Source3: rc.dovecot
+Source4: dovecot.conf
Patch0: dovecot.patch
-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, x509
-BuildPreReq: libiconv, openssl
-PreReq: libiconv, openssl
+BuildPreReq: libiconv, openssl, zlib, bzip2
+PreReq: libiconv, openssl, zlib, bzip2
%if "%{with_fsl}" == "yes"
BuildPreReq: fsl
PreReq: fsl
@@ -84,8 +71,8 @@
BuildPreReq: openldap
PreReq: openldap
%endif
-%if "%{with_managesieve}" == "yes"
-BuildPreReq: gettext
+%if "%{with_sieve}" == "yes"
+BuildPreReq: gettext, autoconf, automake, libtool
PreReq: gettext
%endif
%if "%{with_pam}" == "yes"
@@ -117,22 +104,12 @@
prog dovecot = {
version = %{V_major}.%{V_minor}
url = http://www.dovecot.org/download.html
- regex = dovecot-(__VER__)\.tar\.gz
+ regex = dovecot-(\d+\.\d+(?:\.\d+))\.tar\.gz
}
prog dovecot:sieve = {
- version = %{V_sieve}
+ version = %{V_pigeonhole}
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_managesieve_base}-managesieve-(__VER__)\.diff\.gz
+ regex = dovecot-%{V_major}-pigeonhole-(__VER__)\.tar\.gz
}
%prep
@@ -140,13 +117,14 @@
%if "%{with_sieve}" == "yes"
%setup -q -T -D -a 1
%endif
-%if "%{with_managesieve}" == "yes"
- %setup -q -T -D -a 2
- %{l_gzip} -dc <%{PATCH1} | %{l_patch} -p1 -b
-%endif
%{l_sed} <%{PATCH0} %{l_value -s -a} | %{l_patch} -p0 -b
%build
+ # build Dovecot
+ %{l_shtool} subst \
+ -e 's;/usr/sbin/sendmail;%{l_prefix}/sbin/sendmail;g' \
+ src/config/all-settings.c \
+ src/lib-lda/lda-settings.c
cppflags="%{l_cppflags}"
ldflags="%{l_ldflags} %{l_fsl_ldflags}"
libs="%{l_fsl_libs}"
@@ -157,17 +135,11 @@
%if "%{with_mysql}" == "yes"
cppflags="$cppflags %{l_cppflags mysql}"
ldflags="$ldflags %{l_ldflags mysql}"
- sql_drivers="$sql_drivers,mysql"
%endif
%if "%{with_pgsql}" == "yes"
libs="$libs -lssl -lcrypto -lcrypt"
- sql_drivers="$sql_drivers,pgsql"
-%endif
-%if "%{with_sqlite}" == "yes"
- sql_drivers="$sql_drivers,sqlite"
%endif
sql_drivers=`echo "$sql_drivers" | sed 's;^,;;'`
-
CC="%{l_cc}" \
CFLAGS="%{l_cflags -O}" \
CPPFLAGS="$cppflags" \
@@ -176,12 +148,11 @@
./configure \
--prefix=%{l_prefix} \
--mandir=%{l_prefix}/man \
- --sysconfdir=%{l_prefix}/etc/dovecot \
+ --sysconfdir=%{l_prefix}/etc \
--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-docs \
@@ -192,7 +163,6 @@
%endif
%if "%{with_mysql}" == "yes" || "%{with_pgsql}" == "yes" || "%{with_sqlite}" == "yes"
--with-sql \
- --with-sql-drivers="$sql_drivers" \
%if "%{with_mysql}" == "yes"
--with-mysql \
%else
@@ -210,7 +180,6 @@
%endif
%else
--without-sql \
- --without-sql-drivers \
--without-mysql \
--without-pgsql \
--without-sqlite \
@@ -224,12 +193,14 @@
--without-gssapi \
--without-lucene \
--without-vpopmail \
+ --enable-shared \
--disable-static
%{l_make} %{l_mflags -O}
%if "%{with_sieve}" == "yes"
# build optional Dovecot LDA sieve plugin
- ( cd dovecot-%{V_sieve_base}-sieve-%{V_sieve}
+ ( cd dovecot-*-pigeonhole-*
+ ./autogen.sh
CC="%{l_cc}" \
CFLAGS="%{l_cflags -O}" \
CPPFLAGS="%{l_cppflags}" \
@@ -237,51 +208,33 @@
./configure \
--prefix=%{l_prefix} \
--mandir=%{l_prefix}/man \
- --with-dovecot=`pwd`/..
- %{l_make} %{l_mflags -O}
- ) || exit $?
-%endif
-%if "%{with_managesieve}" == "yes"
- # 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}" \
- ./configure \
- --prefix=%{l_prefix} \
- --mandir=%{l_prefix}/man \
- --with-dovecot-sieve=`pwd`/../dovecot-%{V_sieve_base}-sieve-%{V_sieve} \
- --with-dovecot=`pwd`/..
+ --with-dovecot=`pwd`/.. \
+ --with-managesieve
%{l_make} %{l_mflags -O}
) || exit $?
%endif
%install
+ # clean build cruft
rm -rf $RPM_BUILD_ROOT
- %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
+
+ # install Dovecot
+ %{l_make} %{l_mflags} install DESTDIR="$RPM_BUILD_ROOT"
%if "%{with_sieve}" == "yes"
# install optional Dovecot LDA sieve plugin
- ( cd dovecot-%{V_sieve_base}-sieve-%{V_sieve}
- %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
- ) || exit $?
-%endif
-%if "%{with_managesieve}" == "yes"
- # install optional Dovecot LDA managesieve daemon
- ( cd dovecot-%{V_managesieved_base}-managesieve-%{V_managesieved}
- %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
+ ( cd dovecot-*-pigeonhole-*
+ %{l_make} %{l_mflags} install DESTDIR="$RPM_BUILD_ROOT"
) || exit $?
%endif
# 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
%{l_shtool} install -c -m 755 %{l_value -s -a} \
@@ -289,13 +242,12 @@
$RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
# 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}/lib/dovecot/auth \
- $RPM_BUILD_ROOT%{l_prefix}/include/dovecot \
- $RPM_BUILD_ROOT%{l_prefix}/include \
- >/dev/null 2>&1 || true
+ rm -rf $RPM_BUILD_ROOT%{l_prefix}/etc/dovecot/dovecot
+ rm -f $RPM_BUILD_ROOT%{l_prefix}/etc/dovecot/README
+ rm -f $RPM_BUILD_ROOT%{l_prefix}/etc/dovecot/dovecot*example.conf
+ rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/dovecot
+ rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/dovecot/{,*}/*.a >/dev/null 2>&1 || true
+ rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/dovecot/{,*}/*.la >/dev/null 2>&1 || true
strip \
$RPM_BUILD_ROOT%{l_prefix}/sbin/* \
$RPM_BUILD_ROOT%{l_prefix}/libexec/dovecot/* \
@@ -304,7 +256,7 @@
# install default server configuration
%{l_shtool} mkdir -f -p -m 755 \
$RPM_BUILD_ROOT%{l_prefix}/etc/dovecot
- %{l_shtool} install -c -m 640 %{l_value -s -a} \
+ %{l_shtool} install -c -m 644 %{l_value -s -a} \
%{SOURCE dovecot.conf} \
$RPM_BUILD_ROOT%{l_prefix}/etc/dovecot/
@@ -320,15 +272,12 @@
'%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' \
- '%doc %{l_prefix}/share/dovecot/doc' \
- '%doc %{l_prefix}/share/dovecot/doc/wiki'
+ '%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'
%files -f files
@@ -347,7 +296,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