SPECS: apache-mod_midgard.spec - unified

glen glen at pld-linux.org
Tue Dec 27 01:21:30 CET 2005


Author: glen                         Date: Tue Dec 27 00:21:30 2005 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- unified

---- Files affected:
SPECS:
   apache-mod_midgard.spec (1.28 -> 1.29) 

---- Diffs:

================================================================
Index: SPECS/apache-mod_midgard.spec
diff -u SPECS/apache-mod_midgard.spec:1.28 SPECS/apache-mod_midgard.spec:1.29
--- SPECS/apache-mod_midgard.spec:1.28	Thu Nov  4 21:22:40 2004
+++ SPECS/apache-mod_midgard.spec	Tue Dec 27 01:21:25 2005
@@ -1,4 +1,6 @@
 # $Revision$, $Date$
+# TODO
+# - not compatible with apache2 (is it apache1 module?)
 %define		mod_name	midgard
 %define		arname		mod_midgard
 %define 	apxs		/usr/sbin/apxs
@@ -16,19 +18,17 @@
 Patch0:		%{arname}-conf.patch
 URL:		http://www.midgard-project.org/
 BuildRequires:	%{apxs}
-BuildRequires:	apache-devel >= 1.3.12
+BuildRequires:	apache-devel >= 2.0
 BuildRequires:	expat-devel
-BuildRequires:	midgard-lib-devel = %{version}
+BuildRequires:	midgard-lib-devel >= 1.4.1-5
 BuildRequires:	mysql-devel
-Requires(post,preun):	%{apxs}
-Requires(preun):	perl
-Requires:	apache >= 1.3.12
-Requires:	midgard-lib = %{version}
+Requires:	apache(modules-api) = %apache_modules_api
+%requires_eq_to midgard-lib midgard-lib-devel
 Provides:	mod_midgard
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
-%define		_pkglibdir	%(%{apxs} -q LIBEXECDIR)
-%define		_sysconfdir	%(%{apxs} -q SYSCONFDIR)
+%define		_pkglibdir	%(%{apxs} -q LIBEXECDIR 2>/dev/null)
+%define		_sysconfdir	%(%{apxs} -q SYSCONFDIR 2>/dev/null)
 
 %prep
 %setup -q -n %{arname}-%{version}
@@ -59,27 +59,22 @@
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}}
+install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/httpd.conf}
 
 install midgard-root.php $RPM_BUILD_ROOT%{_pkglibdir}
 install mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
-install midgard.conf $RPM_BUILD_ROOT%{_sysconfdir}
+install midgard.conf $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf/90_mod_%{mod_name}.conf
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %post
-%{apxs} -e -a -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
-echo "Include %{_sysconfdir}/%{mod_name}.conf" >> %{_sysconfdir}/httpd.conf
 if [ -f /var/lock/subsys/httpd ]; then
 	/etc/rc.d/init.d/httpd restart 1>&2
 fi
 
 %preun
 if [ "$1" = "0" ]; then
-	%{apxs} -e -A -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
-	%{__perl} -pi -e "s|Include %{_sysconfdir}/%{mod_name}.conf\n||g;" \
-		%{_sysconfdir}/httpd.conf
 	if [ -f /var/lock/subsys/httpd ]; then
 		/etc/rc.d/init.d/httpd restart 1>&2
 	fi
@@ -87,10 +82,11 @@
 
 %files
 %defattr(644,root,root,755)
-%config %{_pkglibdir}/midgard-root.php
-%config(noreplace) %{_sysconfdir}/midgard.conf
-%attr(755,root,root) %{_pkglibdir}/mod_midgard.so
 %doc AUTHORS COPYING ChangeLog INSTALL INSTALL.ru NEWS README README.ru
+# FIXME
+%config %{_pkglibdir}/midgard-root.php
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf/*_mod_%{mod_name}.conf
+%attr(755,root,root) %{_pkglibdir}/*.so
 
 %define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
 %changelog
@@ -98,6 +94,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.29  2005/12/27 00:21:25  glen
+- unified
+
 Revision 1.28  2004/11/04 20:22:40  paladine
 - spaces->tabs
 
@@ -120,13 +119,13 @@
 - Requires(post,preun)
 
 Revision 1.21  2002/10/10 11:39:10  marcus
-- use new %%doc
+- use new %doc
 
 Revision 1.20  2002/08/13 15:06:21  grzegorz
 - sed -e "s/%{_sbindir}\/apxs -e/\%{apxs} -e/"
 
 Revision 1.19  2002/04/25 15:46:14  arturs
-fixed a small typo
+- fixed a small typo
 
 Revision 1.18  2002/02/23 01:23:23  kloczek
 - adapterized.
@@ -139,13 +138,13 @@
 - release 2
 
 Revision 1.15  2002/02/17 18:52:20  ankry
-- added %%{apxs} local macro to avoid adapter problems
-- fix use of %%{apxs} and %%{_sbindir}/apxs
-- added BR %%{apxs} and Prereq %%{_sbindir}/apxs (if necessary); removed BR apache
+- added %{apxs} local macro to avoid adapter problems
+- fix use of %{apxs} and %{_sbindir}/apxs
+- added BR %{apxs} and Prereq %{_sbindir}/apxs (if necessary); removed BR apache
 - adapterized
 
 Revision 1.14  2002/01/18 02:12:20  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  2001/09/27 09:52:37  qboosh
 - added this strange Source0 URL (as comment - filename mismatch)
@@ -168,13 +167,13 @@
 - adaptarized spec
 
 Revision 1.7  2001/05/02 00:42:07  qboosh
-- adapterized and made spec %%debug ready or using %%rpm*flags macros
+- adapterized and made spec %debug ready or using %rpm*flags macros
 
 Revision 1.6  2000/08/07 23:00:14  baggins
 - fixed rpm Group
 
 Revision 1.5  2000/06/09 07:54:39  kloczek
-- more %%{__make} macros.
+- more %{__make} macros.
 
 Revision 1.4  2000/05/17 21:01:20  kloczek
 - spec adapterized.
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/apache-mod_midgard.spec?r1=1.28&r2=1.29&f=u



More information about the pld-cvs-commit mailing list