]> git.pld-linux.org Git - packages/courier.git/blobdiff - courier.spec
- update webapp triggers due apache1 package split
[packages/courier.git] / courier.spec
index 5ec792dde188d0edd94ce51b774e1972fef2273f..eeb6774d04cc032be1678fc8464016bebfb8027d 100644 (file)
@@ -1,6 +1,7 @@
 # TODO
 # - test and bump rel. to 1
 # - doesn't -webadmin need webserver integration?
+# - use rc-scripts here in %%post scriptlets
 #
 # Conditional build:
 %bcond_without fam             # with fam support
@@ -10,11 +11,10 @@ Summary:    Courier mail server
 Summary(pl):   Serwer poczty Courier
 Name:          courier
 Version:       0.52.2
-Release:       1
+Release:       2
 License:       GPL
 Group:         Networking/Daemons
-# !!! Don't change it !!!
-Source0:       http://heanet.dl.sourceforge.net/sourceforge/courier/%{name}-%{version}.tar.bz2
+Source0:       http://dl.sourceforge.net/courier/%{name}-%{version}.tar.bz2
 # Source0-md5: 73cda41adc5425ade94e1f9005b2218b
 Patch0:                %{name}-openssl-path.patch
 Patch1:                %{name}-withoutfam.patch
@@ -44,6 +44,7 @@ BuildRequires:        rpmbuild(macros) >= 1.268
 BuildRequires: sed >= 4.0
 BuildRequires: sysconftool
 Requires(post,preun):  /sbin/chkconfig
+Requires(post,preun):  rc-scripts
 # only for light upgrade from old version < 0.47
 # remove it after some time
 Requires(post):        courier-authlib-userdb
@@ -163,8 +164,8 @@ Summary(pl):        Panel administracyjny przez HTTP dla Couriera
 Group:         Networking/Daemons
 Requires:      %{name} = %{version}-%{release}
 Requires:      FHS >= 2.3-12
-Requires:      webserver = apache
 Requires:      webapps
+Requires:      webserver = apache
 Conflicts:     apache-base < 2.2.0-8
 Conflicts:     apache1 < 1.3.34-5.11
 
@@ -181,8 +182,8 @@ Summary(pl):        Zintegrowany serwer poczty przez HTTP (webmail) do Couriera
 Group:         Networking/Daemons
 Requires:      %{name} = %{version}-%{release}
 Requires:      FHS >= 2.3-12
-Requires:      webserver = apache
 Requires:      webapps
+Requires:      webserver = apache
 Conflicts:     apache-base < 2.2.0-8
 Conflicts:     apache1 < 1.3.34-5.11
 
@@ -335,7 +336,7 @@ install -d -p $RPM_BUILD_ROOT{/etc/{cron.hourly,pam.d},%{_initrddir}} \
 rm -f $RPM_BUILD_ROOT%{_sysconfdir}/*.authpam
 for X in imap esmtp pop3 webmail calendar
 do
-       cat > $RPM_BUILD_ROOT/etc/pam.d/$X <<EOF
+       cat > $RPM_BUILD_ROOT/etc/pam.d/$X <<'EOF'
 #%PAM-1.0
 auth   required        pam_unix.so shadow nullok
 account        required        pam_unix.so
@@ -446,45 +447,36 @@ echo Directory with certificates has changed to %{_certsdir}
 echo
 
 %post
-/sbin/chkconfig --add courier
-
 if [ "$1" = "1" ]; then
-       /bin/hostname -f > /etc/courier/me
-       # TODO: use %banner
-       cat <<EOF
+       [ -s %{_sysconfdir}/me ] || /bin/hostname -f > %{_sysconfdir}/me
+       %banner -e %{name} <<'EOF'
 
 Now courier will refuse to accept SMTP messages except to localhost
-add hosts to /etc/courier/esmtpacceptmailfor.dir/default
+add hosts to %{_sysconfdir}/esmtpacceptmailfor.dir/default
 run makeacceptmailfor
 
-Add hosts to /etc/courier/locals you want to accept mail for
+Add hosts to %{_sysconfdir}/locals you want to accept mail for
 run makealiases
 
 Enter user, who should receive mail for root, mailer-daemon and postmaster
-into /etc/courier/aliases/system
+into %{_sysconfdir}/aliases/system
 
 Default maildir is in ~/Mail/Maildir
 
 EOF
 fi
 
-if [ -e /var/lock/subsys/courier ]; then
-       %{_initrddir}/courier restart
-else
-       echo
-       echo 'Type "%{_initrddir}/courier start" to start courier'
-       echo
-fi
+/sbin/chkconfig --add courier
+%service courier restart
 
 %preun
 if [ "$1" = "0" ]; then
-       if [ -e /var/lock/subsys/courier ]; then
-               %{_initrddir}/courier stop
-       fi
+       %service courier stop
        /sbin/chkconfig --del courier
 fi
 
 %post imapd
+# TODO: use rc-scripts here
 if [ -e %{_localstatedir}/tmp/imapd.pid ]; then
        %{_sbindir}/imapd stop
        %{_sbindir}/imapd start
@@ -570,16 +562,16 @@ if [ "$1" = "0" ]; then
        fi
 fi
 
-%triggerin webmail -- apache1
+%triggerin webmail -- apache1 < 1.3.37-3, apache1-base
 %webapp_register apache courier-webmail
 
-%triggerun webmail -- apache1
+%triggerun webmail -- apache1 < 1.3.37-3, apache1-base
 %webapp_unregister apache courier-webmail
 
-%triggerin webmail -- apache >= 2.0.0
+%triggerin webmail -- apache < 2.2.0, apache-base
 %webapp_register httpd courier-webmail
 
-%triggerun webmail -- apache >= 2.0.0
+%triggerun webmail -- apache < 2.2.0, apache-base
 %webapp_unregister httpd courier-webmail
 
 %triggerpostun webmail -- courier-webmail < 0.52.2-0.2
@@ -666,7 +658,7 @@ fi
 %attr(644,daemon,daemon) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/locals
 %attr(644,daemon,daemon) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/courierd
 %attr(640,daemon,daemon) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/aliases/system
-%attr(644,root,root) %{_sysconfdir}/quotawarnmsg.example
+%{_sysconfdir}/quotawarnmsg.example
 %dir %{_libdir}
 %dir %{_libdir}/courier
 %dir %{_datadir}
@@ -773,7 +765,7 @@ fi
 %attr(755,root,root) %{_bindir}/testmxlookup
 %attr(640,daemon,daemon) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ldapaliasrc
 %attr(700,daemon,daemon) %{_sbindir}/courierldapaliasd
-%attr(644,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/esmtp
+%config(noreplace) %verify(not md5 mtime size) /etc/pam.d/esmtp
 %attr(754,root,root) /etc/rc.d/init.d/courier
 %attr(755,daemon,daemon) %dir %{_sysconfdir}/shared
 %attr(755,daemon,daemon) %dir %{_sysconfdir}/shared.tmp
@@ -783,7 +775,7 @@ fi
 %files pop3d
 %defattr(644,root,root,755)
 %doc htmldoc/*pop3d*
-%attr(644,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/pop3
+%config(noreplace) %verify(not md5 mtime size) /etc/pam.d/pop3
 %{_mandir}/man8/courierpop3d.8*
 %{_mandir}/man8/courierpop3login.8*
 %{_mandir}/man8/mkpop3dcert.8*
@@ -805,11 +797,11 @@ fi
 %files imapd
 %defattr(644,root,root,755)
 %doc htmldoc/*imapd*
-%attr(644,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/imap
+%config(noreplace) %verify(not md5 mtime size) /etc/pam.d/imap
 %{_mandir}/man8/imapd.8*
 %{_mandir}/man8/mkimapdcert.8*
 %attr(755,root,root) %{_datadir}/courierwebadmin/admin-40imap.pl
-%attr(644,root,root) %{_datadir}/courierwebadmin/admin-40imap.html
+%{_datadir}/courierwebadmin/admin-40imap.html
 %attr(644,daemon,daemon) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/imapd
 %attr(644,daemon,daemon) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/imapd-ssl
 %attr(600,daemon,daemon) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/imapd.cnf
@@ -851,8 +843,8 @@ fi
 %defattr(644,root,root,755)
 %doc htmldoc/pcp* gpglib/README.html
 %attr(755,root,root) %{_cgibindir}/webmail
-%attr(644,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/webmail
-%attr(644,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/calendar
+%config(noreplace) %verify(not md5 mtime size) /etc/pam.d/webmail
+%config(noreplace) %verify(not md5 mtime size) /etc/pam.d/calendar
 %attr(644,daemon,daemon) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/sqwebmaild
 %attr(755,root,root) %{_sbindir}/webmaild
 %dir %{_datadir}/sqwebmail
This page took 0.080792 seconds and 4 git commands to generate.