dovecot/dovecot.spec

changeset 239
d2e66a0e1aa8
parent 237
76b4896bea63
child 243
a306070c4f81
     1.1 --- a/dovecot/dovecot.spec	Thu Nov 05 18:05:07 2009 +0100
     1.2 +++ b/dovecot/dovecot.spec	Thu Nov 05 18:06:08 2009 +0100
     1.3 @@ -42,7 +42,7 @@
     1.4  Group:        Mail
     1.5  License:      MIT+LGPL
     1.6  Version:      %{V_major}.%{V_minor}
     1.7 -Release:      20091101
     1.8 +Release:      20091104
     1.9  
    1.10  #   package options
    1.11  %option       with_fsl          yes
    1.12 @@ -176,6 +176,7 @@
    1.13          --datadir=%{l_prefix}/share/dovecot \
    1.14          --docdir=%{l_prefix}/share/dovecot/doc \
    1.15          --with-rundir=%{l_prefix}/var/dovecot/run \
    1.16 +        --with-statedir=%{l_prefix}/var/dovecot/dat \
    1.17          --with-libiconv-prefix=%{l_prefix} \
    1.18          --with-ssl=openssl \
    1.19          --with-docs \
    1.20 @@ -218,7 +219,6 @@
    1.21          --without-gssapi \
    1.22          --without-lucene \
    1.23          --without-vpopmail \
    1.24 -        --enable-shared \
    1.25          --disable-static
    1.26      %{l_make} %{l_mflags -O}
    1.27  
    1.28 @@ -254,28 +254,29 @@
    1.29  
    1.30  %install
    1.31      rm -rf $RPM_BUILD_ROOT
    1.32 -    %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
    1.33 +    %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
    1.34  
    1.35  %if "%{with_sieve}" == "yes"
    1.36      #   install optional Dovecot LDA sieve plugin
    1.37      ( cd dovecot-%{V_sieve_base}-sieve-%{V_sieve}
    1.38 -      %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
    1.39 +      %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
    1.40      ) || exit $?
    1.41  %endif
    1.42  %if "%{with_managesieve}" == "yes"
    1.43      #   install optional Dovecot LDA managesieve daemon
    1.44      ( cd dovecot-%{V_managesieved_base}-managesieve-%{V_managesieved}
    1.45 -      %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
    1.46 +      %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
    1.47      ) || exit $?
    1.48  %endif
    1.49  
    1.50      #   create additional dirctories
    1.51      %{l_shtool} mkdir -f -p -m 755 \
    1.52          $RPM_BUILD_ROOT%{l_prefix}/etc/dovecot/ssl \
    1.53 +        $RPM_BUILD_ROOT%{l_prefix}/var/dovecot/dat \
    1.54          $RPM_BUILD_ROOT%{l_prefix}/var/dovecot/log \
    1.55          $RPM_BUILD_ROOT%{l_prefix}/var/dovecot/run/login
    1.56  
    1.57 -    #   install run-command script
    1.58 +    #   install runcommand script
    1.59      %{l_shtool} mkdir -f -p -m 755 \
    1.60          $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
    1.61      %{l_shtool} install -c -m 755 %{l_value -s -a} \
    1.62 @@ -286,6 +287,10 @@
    1.63      rm -f $RPM_BUILD_ROOT%{l_prefix}/etc/dovecot/dovecot*example.conf
    1.64      rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/dovecot/{,*}/*.la \
    1.65          >/dev/null 2>&1 || true
    1.66 +    rmdir $RPM_BUILD_ROOT%{l_prefix}/lib/dovecot/auth \
    1.67 +        $RPM_BUILD_ROOT%{l_prefix}/include/dovecot \
    1.68 +        $RPM_BUILD_ROOT%{l_prefix}/include \
    1.69 +        >/dev/null 2>&1 || true
    1.70      strip \
    1.71          $RPM_BUILD_ROOT%{l_prefix}/sbin/* \
    1.72          $RPM_BUILD_ROOT%{l_prefix}/libexec/dovecot/* \
    1.73 @@ -294,7 +299,7 @@
    1.74      #   install default server configuration
    1.75      %{l_shtool} mkdir -f -p -m 755 \
    1.76          $RPM_BUILD_ROOT%{l_prefix}/etc/dovecot
    1.77 -    %{l_shtool} install -c -m 644 %{l_value -s -a} \
    1.78 +    %{l_shtool} install -c -m 640 %{l_value -s -a} \
    1.79          %{SOURCE dovecot.conf} \
    1.80          $RPM_BUILD_ROOT%{l_prefix}/etc/dovecot/
    1.81  
    1.82 @@ -310,12 +315,13 @@
    1.83          '%not %dir %{l_prefix}/etc/fsl' \
    1.84          '%config %{l_prefix}/etc/fsl/fsl.dovecot' \
    1.85          '%config %attr(0600,%{l_musr},%{l_mgrp}) %{l_prefix}/etc/dovecot/*' \
    1.86 -        '%config %attr(0644,%{l_musr},%{l_rgrp}) %{l_prefix}/etc/dovecot/dovecot.conf' \
    1.87 +        '%config %attr(0640,%{l_musr},%{l_rgrp}) %{l_prefix}/etc/dovecot/dovecot.conf' \
    1.88          '%dir %attr(0700,%{l_susr},%{l_mgrp}) %{l_prefix}/etc/dovecot/ssl' \
    1.89 -        '%dir %attr(0755,%{l_susr},%{l_mgrp}) %{l_prefix}/var/dovecot' \
    1.90 -        '%dir %attr(0770,%{l_susr},%{l_rgrp}) %{l_prefix}/var/dovecot/log' \
    1.91 -        '%dir %attr(0755,%{l_susr},%{l_mgrp}) %{l_prefix}/var/dovecot/run' \
    1.92 -        '%dir %attr(0750,%{l_susr},%{l_mgrp}) %{l_prefix}/var/dovecot/run/login' \
    1.93 +        '%dir %attr(0755,%{l_musr},%{l_mgrp}) %{l_prefix}/var/dovecot' \
    1.94 +        '%dir %attr(0770,%{l_musr},%{l_rgrp}) %{l_prefix}/var/dovecot/dat' \
    1.95 +        '%dir %attr(0770,%{l_musr},%{l_rgrp}) %{l_prefix}/var/dovecot/log' \
    1.96 +        '%dir %attr(0750,%{l_musr},%{l_rgrp}) %{l_prefix}/var/dovecot/run' \
    1.97 +        '%dir %attr(0750,%{l_musr},%{l_ngrp}) %{l_prefix}/var/dovecot/run/login' \
    1.98          '%doc %{l_prefix}/share/dovecot/doc' \
    1.99          '%doc %{l_prefix}/share/dovecot/doc/wiki'
   1.100  
   1.101 @@ -336,6 +342,7 @@
   1.102      [ $1 -eq 0 ] || exit 0
   1.103      %{l_rc} dovecot stop 2>/dev/null
   1.104      rm -f $RPM_INSTALL_PREFIX/var/dovecot/*           >/dev/null 2>&1 || true
   1.105 +    rm -f $RPM_INSTALL_PREFIX/var/dovecot/dat/*       >/dev/null 2>&1 || true
   1.106      rm -f $RPM_INSTALL_PREFIX/var/dovecot/log/*       >/dev/null 2>&1 || true
   1.107      rm -f $RPM_INSTALL_PREFIX/var/dovecot/run/*       >/dev/null 2>&1 || true
   1.108      rm -f $RPM_INSTALL_PREFIX/var/dovecot/run/login/* >/dev/null 2>&1 || true

mercurial