diff -r d6cbdf7bfcd7 -r 5aa32536e189 dovecot/dovecot.spec --- a/dovecot/dovecot.spec Sat May 23 16:09:22 2009 +0200 +++ b/dovecot/dovecot.spec Wed May 27 19:56:08 2009 +0200 @@ -23,10 +23,9 @@ # package version %define V_major 1.1 -%define V_minor 13 +%define V_minor 15 %define V_minor_sieve 6 -%define V_minor_managesieve 1 -%define V_managesieve 0.10.3 +%define V_managesieve 0.10.6 # package information Name: dovecot @@ -39,7 +38,7 @@ Group: Mail License: MIT+LGPL Version: %{V_major}.%{V_minor} -Release: 20090418 +Release: 20090521 # package options %option with_fsl yes @@ -55,10 +54,11 @@ # 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: fsl.dovecot -Source3: rc.dovecot +Source2: http://www.rename-it.nl/dovecot/%{V_major}/dovecot-%{V_major}-managesieve-%{V_managesieve}.tar.gz +Source3: fsl.dovecot +Source4: rc.dovecot Patch0: dovecot.patch -Patch1: http://www.rename-it.nl/dovecot/%{V_major}/dovecot-%{V_major}.%{V_minor_managesieve}-managesieve-%{V_managesieve}.diff.gz +Patch1: http://www.rename-it.nl/dovecot/%{V_major}/dovecot-%{V_major}.%{V_minor}-managesieve-%{V_managesieve}.diff.gz # build information Prefix: %{l_prefix} @@ -119,7 +119,7 @@ prog dovecot:managesieve = { version = %{V_managesieve} url = http://www.rename-it.nl/dovecot/%{V_major}/ - regex = dovecot-%{V_major}\.%{V_minor_managesieve}-managesieve-(__VER__)\.diff\.gz + regex = dovecot-%{V_major}-managesieve-(__VER__)\.tar\.gz } %prep @@ -127,15 +127,19 @@ %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 + %{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" - sleep 1 - %{l_gzip} -dc <%{PATCH1} | %{l_patch} -p1 -b - sleep 1 autoreconf -i --force || true %endif - -%build cppflags="%{l_cppflags}" ldflags="%{l_ldflags} %{l_fsl_ldflags}" libs="%{l_fsl_libs}" @@ -236,6 +240,22 @@ ) || exit $? %endif +%if "%{with_managesieve}" == "yes" + # build optional Dovecot managesieve package + ( cd dovecot-%{V_major}-managesieve-%{V_managesieve} + 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} + %{l_make} %{l_mflags -O} + ) || exit $? +%endif + %install rm -rf $RPM_BUILD_ROOT %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT @@ -247,6 +267,13 @@ ) || 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 + ) || 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