SPECS (DEVEL): courier-imap.spec - attempt to separate ssl and non...
glen
glen at pld-linux.org
Thu Mar 23 12:08:13 CET 2006
Author: glen Date: Thu Mar 23 11:08:13 2006 GMT
Module: SPECS Tag: DEVEL
---- Log message:
- attempt to separate ssl and non-ssl services
---- Files affected:
SPECS:
courier-imap.spec (1.158 -> 1.158.2.1)
---- Diffs:
================================================================
Index: SPECS/courier-imap.spec
diff -u SPECS/courier-imap.spec:1.158 SPECS/courier-imap.spec:1.158.2.1
--- SPECS/courier-imap.spec:1.158 Wed Mar 22 13:22:05 2006
+++ SPECS/courier-imap.spec Thu Mar 23 12:08:08 2006
@@ -6,7 +6,7 @@
Summary(pl): Serwer Courier-IMAP
Name: courier-imap
Version: 4.0.5
-Release: 1
+Release: 1.1
License: GPL
Group: Networking/Daemons
Source0: http://dl.sourceforge.net/courier/%{name}-%{version}.tar.bz2
@@ -35,13 +35,13 @@
BuildRequires: sysconftool
Requires(post,preun): /sbin/chkconfig
Requires: %{name}-common = %{version}-%{release}
-Requires: /sbin/chkconfig
Requires: pam >= 0.79.0
+Requires: procps
Requires: rc-scripts
-Provides: imapdaemon
-Obsoletes: imapdaemon
-Conflicts: cyrus-imapd
-Conflicts: imap
+#Provides: imapdaemon
+#Obsoletes: imapdaemon
+#Conflicts: cyrus-imapd
+#Conflicts: imap
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%define _libexecdir /usr/%{_lib}/courier-imap
@@ -55,15 +55,72 @@
%description -l pl
Courier-IMAP jest serwerem IMAP dla skrzynek pocztowych Maildir.
+%package ssl
+Summary: Courier-IMAP SSL server
+Summary(pl): Serwer Courier-IMAP SSL
+Group: Networking/Daemons
+Requires(post,preun): /sbin/chkconfig
+Requires: %{name}-common = %{version}-%{release}
+Requires: pam >= 0.79.0
+Requires: procps
+Requires: rc-scripts
+
+%description ssl
+Courier-IMAP is an IMAP server for Maildir mailboxes.
+
+%description ssl -l pl
+Courier-IMAP jest serwerem IMAP dla skrzynek pocztowych Maildir.
+
+%package pop3
+Summary: Courier-IMAP POP3 Server
+Summary(pl): Serwer Courier-IMAP POP3
+Group: Networking/Daemons
+Requires(post,preun): /sbin/chkconfig
+Requires: %{name}-common = %{version}-%{release}
+Requires: pam >= 0.77.3
+Requires: procps
+Requires: rc-scripts
+#Provides: pop3daemon
+#Obsoletes: pop3daemon
+#Conflicts: cyrus-imapd
+#Conflicts: imap-pop3
+#Conflicts: solid-pop3d
+#Conflicts: tpop3d
+
+%description pop3
+Courier-IMAP POP3 is an POP3 server for Maildir mailboxes.
+
+%description pop3 -l pl
+Courier-IMAP POP3 jest serwerem POP3 dla skrzynek pocztowych Maildir.
+
+%package pop3-ssl
+Summary: Courier-IMAP POP3 SSL Server
+Summary(pl): Serwer Courier-IMAP POP3 SSL
+Group: Networking/Daemons
+Requires(post,preun): /sbin/chkconfig
+Requires: %{name}-common = %{version}-%{release}
+Requires: pam >= 0.77.3
+Requires: procps
+Requires: rc-scripts
+#Provides: pop3daemon
+#Obsoletes: pop3daemon
+#Conflicts: cyrus-imapd
+#Conflicts: imap-pop3
+#Conflicts: solid-pop3d
+#Conflicts: tpop3d
+
+%description pop3-ssl
+Courier-IMAP POP3 SSL is an POP3 server for Maildir mailboxes.
+
+%description pop3-ssl -l pl
+Courier-IMAP POP3 SSL jest serwerem POP3 dla skrzynek pocztowych
+Maildir.
+
%package common
Summary: Common files for imap and pop3 daemons
Summary(pl): Pliki wspólne dla serwerów imap i pop3
Group: Networking/Daemons
-Requires(post,preun): /sbin/chkconfig
-Requires: /sbin/chkconfig
Requires: courier-authlib
-Requires: procps
-Requires: rc-scripts
%description common
Common files for imap and pop3 daemons.
@@ -97,25 +154,6 @@
Maildirmake jest narzędziem do tworzenia folderów pocztowych w
formacie Maildir.
-%package pop3
-Summary: Courier-IMAP POP3 Server
-Summary(pl): Serwer Courier-IMAP POP3
-Group: Networking/Daemons
-Requires: %{name}-common = %{version}-%{release}
-Requires: pam >= 0.77.3
-Provides: pop3daemon
-Obsoletes: pop3daemon
-Conflicts: cyrus-imapd
-Conflicts: imap-pop3
-Conflicts: solid-pop3d
-Conflicts: tpop3d
-
-%description pop3
-Courier-IMAP POP3 is an POP3 server for Maildir mailboxes.
-
-%description pop3 -l pl
-Courier-IMAP POP3 jest serwerem POP3 dla skrzynek pocztowych Maildir.
-
%prep
%setup -q
%patch0 -p1
@@ -131,23 +169,22 @@
install %{SOURCE4} courier-pop3-ssl.in
%build
-
# Change Makefile.am files and force recreate Makefile.in's.
OLDDIR=`pwd`
find -type f -a \( -name configure.in -o -name configure.ac \) | while read FILE; do
- cd "`dirname "$FILE"`"
+ cd "`dirname "$FILE"`"
- if [ -f Makefile.am ]; then
- sed -i -e '/_[L]DFLAGS=-static/d' Makefile.am
- fi
-
- %{__libtoolize}
- %{__aclocal}
- %{__autoconf}
- %{__autoheader}
- %{__automake}
+ if [ -f Makefile.am ]; then
+ sed -i -e '/_[L]DFLAGS=-static/d' Makefile.am
+ fi
+
+ %{__libtoolize}
+ %{__aclocal}
+ %{__autoconf}
+ %{__autoheader}
+ %{__automake}
- cd "$OLDDIR"
+ cd "$OLDDIR"
done
%configure \
@@ -200,61 +237,102 @@
%post
/sbin/chkconfig --add courier-imap
-/sbin/chkconfig --add courier-imap-ssl
%service courier-imap restart "courier-imap daemon"
+
+%post ssl
+/sbin/chkconfig --add courier-imap-ssl
%service courier-imap-ssl restart "courier-imap-ssl daemon"
+%post pop3
+/sbin/chkconfig --add courier-pop3
+/sbin/chkconfig --del courier-imap-pop3 >/dev/null 2>&1 || :
+if [ -f /var/lock/subsys/courier-imap-pop3 ]; then
+ /sbin/service courier-imap-pop3 stop >&2
+ /sbin/service courier-pop3 start >&2
+else
+ %service courier-pop3 restart "courier-pop3 daemon"
+fi
+
+%post pop3-ssl
+/sbin/chkconfig --add courier-pop3-ssl
+%service courier-pop3-ssl restart "courier-pop3-ssl daemon"
+
%preun
if [ "$1" = "0" ]; then
%service courier-imap stop
/sbin/chkconfig --del courier-imap
fi
+%preun ssl
if [ "$1" = "0" ]; then
%service courier-imap-ssl stop
/sbin/chkconfig --del courier-imap-ssl
fi
+%preun pop3
+if [ "$1" = "0" ]; then
+ %service courier-pop3 stop
+ /sbin/chkconfig --del courier-pop3
+fi
-%triggerin -- %{name} < 3.0.5
+%preun pop3-ssl
+if [ "$1" = "0" ]; then
+ %service courier-pop3-ssl stop
+ /sbin/chkconfig --del courier-pop3-ssl
+fi
+
+# FIXME: i'm afraid the triggers do not work. i don't have packages available to test (too lazy to build old revisions)
+%triggerpostun ssl -- %{name} < 3.0.5
if [ -f /var/lib/openssl/certs/imapd.pem ]; then
+ mv -f /var/lib/openssl/certs/imapd.pem %{_certsdir}
echo
- echo imapd.pem has been moved automatically to %{_certsdir}
+ echo "imapd.pem has been moved automatically to %{_certsdir}"
echo
- mv -f /var/lib/openssl/certs/imapd.pem %{_certsdir}
fi
-if [ -f /etc/sysconfig/courier-imap ]; then
- . /etc/sysconfig/courier-imap
- for opt in `grep ^[^#] /etc/sysconfig/courier-imap |grep -v TLS_CERTFILE |grep -v MAILDIR |grep -v COURIERTLS |cut -d= -f1`;
- do
+if [ -f /etc/sysconfig/courier-imap.rpmsave ]; then
+ . /etc/sysconfig/courier-imap.rpmsave
+ for opt in `grep ^[^#] /etc/sysconfig/courier-imap.rpmsave | egrep -v '(TLS_CERTFILE|MAILDIR|COURIERTLS)' | cut -d= -f1`; do
eval opt2=\$$opt
- sed -i s/^$opt=.*/"$opt=\"$opt2\""/ %{_sysconfdir}/imapd
sed -i s/^$opt=.*/"$opt=\"$opt2\""/ %{_sysconfdir}/imapd-ssl
done
sed -i s/^SSLADDRESS=.*/"SSLADDRESS=$ADDRESS_SSL"/ %{_sysconfdir}/imapd-ssl
sed -i s/^SSLPORT=.*/"SSLPORT=$PORTS_SSL"/ %{_sysconfdir}/imapd-ssl
sed -i s!^MAILDIRPATH=.*!"MAILDIRPATH=\"$MAILDIR\""! %{_sysconfdir}/imapd-ssl
+ echo
+ echo IMAPD config file has been rewriten to %{_sysconfdir}/imapd-ssl
+ echo please look at them
+ echo
+fi
+%service -q courier-imap-ssl restart
+
+%triggerpostun -- %{name} < 3.0.5
+if [ -f /etc/sysconfig/courier-imap.rpmsave ]; then
+ . /etc/sysconfig/courier-imap.rpmsave
+ for opt in `grep ^[^#] /etc/sysconfig/courier-imap.rpmsave | egrep -v '(TLS_CERTFILE|MAILDIR|COURIERTLS)' | cut -d= -f1`; do
+ eval opt2=\$$opt
+ sed -i s/^$opt=.*/"$opt=\"$opt2\""/ %{_sysconfdir}/imapd
+ done
sed -i s!^MAILDIRPATH=.*!"MAILDIRPATH=\"$MAILDIR\""! %{_sysconfdir}/imapd
echo
- echo IMAPD config file has been rewriten to %{_sysconfdir}/imapd,imapd-ssl
+ echo IMAPD config file has been rewriten to %{_sysconfdir}/imapd
echo please look at them
echo
fi
%service -q courier-imap restart
-%triggerin -- %{name} < 3.0.6
+%triggerpostun ssl -- %{name} < 3.0.6
. %{_sysconfdir}/imapd-ssl
if [ $TLS_CACHEFILE = "/var/couriersslcache" ]; then
sed -i s/^TLS_CACHEFILE=.*/"TLS_CACHEFILE=\/var\/spool\/courier-imap\/couriersslcache"/ %{_sysconfdir}/imapd-ssl
fi
-%triggerin -n %{name}-common -- %{name}-userdb
+%triggerin common -- %{name}-userdb
echo
echo courier-imap-userdb is obsolete
echo install courier-authlib-userdb package
echo
-%triggerin -n %{name}-common -- %{name}-common < 3.0.5
+%triggerin common -- %{name}-common < 3.0.5
/sbin/chkconfig --del authdaemon
if [ -f /var/lock/subsys/authdaemon ]; then
kill `cat /var/lib/authdaemon/pid`
@@ -270,27 +348,7 @@
echo - certificates directory has changed to %{_certsdir}
echo
-%post pop3
-/sbin/chkconfig --add courier-pop3
-/sbin/chkconfig --add courier-pop3-ssl
-/sbin/chkconfig --del courier-imap-pop3 >/dev/null 2>&1 || :
-if [ -f /var/lock/subsys/courier-imap-pop3 ]; then
- /sbin/service courier-imap-pop3 stop >&2
- /sbin/service courier-pop3 start >&2
-else
- %service courier-pop3 restart "courier-pop3 daemon"
-fi
-%service courier-pop3-ssl restart "courier-pop3-ssl daemon"
-
-%preun pop3
-if [ "$1" = "0" ]; then
- %service courier-pop3 stop
- /sbin/chkconfig --del courier-pop3
- %service courier-pop3-ssl stop
- /sbin/chkconfig --del courier-pop3-ssl
-fi
-
-%triggerin -n %{name}-pop3 -- %{name}-pop3 < 3.0.5
+%triggerin pop3 -- %{name}-pop3 < 3.0.5
if [ -f /var/lib/openssl/certs/pop3d.pem ]; then
echo
echo pop3d.pem has been moved automatically to %{_certsdir}
@@ -314,7 +372,7 @@
fi
%service courier-pop3 restart
-%triggerin -n %{name}-pop3 -- %{name}-pop3 < 3.0.6
+%triggerin pop3 -- %{name}-pop3 < 3.0.6
. %{_sysconfdir}/pop3d-ssl
if [ $TLS_CACHEFILE = "/var/couriersslcache" ]; then
sed -i s/^TLS_CACHEFILE=.*/"TLS_CACHEFILE=\/var\/spool\/courier-imap\/couriersslcache"/ %{_sysconfdir}/pop3d-ssl
@@ -322,14 +380,12 @@
%files
%defattr(644,root,root,755)
-%doc maildir/README.sharedfolders.html imap/README.proxy tcpd/README.couriertls
+%doc maildir/README.sharedfolders.html imap/README.proxy
%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/imap
%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/security/blacklist.imap
%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/imapd
-%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/imapd-ssl
%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/imapd.cnf
%attr(754,root,root) /etc/rc.d/init.d/courier-imap
-%attr(754,root,root) /etc/rc.d/init.d/courier-imap-ssl
%attr(755,daemon,daemon) %dir %{_sysconfdir}/shared
%attr(755,daemon,daemon) %dir %{_sysconfdir}/shared.tmp
%attr(755,root,root) %{_bindir}/imapd
@@ -340,11 +396,36 @@
%attr(755,root,root) %{_sbindir}/sharedindexinstall
%attr(755,root,root) %{_sbindir}/sharedindexsplit
%attr(755,root,root) %{_libexecdir}/imapd.rc
-%attr(755,root,root) %{_libexecdir}/imapd-ssl.rc
%{_mandir}/man8/imapd*
%{_mandir}/man1/maildiracl.1*
%{_mandir}/man1/maildirkw.1*
+%files ssl
+%defattr(644,root,root,755)
+%doc tcpd/README.couriertls
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/imapd-ssl
+%attr(754,root,root) /etc/rc.d/init.d/courier-imap-ssl
+%attr(755,root,root) %{_libexecdir}/imapd-ssl.rc
+
+%files pop3
+%defattr(644,root,root,755)
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/pop3
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/security/blacklist.pop3
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/pop3d
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/pop3d.cnf
+%attr(754,root,root) /etc/rc.d/init.d/courier-pop3
+%attr(755,root,root) %{_bindir}/pop3d
+%attr(755,root,root) %{_sbindir}/mkpop3dcert
+%attr(755,root,root) %{_sbindir}/pop3login
+%attr(755,root,root) %{_libexecdir}/pop3d.rc
+%{_mandir}/man8/courierpop*
+
+%files pop3-ssl
+%defattr(644,root,root,755)
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/pop3d-ssl
+%attr(754,root,root) /etc/rc.d/init.d/courier-pop3-ssl
+%attr(755,root,root) %{_libexecdir}/pop3d-ssl.rc
+
%files common
%defattr(644,root,root,755)
%doc AUTHORS ChangeLog imap/BUGS INSTALL README*
@@ -370,28 +451,15 @@
%attr(755,root,root) %{_bindir}/maildirmake
%{_mandir}/man1/maildirmake*
-%files pop3
-%defattr(644,root,root,755)
-%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/pop3
-%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/security/blacklist.pop3
-%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/pop3d
-%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/pop3d-ssl
-%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/pop3d.cnf
-%attr(754,root,root) /etc/rc.d/init.d/courier-pop3
-%attr(754,root,root) /etc/rc.d/init.d/courier-pop3-ssl
-%attr(755,root,root) %{_bindir}/pop3d
-%attr(755,root,root) %{_sbindir}/mkpop3dcert
-%attr(755,root,root) %{_sbindir}/pop3login
-%attr(755,root,root) %{_libexecdir}/pop3d.rc
-%attr(755,root,root) %{_libexecdir}/pop3d-ssl.rc
-%{_mandir}/man8/courierpop*
-
%define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
%changelog
* %{date} PLD Team <feedback at pld-linux.org>
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.158.2.1 2006/03/23 11:08:08 glen
+- attempt to separate ssl and non-ssl services
+
Revision 1.158 2006/03/22 12:22:05 glen
- rel 1
================================================================
---- CVS-web:
http://cvs.pld-linux.org/SPECS/courier-imap.spec?r1=1.158&r2=1.158.2.1&f=u
More information about the pld-cvs-commit
mailing list