SPECS: nagios-fruity.spec (NEW) - new
glen
glen at pld-linux.org
Sat Jul 16 17:58:04 CEST 2005
Author: glen Date: Sat Jul 16 15:58:04 2005 GMT
Module: SPECS Tag: HEAD
---- Log message:
- new
---- Files affected:
SPECS:
nagios-fruity.spec (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: SPECS/nagios-fruity.spec
diff -u /dev/null SPECS/nagios-fruity.spec:1.1
--- /dev/null Sat Jul 16 17:58:04 2005
+++ SPECS/nagios-fruity.spec Sat Jul 16 17:57:59 2005
@@ -0,0 +1,102 @@
+# $Revision$, $Date$
+Summary: Nagios Configuration Tool
+Name: nagios-fruity
+Version: 1.0
+%define _beta beta1
+%define _rc pl2
+Release: 0.%{_beta}.%{_rc}.14
+Epoch: 0
+License: GPL v2
+Group: Applications/WWW
+Source0: http://dl.sourceforge.net/fruity/fruity-%{version}-%{_beta}-%{_rc}.tar.gz
+# Source0-md5: f53a6aa9bf38b0bd01c640f51312cc8c
+URL: http://fruity.sourceforge.net/
+BuildRequires: rpmbuild(macros) >= 1.226
+BuildRequires: sed >= 4.0
+Requires: adodb
+Requires: nagios >= 2.0
+Requires: php >= 5.0.0
+Requires: php-mysql
+Requires: php-pear-HTML_TreeMenu
+Requires: webserver = apache
+BuildArch: noarch
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%define _appdir %{_datadir}/fruity
+
+%description
+A Nagios Configuration Tool.
+
+%prep
+%setup -q -n fruity
+rm -rf CVS
+rm -rf config # no longer used
+
+# undos the source
+find '(' -name '*.php' -o -name '*.inc' ')' -print0 | xargs -0 sed -i -e 's,
$,,'
+
+mv includes/config.inc{,.dist}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT{%{_appdir},%{_sysconfdir}}
+
+cp -a *.php *.js $RPM_BUILD_ROOT%{_appdir}
+cp -a images includes modules output session sitedb style $RPM_BUILD_ROOT%{_appdir}
+
+cat <<EOF > $RPM_BUILD_ROOT%{_sysconfdir}/apache-fruity.conf
+php_value short_open_tag on
+Alias /fruity %{_appdir}
+<Location /fruity>
+ allow from all
+</Location>
+# vim: filetype=apache ts=4 sw=4 et
+EOF
+
+sed -e "
+s,/usr/local/groundwork/fruity/logos,/usr/share/nagios/images/logos,
+s,/usr/local/groundwork/fruity,/usr/share/fruity,
+s,sitedb_config\[.username.\].=.'root',sitedb_config['username'] = 'mysql',
+" includes/config.inc.dist > $RPM_BUILD_ROOT%{_appdir}/includes/config.inc
+
+rm -f $RPM_BUILD_ROOT%{_appdir}/includes/config.inc.dist
+
+%post
+if [ "$1" = 1 ]; then
+ %banner %{name} <<-EOF
+ You need to create mysql database 'fruity':
+ mysqladmin create fruity
+ zcat %{_docdir}/%{name}-%{version}/fruity-mysql.sql.gz | mysql fruity
+EOF
+fi
+
+%triggerin -- apache1 >= 1.3.33-2
+%apache_config_install -v 1 -c %{_sysconfdir}/apache-fruity.conf
+
+%triggerun -- apache1 >= 1.3.33-2
+%apache_config_uninstall -v 1
+
+%triggerin -- apache >= 2.0.0
+%apache_config_install -v 2 -c %{_sysconfdir}/apache-fruity.conf
+
+%triggerun -- apache >= 2.0.0
+%apache_config_uninstall -v 2
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc INSTALL sqldata/*
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache-fruity.conf
+%{_appdir}
+
+%define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
+%changelog
+* %{date} PLD Team <feedback at pld-linux.org>
+All persons listed below can be reached at <cvs_login>@pld-linux.org
+
+$Log$
+Revision 1.1 2005/07/16 15:57:59 glen
+- new
+
================================================================
More information about the pld-cvs-commit
mailing list