SPECS: courier.spec - use apache config triggers

glen glen at pld-linux.org
Sat Nov 19 16:59:27 CET 2005


Author: glen                         Date: Sat Nov 19 15:59:27 2005 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- use apache config triggers

---- Files affected:
SPECS:
   courier.spec (1.120 -> 1.121) 

---- Diffs:

================================================================
Index: SPECS/courier.spec
diff -u SPECS/courier.spec:1.120 SPECS/courier.spec:1.121
--- SPECS/courier.spec:1.120	Thu Nov  3 21:15:43 2005
+++ SPECS/courier.spec	Sat Nov 19 16:59:21 2005
@@ -1,4 +1,7 @@
 # $Revision$, $Date$
+# TODO
+# - move stuff out of /home/services/httpd (because that ain't right!)
+# - use %{_prefix}/lib/cgi-bin
 #
 # Conditional build:
 %bcond_without	fam		# with fam support
@@ -8,7 +11,7 @@
 Summary(pl):	Serwer poczty Courier
 Name:		courier
 Version:	0.52.1
-Release:	1
+Release:	1.1
 License:	GPL
 Group:		Networking/Daemons
 #Source0:	http://dl.sourceforge.net/courier/%{name}-%{version}.tar.bz2
@@ -26,6 +29,7 @@
 BuildRequires:	automake
 BuildRequires:	courier-authlib-devel >= 0.57
 BuildRequires:	expect
+%{?with_fam:BuildRequires:	fam-devel}
 BuildRequires:	gettext-devel
 BuildRequires:	libstdc++-devel
 BuildRequires:	libtool
@@ -34,12 +38,12 @@
 BuildRequires:	openssl-devel >= 0.9.7d
 BuildRequires:	openssl-tools >= 0.9.7d
 BuildRequires:	openssl-tools-perl >= 0.9.7d
-BuildRequires:	pcre-devel
 BuildRequires:	pam-devel
+BuildRequires:	pcre-devel
 BuildRequires:	perl-devel
+BuildRequires:	rpmbuild(macros) >= 1.226
 BuildRequires:	sed >= 4.0
 BuildRequires:	sysconftool
-%{?with_fam:BuildRequires:	fam-devel}
 Requires(post,preun):	/sbin/chkconfig
 # only for light upgrade from old version < 0.47
 # remove it after some time
@@ -106,8 +110,8 @@
 Summary:	Courier Integrated POP3 server
 Summary(pl):	Zintegrowany serwer POP3 do Couriera
 Group:		Networking/Daemons
-Requires:	%{name} = %{version}-%{release}
 Requires(post):	openssl-tools >= 0.9.7d
+Requires:	%{name} = %{version}-%{release}
 
 %description pop3d
 This package installs Courier mail server's integrated POP3 server,
@@ -127,8 +131,8 @@
 Summary:	Courier Integrated IMAP server
 Summary(pl):	Zintegrowany serwer IMAP do Couriera
 Group:		Networking/Daemons
-Requires:	%{name} = %{version}-%{release}
 Requires(post):	openssl-tools >= 0.9.7d
+Requires:	%{name} = %{version}-%{release}
 Obsoletes:	courier-imap
 Obsoletes:	courier-imap-common
 
@@ -161,8 +165,8 @@
 Summary:	Courier Integrated HTTP administraton panel
 Summary(pl):	Panel administracyjny przez HTTP dla Couriera
 Group:		Networking/Daemons
-Requires:	%{name} = %{version}-%{release}
 Requires:	%{_cgibindir}
+Requires:	%{name} = %{version}-%{release}
 Requires:	webserver
 
 %description webadmin
@@ -176,8 +180,8 @@
 Summary:	Courier Integrated HTTP (webmail) server
 Summary(pl):	Zintegrowany serwer poczty przez HTTP (webmail) do Couriera
 Group:		Networking/Daemons
-Requires:	%{name} = %{version}-%{release}
 Requires:	%{_cgibindir}
+Requires:	%{name} = %{version}-%{release}
 
 %description webmail
 This package installs Courier mail server's integrated HTTP webmail
@@ -578,42 +582,25 @@
 	echo
 fi
 
-# apache1
-if [ -d %{_apache1dir}/conf.d ]; then
-	ln -sf %{_sysconfdir}/apache-%{name}.conf %{_apache1dir}/conf.d/99_%{name}.conf
-	if [ -f /var/lock/subsys/apache ]; then
-		/etc/rc.d/init.d/apache restart 1>&2
-	fi
-fi
-# apache2
-if [ -d %{_apache2dir}/httpd.conf ]; then
-	ln -sf %{_sysconfdir}/apache-%{name}.conf %{_apache2dir}/httpd.conf/99_%{name}.conf
-	if [ -f /var/lock/subsys/httpd ]; then
-		/etc/rc.d/init.d/httpd restart 1>&2
-	fi
-fi
-
 %preun webmail
 if [ "$1" = "0" ]; then
 	if [ -e %{_localstatedir}/tmp/sqwebmaild.pid ]; then
 		%{_sbindir}/webmaild stop
 	fi
-	# apache1
-	if [ -d %{_apache1dir}/conf.d ]; then
-		rm -f %{_apache1dir}/conf.d/99_%{name}.conf
-		if [ -f /var/lock/subsys/apache ]; then
-			/etc/rc.d/init.d/apache restart 1>&2
-		fi
-	fi
-	# apache2
-	if [ -d %{_apache2dir}/httpd.conf ]; then
-		rm -f %{_apache2dir}/httpd.conf/99_%{name}.conf
-		if [ -f /var/lock/subsys/httpd ]; then
-			/etc/rc.d/init.d/httpd restart 1>&2
-		fi
-	fi
 fi
 
+%triggerin webmail -- apache1 >= 1.3.33-2
+%apache_config_install -v 1 -c %{_sysconfdir}/apache-%{name}.conf
+
+%triggerun webmail -- apache1 >= 1.3.33-2
+%apache_config_uninstall -v 1
+
+%triggerin webmail -- apache >= 2.0.0
+%apache_config_install -v 2 -c %{_sysconfdir}/apache-%{name}.conf
+
+%triggerun webmail -- apache >= 2.0.0
+%apache_config_uninstall -v 2
+
 %files
 %defattr(644,root,root,755)
 %doc AUTHORS BENCHMARKS ChangeLog INSTALL NEWS README TODO htmldoc/[adehqstu]*
@@ -924,6 +911,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.121  2005/11/19 15:59:21  glen
+- use apache config triggers
+
 Revision 1.120  2005/11/03 20:15:43  glen
 - unify sf url, and other things that adapter felt neccessary
 
@@ -994,7 +984,7 @@
 Revision 1.102.2.7  2005/03/05 00:01:42  andree
 - updated to 0.49.0, removed -build.patch (obsoleted)
 - added post, preun section for webmail (apache1,2 support)
-- %%files fixes
+- %files fixes
 - R(post): courier-authlib-userdb - to allow upgrade from < 0.47
   and removed obsolete trigger
 - removed suid from webmail
@@ -1009,11 +999,11 @@
 - updated to 0.48
 
 Revision 1.102.2.4  2004/12/15 10:46:59  andree
-- %%files fixes
+- %files fixes
 - removed courier-smtpauth, added obsolete
 
 Revision 1.102.2.3  2004/12/11 00:43:16  andree
-- %%files fixes
+- %files fixes
 - added some configure options (mailuser,group,uid,gid)
 
 Revision 1.102.2.2  2004/12/10 11:49:10  andree
@@ -1045,7 +1035,7 @@
 
 Revision 1.97  2004/07/27 23:09:47  andree
 - add bofh config file with badmime option
-- perm fixes; updated %%post smtpauth
+- perm fixes; updated %post smtpauth
 - fix csh script; rel. 4
 
 Revision 1.96  2004/07/24 19:43:14  andree
@@ -1070,7 +1060,7 @@
 - formatting
 
 Revision 1.89  2004/06/07 08:32:55  andree
-- fix %%post (imapd,pop3d) scripts; rel. 2
+- fix %post (imapd,pop3d) scripts; rel. 2
 
 Revision 1.88  2004/05/30 22:21:16  andree
 - update post,preun; fix certsdir perm; rel.1
@@ -1083,7 +1073,7 @@
 
 Revision 1.85  2004/05/24 22:14:40  andree
 - add courier-certs.patch (--with-certsdir option)
-- move certs to %%certsdir; trigger for new certs directory
+- move certs to %certsdir; trigger for new certs directory
 - remove authmodulelist; rel 0.5
 
 Revision 1.84  2004/05/20 16:20:13  andree
@@ -1093,10 +1083,10 @@
 - perm fixes
 
 Revision 1.82  2004/04/17 11:05:25  andree
-- add file calendarmode, put info to  %%post webmail
+- add file calendarmode, put info to  %post webmail
 
 Revision 1.81  2004/04/17 10:41:22  andree
-- updated %%doc, added missing dirs
+- updated %doc, added missing dirs
 - sharedindex* move back to primary package
 
 Revision 1.80  2004/04/10 21:34:56  andree
@@ -1114,7 +1104,7 @@
 - rel.1 ready to go
 
 Revision 1.76  2004/04/04 10:39:04  andree
-- %%doc fixes
+- %doc fixes
 
 Revision 1.75  2004/04/03 20:30:22  andree
 - maildir tools goes to separate package
@@ -1122,7 +1112,7 @@
 Revision 1.74  2004/04/03 19:16:24  andree
 - package INSTALL to doc (lot of configuration tips)
 - webadmin goes to separate package
-- %%files fixes
+- %files fixes
 - rel 0.9 working in progress
 
 Revision 1.73  2004/04/02 00:38:08  andree
@@ -1249,7 +1239,7 @@
 
 Revision 1.41  2003/11/30 15:22:09  adamg
 - updated to 0.44.2
-- new bcond (without_tests), that skips "make check" in %%build
+- new bcond (without_tests), that skips "make check" in %build
 
 Revision 1.40  2003/11/18 12:36:40  andree
 - fix mistake (change authlib.1 to authlib.7 in links)
@@ -1307,15 +1297,15 @@
 - /home -> /home/services
 
 Revision 1.23  2002/11/25 01:40:36  ankry
-Massive attack:
-- s/man[ea]d[zż][ae]r/zarządca/g
-- (some) new %%doc
+- Massive attack:
+  - s/man[ea]d[zż][ae]r/zarządca/g
+  - (some) new %doc
 
 Revision 1.22  2002/10/10 12:51:50  marcus
-- use new %%doc
+- use new %doc
 
 Revision 1.21  2002/05/16 23:44:38  marcus
-- fixed %%install
+- fixed %install
 
 Revision 1.20  2002/05/14 07:56:04  ankry
 - changed groups to ones used by other functionally similar packages
@@ -1328,7 +1318,7 @@
 
 Revision 1.18  2002/05/07 14:12:30  pioklo
 - update to 0.38 ,STBR
-- fix %%files section
+- fix %files section
 
 Revision 1.17  2002/04/25 16:06:50  arturs
 - fixed a small typo
@@ -1341,25 +1331,25 @@
   Group field using gettext).
 
 Revision 1.14  2002/01/18 02:12:35  kloczek
-perl -pi -e "s/pld-list\@pld.org.pl/feedback\@pld.org.pl/"
+- perl -pi -e "s/pld-list\@pld.org.pl/feedback\@pld.org.pl/"
 
 Revision 1.13  2002/01/09 12:25:35  qboosh
-- removed whole file lists generation, added lists to %%files fixing many
+- removed whole file lists generation, added lists to %files fixing many
   ownership stupidities (NFY - need to check files with uid||gid daemon)
 - added more BuildRequires
-TODO: proper daemons starting/restarting/stopping in post/preun, check
-permissions etc.
+- TODO: proper daemons starting/restarting/stopping in post/preun, check
+  permissions etc.
 
 Revision 1.12  2002/01/03 12:15:19  qboosh
 - some BReqs, added patch to fix c_rehash searching
 
 Revision 1.11  2001/12/07 21:12:45  mkochano
-- /etc/pam.d/* marked with %%config(noreplace).
+- /etc/pam.d/* marked with %config(noreplace).
 - Release++ (I'm too lazy to write here new release number for each
   spec. Sorry).
 
 Revision 1.10  2001/11/07 10:41:31  qboosh
-- adapterized, added -q to %%setup
+- adapterized, added -q to %setup
 
 Revision 1.9  2001/10/03 02:32:55  marcus
 - new version 0.35.1
@@ -1367,13 +1357,13 @@
 Revision 1.8  2001/09/24 11:24:08  qboosh
 - Prereq: /sbin/chkconfig
 - cleanups, pl translations, added URLs
-NOTE: %%install and %%files should be rewritten; current version is 0.35.1
+- NOTE: %install and %files should be rewritten; current version is 0.35.1
 
 Revision 1.7  2001/08/23 16:51:10  filon
-- changed: make -> %%{__make}
+- changed: make -> %{__make}
 
 Revision 1.6  2001/07/26 05:42:05  saq
 - reverting last change: removing new macros from %p{re,ost}{,un}
 
 Revision 1.4  2000/12/07 02:43:45  agaran
-Another $Log fixing
+- Another $Log fixing
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/courier.spec?r1=1.120&r2=1.121&f=u




More information about the pld-cvs-commit mailing list