SPECS: prewikka.spec - up from Tomasz Rutkowski

arekm arekm at pld-linux.org
Sat Jan 6 21:22:48 CET 2007


Author: arekm                        Date: Sat Jan  6 20:22:48 2007 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- up from Tomasz Rutkowski

---- Files affected:
SPECS:
   prewikka.spec (1.8 -> 1.9) 

---- Diffs:

================================================================
Index: SPECS/prewikka.spec
diff -u SPECS/prewikka.spec:1.8 SPECS/prewikka.spec:1.9
--- SPECS/prewikka.spec:1.8	Tue May 16 12:39:17 2006
+++ SPECS/prewikka.spec	Sat Jan  6 21:22:42 2007
@@ -1,21 +1,21 @@
 # $Revision$, $Date$
-#
-# TODO:		- startup/init files (assume standalone http server
-#		  not the apache/thttpd integration)
-# 
 Summary:	Prelude IDS web application
 Summary(pl):	Aplikacja WWW dla Prelude IDS
 Name:		prewikka
-Version:	0.9.5
-Release:	0.1
+Version:	0.9.8
+Release:	1
 License:	GPL
 Group:		Applications
 Source0:	http://www.prelude-ids.org/download/releases/%{name}-%{version}.tar.gz
-# Source0-md5:	bb18d374306fabeff6a612916a9177b4
+# Source0-md5:	bc269aeb9c3570b76b668f0242daef76
+Source1:	%{name}.init
+Source2:	%{name}.sysconfig
 URL:		http://www.prelude-ids.org/
 BuildRequires:	python-cheetah
 Requires:	python-libprelude
 Requires:	python-libpreludedb
+Requires:	python-modules
+Requires:	python-cheetah
 BuildArch:	noarch
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -39,45 +39,68 @@
 python setup.py install --optimize=2 \
 	--root=$RPM_BUILD_ROOT
 
+install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig}
+install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
+install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
+
 install -d $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
 install conf/prewikka.conf $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%post
+/sbin/chkconfig --add prewikka
+if [ "$1" = "1" ]; then
+%banner -e %{name} <<EOF
+
+Create new database and database user for prewikka
+(or update an existing one if needed) using templates from
+%{_datadir}/%{name}/database and configure Prewikka
+for reference visit %{url}
+
+To connect to console point Your browser to:
+http://`hostame`:8000/
+REMEMBER to change password for admin (default:admin)
+
+EOF
+fi
+%service prewikka restart "Prewikka"
+
+%preun
+if [ "$1" = "0" ]; then
+	if [ -f /var/lock/subsys/prewikka ]; then
+		%service prewikka stop 1>&2
+	fi
+	/sbin/chkconfig --del prewikka
+fi
+
 %files
 %defattr(644,root,root,755)
-%dir %{_usr}/share/%{name}
-%dir %{_usr}/share/%{name}/cgi-bin
-%dir %{_usr}/share/%{name}/database
-%dir %{_usr}/share/%{name}/htdocs
-%dir %{_usr}/share/%{name}/htdocs/css
-%dir %{_usr}/share/%{name}/htdocs/images
-%dir %{_usr}/share/%{name}/htdocs/js
+%attr(755,root,root) %{_bindir}/prewikka-httpd
+%dir %{_sysconfdir}/%{name}
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/*.*
+%attr(754,root,root) /etc/rc.d/init.d/%{name}
+%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
+%dir %{_datadir}/%{name}
+%dir %{_datadir}/%{name}/cgi-bin
+%attr(755,root,root) %{_datadir}/%{name}/cgi-bin/*
+%{_datadir}/%{name}/database
+%{_datadir}/%{name}/htdocs
 %dir %{py_sitescriptdir}/%{name}
 %dir %{py_sitescriptdir}/%{name}/modules
 %dir %{py_sitescriptdir}/%{name}/modules/auth
+%dir %{py_sitescriptdir}/%{name}/modules/auth/cgi
 %dir %{py_sitescriptdir}/%{name}/modules/auth/loginpassword
-%dir %{py_sitescriptdir}/%{name}/modules/log
-%dir %{py_sitescriptdir}/%{name}/modules/log/stderr
 %dir %{py_sitescriptdir}/%{name}/views
 %dir %{py_sitescriptdir}/%{name}/templates
-%dir %{_sysconfdir}/%{name}
-%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/*.*
-%attr(755,root,root) %{_bindir}/prewikka-httpd
 %attr(755,root,root) %{py_sitescriptdir}/%{name}/*.py[co]
 %attr(755,root,root) %{py_sitescriptdir}/%{name}/modules/*.py[co]
 %attr(755,root,root) %{py_sitescriptdir}/%{name}/modules/auth/*.py[co]
+%attr(755,root,root) %{py_sitescriptdir}/%{name}/modules/auth/cgi/*.py[co]
 %attr(755,root,root) %{py_sitescriptdir}/%{name}/modules/auth/loginpassword/*.py[co]
-%attr(755,root,root) %{py_sitescriptdir}/%{name}/modules/log/*.py[co]
-%attr(755,root,root) %{py_sitescriptdir}/%{name}/modules/log/stderr/*.py[co]
 %attr(755,root,root) %{py_sitescriptdir}/%{name}/views/*.py[co]
 %attr(755,root,root) %{py_sitescriptdir}/%{name}/templates/*.py[co]
-%attr(755,root,root) %{_usr}/share/%{name}/cgi-bin/*
-%{_usr}/share/%{name}/database/*
-%{_usr}/share/%{name}/htdocs/css/*
-%{_usr}/share/%{name}/htdocs/images/*
-%{_usr}/share/%{name}/htdocs/js/*
 
 %define	date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
 %changelog
@@ -85,6 +108,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.9  2007/01/06 20:22:42  arekm
+- up from Tomasz Rutkowski
+
 Revision 1.8  2006/05/16 10:39:17  mguevara
 - 0.9.5-0.1
 
================================================================

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



More information about the pld-cvs-commit mailing list