X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=courier-imap.spec;h=dfdc46bba3d641c406474aaea11348e42355d11c;hb=3ef803b4068c2caad09d87b958b3bd24e101a281;hp=3d3aa59ff60fbf10b634dc4b8ca9a3b185a72e30;hpb=4da6c341488fa7644c6edec8690d1a5e511dfc8a;p=packages%2Fcourier-imap.git diff --git a/courier-imap.spec b/courier-imap.spec index 3d3aa59..dfdc46b 100644 --- a/courier-imap.spec +++ b/courier-imap.spec @@ -1,16 +1,19 @@ +# TODO: +# - put imap-ssl and pop3-ssl to separate packages - some want to have +# ssl-only system (or non-ssl only system) +# see also http://thread.gmane.org/gmane.linux.pld.devel.english/2509/focus=2509 # -%bcond_with toplevel # Allow toplevel folders - # More info: http://www.ricky-chan.co.uk/courier/ +%bcond_with toplevel # Allow toplevel folders. More info: http://www.ricky-chan.co.uk/courier/ # Summary: Courier-IMAP server Summary(pl): Serwer Courier-IMAP Name: courier-imap -Version: 4.0.5 -Release: 0.5 +Version: 4.1.1 +Release: 3 License: GPL Group: Networking/Daemons Source0: http://dl.sourceforge.net/courier/%{name}-%{version}.tar.bz2 -# Source0-md5: 961372cea83bcbd07471670df1f9121b +# Source0-md5: f423a609d9cce0dcf193cac64eb4cbdd Source1: %{name}.init Source2: %{name}-ssl.init Source3: %{name}-pop3.init @@ -21,6 +24,7 @@ Patch0: %{name}-dirs.patch Patch1: %{name}-certsdir.patch Patch2: %{name}-maildir.patch Patch3: %{name}-toplevel.patch +Patch4: %{name}-drop-makedat.patch URL: http://www.courier-mta.org/imap/ BuildRequires: autoconf >= 2.54 BuildRequires: automake @@ -30,6 +34,7 @@ BuildRequires: fam-devel BuildRequires: libstdc++-devel BuildRequires: openssl-devel >= 0.9.7d BuildRequires: procps +BuildRequires: rpmbuild(macros) >= 1.268 BuildRequires: sed >= 4.0 BuildRequires: sysconftool Requires(post,preun): /sbin/chkconfig @@ -123,37 +128,39 @@ Courier-IMAP POP3 jest serwerem POP3 dla skrzynek pocztowych Maildir. %if %{with toplevel} %patch3 -p1 %endif +%patch4 -p1 install %{SOURCE1} courier-imap.in install %{SOURCE2} courier-imap-ssl.in install %{SOURCE3} courier-pop3.in install %{SOURCE4} courier-pop3-ssl.in +rm -f makedat/configure.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"`" +find -type f -a '(' -name configure.in -o -name configure.ac ')' | while read FILE; do + cd "$(dirname "$FILE")" - if [ -f Makefile.am ]; then - sed -i -e '/_[L]DFLAGS=-static/d' Makefile.am - fi + if [ -f Makefile.am ]; then + %{__sed} -i -e '/_[L]DFLAGS=-static/d' Makefile.am + fi - %{__libtoolize} - %{__aclocal} - %{__autoconf} - %{__autoheader} - %{__automake} + %{__libtoolize} + %{__aclocal} + %{__autoconf} + %{__autoheader} + %{__automake} - cd "$OLDDIR" + cd - done %configure \ --with-db=db \ --enable-unicode \ --with-authchangepwdir=/var/tmp \ - --with-certsdir=%{_certsdir} + --with-certsdir=%{_certsdir} \ + --with-mailer=/usr/lib/sendmail %{__make} @@ -183,6 +190,7 @@ install tcpd/couriertls.1 $RPM_BUILD_ROOT%{_mandir}/man8/couriertls.8 install imap/courierpop3d.8 $RPM_BUILD_ROOT%{_mandir}/man8/courierpop3d.8 touch $RPM_BUILD_ROOT/etc/security/blacklist.{pop3,imap} +touch $RPM_BUILD_ROOT%{_sysconfdir}/shared/index # make config files ./sysconftool $RPM_BUILD_ROOT%{_sysconfdir}/*.dist @@ -200,31 +208,17 @@ rm -rf $RPM_BUILD_ROOT %post /sbin/chkconfig --add courier-imap /sbin/chkconfig --add courier-imap-ssl - -if [ -f /var/lock/subsys/courier-imap ]; then - /etc/rc.d/init.d/courier-imap restart >&2 -else - echo "Run \"/etc/rc.d/init.d/courier-imap start\" to start courier-imap daemon." -fi - -if [ -f /var/lock/subsys/courier-imap-ssl ]; then - /etc/rc.d/init.d/courier-imap-ssl restart >&2 -else - echo "Run \"/etc/rc.d/init.d/courier-imap-ssl start\" to start courier-imap-ssl daemon." -fi +%service courier-imap restart "courier-imap daemon" +%service courier-imap-ssl restart "courier-imap-ssl daemon" %preun if [ "$1" = "0" ]; then - if [ -f /var/lock/subsys/courier-imap ]; then - /etc/rc.d/init.d/courier-imap stop >&2 - fi + %service courier-imap stop /sbin/chkconfig --del courier-imap fi if [ "$1" = "0" ]; then - if [ -f /var/lock/subsys/courier-imap-ssl ]; then - /etc/rc.d/init.d/courier-imap-ssl stop >&2 - fi + %service courier-imap-ssl stop /sbin/chkconfig --del courier-imap-ssl fi @@ -253,9 +247,7 @@ if [ -f /etc/sysconfig/courier-imap ]; then echo please look at them echo fi -if [ -f /var/lock/subsys/courier-imap ]; then - /etc/rc.d/init.d/courier-imap restart >&2 -fi +%service -q courier-imap restart %triggerin -- %{name} < 3.0.6 . %{_sysconfdir}/imapd-ssl @@ -290,30 +282,19 @@ echo /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 - /etc/rc.d/init.d/courier-imap-pop3 stop >&2 - /etc/rc.d/init.d/courier-pop3 start >&2 -elif [ -f /var/lock/subsys/courier-pop3 ]; then - /etc/rc.d/init.d/courier-pop3 restart >&2 + /sbin/service courier-imap-pop3 stop >&2 + /sbin/service courier-pop3 start >&2 else - echo "Run \"/etc/rc.d/init.d/courier-pop3 start\" to start courier-pop3 daemon." -fi - -if [ -f /var/lock/subsys/courier-pop3-ssl ]; then - /etc/rc.d/init.d/courier-pop3-ssl restart >&2 -else - echo "Run \"/etc/rc.d/init.d/courier-pop3-ssl start\" to start courier-pop3-ssl daemon." + %service courier-pop3 restart "courier-pop3 daemon" fi +%service courier-pop3-ssl restart "courier-pop3-ssl daemon" %preun pop3 if [ "$1" = "0" ]; then - if [ -f /var/lock/subsys/courier-pop3 ]; then - /etc/rc.d/init.d/courier-pop3 stop >&2 - fi + %service courier-pop3 stop /sbin/chkconfig --del courier-pop3 - if [ -f /var/lock/subsys/courier-pop3-ssl ]; then - /etc/rc.d/init.d/courier-pop3-ssl stop >&2 - fi - /sbin/chkconfig --del courier-pop3-ssl + %service courier-pop3-ssl stop + /sbin/chkconfig --del courier-pop3-ssl fi %triggerin -n %{name}-pop3 -- %{name}-pop3 < 3.0.5 @@ -338,9 +319,7 @@ if [ -f /etc/sysconfig/courier-pop3 ]; then echo please look at them echo fi -if [ -f /var/lock/subsys/courier-pop3 ]; then - /etc/rc.d/init.d/courier-pop3 restart >&2 -fi +%service courier-pop3 restart %triggerin -n %{name}-pop3 -- %{name}-pop3 < 3.0.6 . %{_sysconfdir}/pop3d-ssl @@ -350,7 +329,7 @@ fi %files %defattr(644,root,root,755) -%doc maildir/README.sharedfolders.html imap/README.proxy tcpd/README.couriertls +%doc maildir/README.sharedfolders.txt imap/README.proxy tcpd/README.couriertls %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 @@ -360,6 +339,7 @@ fi %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(644,daemon,daemon) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/shared/index %attr(755,root,root) %{_bindir}/imapd %attr(755,root,root) %{_bindir}/maildiracl %attr(755,root,root) %{_bindir}/maildirkw @@ -376,14 +356,13 @@ fi %files common %defattr(644,root,root,755) %doc AUTHORS ChangeLog imap/BUGS INSTALL README* -%attr(750,root,root) %dir %{_sysconfdir} +%attr(751,root,root) %dir %{_sysconfdir} %attr(750,root,root) %dir %{_certsdir} %attr(770,daemon,daemon) %dir %{_localstatedir} %dir %{_libexecdir} %{_sysconfdir}/quotawarnmsg.example %attr(755,root,root) %{_bindir}/couriertls %attr(755,root,root) %{_libexecdir}/couriertcpd -%attr(755,root,root) %{_libexecdir}/makedatprog %{_mandir}/man1/couriert* %{_mandir}/man8/couriert* %{_mandir}/man8/mk*