dovecot/dovecot.spec

changeset 204
5aa32536e189
parent 187
0cbfb8a2de97
child 237
76b4896bea63
     1.1 --- a/dovecot/dovecot.spec	Sat May 23 16:09:22 2009 +0200
     1.2 +++ b/dovecot/dovecot.spec	Wed May 27 19:56:08 2009 +0200
     1.3 @@ -23,10 +23,9 @@
     1.4  
     1.5  #   package version
     1.6  %define       V_major             1.1
     1.7 -%define       V_minor             13
     1.8 +%define       V_minor             15
     1.9  %define       V_minor_sieve       6
    1.10 -%define       V_minor_managesieve 1
    1.11 -%define       V_managesieve       0.10.3
    1.12 +%define       V_managesieve       0.10.6
    1.13  
    1.14  #   package information
    1.15  Name:         dovecot
    1.16 @@ -39,7 +38,7 @@
    1.17  Group:        Mail
    1.18  License:      MIT+LGPL
    1.19  Version:      %{V_major}.%{V_minor}
    1.20 -Release:      20090418
    1.21 +Release:      20090521
    1.22  
    1.23  #   package options
    1.24  %option       with_fsl          yes
    1.25 @@ -55,10 +54,11 @@
    1.26  #   list of sources
    1.27  Source0:      http://www.dovecot.org/releases/%{V_major}/dovecot-%{V_major}.%{V_minor}.tar.gz
    1.28  Source1:      http://www.dovecot.org/releases/sieve/dovecot-sieve-%{V_major}.%{V_minor_sieve}.tar.gz
    1.29 -Source2:      fsl.dovecot
    1.30 -Source3:      rc.dovecot
    1.31 +Source2:      http://www.rename-it.nl/dovecot/%{V_major}/dovecot-%{V_major}-managesieve-%{V_managesieve}.tar.gz
    1.32 +Source3:      fsl.dovecot
    1.33 +Source4:      rc.dovecot
    1.34  Patch0:       dovecot.patch
    1.35 -Patch1:       http://www.rename-it.nl/dovecot/%{V_major}/dovecot-%{V_major}.%{V_minor_managesieve}-managesieve-%{V_managesieve}.diff.gz
    1.36 +Patch1:       http://www.rename-it.nl/dovecot/%{V_major}/dovecot-%{V_major}.%{V_minor}-managesieve-%{V_managesieve}.diff.gz
    1.37  
    1.38  #   build information
    1.39  Prefix:       %{l_prefix}
    1.40 @@ -119,7 +119,7 @@
    1.41      prog dovecot:managesieve = {
    1.42          version   = %{V_managesieve}
    1.43          url       = http://www.rename-it.nl/dovecot/%{V_major}/
    1.44 -        regex     = dovecot-%{V_major}\.%{V_minor_managesieve}-managesieve-(__VER__)\.diff\.gz
    1.45 +        regex     = dovecot-%{V_major}-managesieve-(__VER__)\.tar\.gz
    1.46      }
    1.47  
    1.48  %prep
    1.49 @@ -127,15 +127,19 @@
    1.50  %if "%{with_sieve}" == "yes"
    1.51      %setup -q -T -D -a 1
    1.52  %endif
    1.53 +%if "%{with_managesieve}" == "yes"
    1.54 +    %setup -q -T -D -a 2
    1.55 +    %{l_gzip} -dc <%{PATCH1} | %{l_patch} -p1 -b
    1.56 +    %{l_shtool} subst \
    1.57 +        -e 's;/usr/\(libexec/dovecot/managesieve\);%{l_prefix}/\1;g' \
    1.58 +        dovecot-example.conf
    1.59 +%endif
    1.60      %{l_sed} <%{PATCH0} %{l_value -s -a} | %{l_patch} -p0 -b
    1.61 +
    1.62 +%build
    1.63  %if "%{with_managesieve}" == "yes"
    1.64 -    sleep 1
    1.65 -    %{l_gzip} -dc <%{PATCH1} | %{l_patch} -p1 -b
    1.66 -    sleep 1
    1.67      autoreconf -i --force || true
    1.68  %endif
    1.69 -
    1.70 -%build
    1.71      cppflags="%{l_cppflags}"
    1.72      ldflags="%{l_ldflags} %{l_fsl_ldflags}"
    1.73      libs="%{l_fsl_libs}"
    1.74 @@ -236,6 +240,22 @@
    1.75      ) || exit $?
    1.76  %endif
    1.77  
    1.78 +%if "%{with_managesieve}" == "yes"
    1.79 +    #   build optional Dovecot managesieve package
    1.80 +    ( cd dovecot-%{V_major}-managesieve-%{V_managesieve}
    1.81 +      CC="%{l_cc}" \
    1.82 +      CFLAGS="%{l_cflags -O}" \
    1.83 +      CPPFLAGS="%{l_cppflags}" \
    1.84 +      LDFLAGS="%{l_ldflags}" \
    1.85 +      GREP="grep" \
    1.86 +      ./configure \
    1.87 +          --prefix=%{l_prefix} \
    1.88 +          --with-dovecot=.. \
    1.89 +          --with-dovecot-sieve=../dovecot-sieve-%{V_major}.%{V_minor_sieve}
    1.90 +      %{l_make} %{l_mflags -O}
    1.91 +    ) || exit $?
    1.92 +%endif
    1.93 +
    1.94  %install
    1.95      rm -rf $RPM_BUILD_ROOT
    1.96      %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
    1.97 @@ -247,6 +267,13 @@
    1.98      ) || exit $?
    1.99  %endif
   1.100  
   1.101 +%if "%{with_managesieve}" == "yes"
   1.102 +    #   install optional Dovecot managesieve package
   1.103 +    ( cd dovecot-%{V_major}-managesieve-%{V_managesieve}
   1.104 +      %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
   1.105 +    ) || exit $?
   1.106 +%endif
   1.107 +
   1.108      #   adjust file names of configuration files
   1.109      ( cd $RPM_BUILD_ROOT%{l_prefix}/etc/dovecot
   1.110        for i in dovecot dovecot-db dovecot-ldap dovecot-sql; do

mercurial