packages: nagios-ninja/nagios-ninja.spec - webapps

glen glen at pld-linux.org
Tue Dec 7 18:22:12 CET 2010


Author: glen                         Date: Tue Dec  7 17:22:12 2010 GMT
Module: packages                      Tag: HEAD
---- Log message:
- webapps

---- Files affected:
packages/nagios-ninja:
   nagios-ninja.spec (1.1 -> 1.2) 

---- Diffs:

================================================================
Index: packages/nagios-ninja/nagios-ninja.spec
diff -u packages/nagios-ninja/nagios-ninja.spec:1.1 packages/nagios-ninja/nagios-ninja.spec:1.2
--- packages/nagios-ninja/nagios-ninja.spec:1.1	Tue Dec  7 17:32:54 2010
+++ packages/nagios-ninja/nagios-ninja.spec	Tue Dec  7 18:22:07 2010
@@ -1,22 +1,29 @@
 # $Revision$, $Date$
+# TODO
+# - system kohana (uses v2.3.1)
 Summary:	NInja, Nagios GUI, GUI, User Interface
 Summary(pl.UTF-8):	-
 Name:		nagios-ninja
 Version:	1.1.0
-Release:	0.1
+Release:	0.3
 License:	GPL v2
 Group:		Applications/WWW
 Source0:	http://www.op5.org/op5media/op5.org/downloads/ninja-%{version}.tar.gz
 # Source0-md5:	f9df45b7761a3081e0a1893f2ff77cf5
+Source1:	apache.conf
+Source2:	lighttpd.conf
 URL:		http://www.op5.org/community/plugin-inventory/op5-projects/ninja
-Requires:	nagios-merlin >= 0.9.0
-Requires:	php-common >= 4:5.1.6
 Requires:	/usr/bin/php
 Requires:	nagios >= 3.0
+Requires:	nagios-merlin >= 0.9.0
+Requires:	php-common >= 4:5.1.6
 BuildArch:	noarch
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
-%define		appdir	%{_datadir}/ninja
+%define		_webapps	/etc/webapps
+%define		_webapp		ninja
+%define		_sysconfdir	%{_webapps}/%{_webapp}
+%define		appdir		%{_datadir}/%{_webapp}
 
 %description
 The Ninja project is an effort to develop an alternative Nagios gui
@@ -30,15 +37,43 @@
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{appdir}
-cp -a . $RPM_BUILD_ROOT%{appdir}
+install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{appdir}/htdocs}
+cp -a index.php application modules system $RPM_BUILD_ROOT%{appdir}
+# as per http://docs.kohanaphp.com/installation/deployment
+ln -s ../index.php $RPM_BUILD_ROOT%{appdir}/htdocs
+
+cp -a %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
+cp -a %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/lighttpd.conf
+cp -a $RPM_BUILD_ROOT%{_sysconfdir}/{apache,httpd}.conf
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%triggerin -- apache1 < 1.3.37-3, apache1-base
+%webapp_register apache %{_webapp}
+
+%triggerun -- apache1 < 1.3.37-3, apache1-base
+%webapp_unregister apache %{_webapp}
+
+%triggerin -- apache < 2.2.0, apache-base
+%webapp_register httpd %{_webapp}
+
+%triggerun -- apache < 2.2.0, apache-base
+%webapp_unregister httpd %{_webapp}
+
+%triggerin -- lighttpd
+%webapp_register lighttpd %{_webapp}
+
+%triggerun -- lighttpd
+%webapp_unregister lighttpd %{_webapp}
+
 %files
 %defattr(644,root,root,755)
 %doc docs/COPYRIGHT docs/README
+%dir %attr(750,root,http) %{_sysconfdir}
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lighttpd.conf
 %{appdir}
 
 %define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
@@ -47,5 +82,8 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.2  2010/12/07 17:22:07  glen
+- webapps
+
 Revision 1.1  2010/12/07 16:32:54  glen
 - initial
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/nagios-ninja/nagios-ninja.spec?r1=1.1&r2=1.2&f=u



More information about the pld-cvs-commit mailing list