SPECS: cherokee.spec - added user - files fixes - PHP support appe...

glen glen at pld-linux.org
Sat Dec 31 16:35:04 CET 2005


Author: glen                         Date: Sat Dec 31 15:35:04 2005 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- added user
- files fixes
- PHP support appears to be via php-cgi

---- Files affected:
SPECS:
   cherokee.spec (1.7 -> 1.8) 

---- Diffs:

================================================================
Index: SPECS/cherokee.spec
diff -u SPECS/cherokee.spec:1.7 SPECS/cherokee.spec:1.8
--- SPECS/cherokee.spec:1.7	Sat Dec 31 15:29:13 2005
+++ SPECS/cherokee.spec	Sat Dec 31 16:34:58 2005
@@ -1,5 +1,5 @@
 # $Revision$, $Date$
-%bcond_with	php		# adds PHP support
+%bcond_without	php		# adds PHP support
 %bcond_with	mono	# adds ASPX support
 %bcond_with	gnomevfs	# compile the gnomevfs handler (broken)
 %bcond_without	gnutls	# build with tls=gnutls
@@ -12,14 +12,18 @@
 Summary(pl):	Cherokee - serwer WWW
 Name:		cherokee
 Version:	0.4.29
-Release:	0.4
+Release:	0.7
 License:	GPL v2
 Group:		Networking/Daemons
 Source0:	http://www.0x50.org/download/0.4/0.4.29/%{name}-%{version}.tar.gz
 # Source0-md5:	854e6e61a69781746496012658d8ef98
 Source1:	%{name}.init
 Source2:	%{name}.sysconfig
+Patch0:		%{name}-config.patch
+Patch1:		%{name}-php-path.patch
 URL:		http://www.0x50.org/
+BuildRequires:	autoconf
+BuildRequires:	automake
 BuildRequires:	fcgi-devel
 %{?with_gnomevfs:BuildRequires:	gnome-vfs2-devel >= 2.0}
 %{?with_gnutls:BuildRequires:	gnutls-devel >= 0.9.99}
@@ -27,8 +31,19 @@
 BuildRequires:	pam-devel
 BuildRequires:	pcre-devel
 BuildRequires:	pkgconfig
+BuildRequires:	rpmbuild(macros) >= 1.268
 BuildRequires:	zlib-devel
-Requires(post):	/sbin/ldconfig
+Requires(post,postun):	/sbin/ldconfig
+Requires(post,preun):	rc-scripts
+Requires(postun):	/usr/sbin/groupdel
+Requires(postun):	/usr/sbin/userdel
+Requires(pre):	/bin/id
+Requires(pre):	/usr/bin/getgid
+Requires(pre):	/usr/sbin/groupadd
+Requires(pre):	/usr/sbin/useradd
+Provides:	group(cherokee)
+Provides:	group(http)
+Provides:	user(cherokee)
 Provides:	webserver
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -76,16 +91,23 @@
 
 %prep
 %setup -q
+%patch0 -p1
+%patch1 -p1
 
 %build
+%{__aclocal} -I m4
+%{__autoconf}
+%{__autoheader}
+%{__automake}
 %configure \
 	--sysconfdir=/etc \
+	--enable-os-string="PLD Linux" \
 	--with-wwwroot=%{_wwwroot} \
 	--disable-static \
 	%{?with_gnomevfs:--enable-gnomevfs} \
 	%{?with_tls:--enable-tls=%{?with_gnutls:gnutls}%{?with_openssl:openssl}} \
 	--enable-pthreads \
-	%{?with_php:--with-php=DIR} \
+	%{?with_php:--with-php=%{_prefix}} \
 	%{?with_mono:--with-mono=DIR}
 
 %{__make}
@@ -100,6 +122,10 @@
 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
 
+# users don't need this
+mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/cherokee-panic
+mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/cherokee_logrotate
+
 # modules dlopened by *.so
 rm -f $RPM_BUILD_ROOT%{_libdir}/cherokee/lib*.la
 
@@ -110,6 +136,12 @@
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%pre
+%groupadd -g 161 cherokee
+%groupadd -g 51 http
+%useradd -u 161 -d %{_wwwhome} -c "Cherokee User" -g cherokee cherokee
+%addusertogroup cherokee http
+
 %post
 /sbin/ldconfig
 /sbin/chkconfig --add %{name}
@@ -121,7 +153,13 @@
 	/sbin/chkconfig --del %{name}
 fi
 
-%postun	-p /sbin/ldconfig
+%postun
+/sbin/ldconfig
+if [ "$1" = "0" ]; then
+	%userremove lighttpd
+	%groupremove lighttpd
+	%groupremove http
+fi
 
 %files
 %defattr(644,root,root,755)
@@ -139,17 +177,19 @@
 %dir %{_sysconfdir}/sites-enabled
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/sites-available/default
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/sites-available/example.com
+%config(missingok) %{_sysconfdir}/sites-enabled/default
 %attr(750,root,root) %dir %{_sysconfdir}/ssl
 
 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/cherokee
 %attr(754,root,root) /etc/rc.d/init.d/cherokee
 
 %attr(755,root,root) %{_bindir}/cget
-%attr(755,root,root) %{_bindir}/cherokee-panic
-%attr(755,root,root) %{_bindir}/cherokee_logrotate
 %attr(755,root,root) %{_sbindir}/cherokee
+%attr(755,root,root) %{_sbindir}/cherokee-panic
+%attr(755,root,root) %{_sbindir}/cherokee_logrotate
 
 %dir %{_libdir}/cherokee
+%attr(755,root,root) %{_libdir}/cherokee/libplugin_admin.so
 %attr(755,root,root) %{_libdir}/cherokee/libplugin_cgi.so
 %attr(755,root,root) %{_libdir}/cherokee/libplugin_combined.so
 %attr(755,root,root) %{_libdir}/cherokee/libplugin_common.so
@@ -203,6 +243,11 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.8  2005/12/31 15:34:58  glen
+- added user
+- files fixes
+- PHP support appears to be via php-cgi
+
 Revision 1.7  2005/12/31 14:29:13  glen
 - updated to 0.4.29
 - this version supports PHP
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/cherokee.spec?r1=1.7&r2=1.8&f=u



More information about the pld-cvs-commit mailing list