SPECS: mysqlard.spec - separated daemon and php, more todo, some done
blues
blues at pld-linux.org
Tue Oct 3 00:26:14 CEST 2006
Author: blues Date: Mon Oct 2 22:26:14 2006 GMT
Module: SPECS Tag: HEAD
---- Log message:
- separated daemon and php, more todo, some done
---- Files affected:
SPECS:
mysqlard.spec (1.1 -> 1.2)
---- Diffs:
================================================================
Index: SPECS/mysqlard.spec
diff -u SPECS/mysqlard.spec:1.1 SPECS/mysqlard.spec:1.2
--- SPECS/mysqlard.spec:1.1 Fri Sep 29 15:03:57 2006
+++ SPECS/mysqlard.spec Tue Oct 3 00:26:09 2006
@@ -1,17 +1,20 @@
# $Revision$, $Date$
# TODO:
-# - prepare separate user to run the daemon
-# - deamon should be in separate package
-# - webapps framework
+# - prepare separate user to run the daemon (mysqlar)
+# - webapps framework: lighttpd
+# - switch init-script to be PLD-like
+# - patch default config to put rrd's and images to /var, not %{_appdir}
Summary: MySQL performance logging daemon
Name: mysqlard
Version: 1.0.0
-Release: 0.1
+Release: 0.4
License: GPL v2
Group: Applications/Databases
Source0: http://gert.sos.be/downloads/mysqlar/%{name}-%{version}.tar.gz
# Source0-md5: 693ef6f36ca232131b22db7063cae940
-URL: http://www.sos.be/
+Source1: %{name}.conf
+Patch0: %{name}-use_mysqlar_user.patch
+URL: http://gert.sos.be/
Requires: rrdtool
BuildRequires: autoconf
BuildRequires: automake
@@ -21,13 +24,33 @@
%define _sysconfdir /etc/%{name}
%define _appdir %{_datadir}/%{name}
+%define _webapps /etc/webapps
+%define _webapp %{name}
+%define _webappconfdir %{_webapps}/%{_webapp}
+%define _pkglibdir /var/lib/%{name}
+
%description
mysqlard daemon collects MySQL(TM) performance data in a Round Robin
Database. The package also contains example graphing and php scripts.
+%package php
+Summary: PHP interface for %{name}
+Summary(pl): Interfejs PHP dla %{name}
+Group: Applications/System
+Requires: %{name} = %{version}-%{release}
+Requires: php-mysql
+Requires: webapps
+
+%description php
+PHP interface for %{name}.
+
+%description php -l pl
+Interfejs PHP dla %{name}.
+
%prep
%setup -q
+%patch0 -p1
%build
%configure
@@ -35,7 +58,8 @@
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{/etc/{rc.d/init.d,cron.{daily,weekly,monthly}},%{_sysconfdir}}
+install -d $RPM_BUILD_ROOT{/etc/{rc.d/init.d,cron.{daily,weekly,monthly}},%{_sysconfdir}} \
+ $RPM_BUILD_ROOT%{_webappconfdir}
%{__make} install \
DESTDIR=$RPM_BUILD_ROOT
@@ -49,14 +73,27 @@
mv $RPM_BUILD_ROOT%{_appdir}/mysqlar.monthly $RPM_BUILD_ROOT/etc/cron.monthly/%{name}
#install -d $RPM_BUILD_ROOT%{_appdir}/archive
+install %{SOURCE1} $RPM_BUILD_ROOT%{_webappconfdir}/apache.conf
+install %{SOURCE1} $RPM_BUILD_ROOT%{_webappconfdir}/httpd.conf
+
# cleanup trash:
rm -f $RPM_BUILD_ROOT%{_appdir}/*.spec
+%triggerin php -- apache1 < 1.3.37-3, apache1-base
+%webapp_register apache %{_webapp}
+
+%triggerun php -- apache1 < 1.3.37-3, apache1-base
+%webapp_unregister apache %{_webapp}
+
+%triggerin php -- apache < 2.2.0, apache-base
+%webapp_register httpd %{_webapp}
+
+%triggerun php -- apache < 2.2.0, apache-base
+%webapp_unregister httpd %{_webapp}
+
%post
-elif test -x /sbin/chkconfig
-then
- /sbin/chkconfig --add mysqlard
-fi
+/sbin/chkconfig --add %{name}
+%service %{name} restart
%clean
rm -rf $RPM_BUILD_ROOT
@@ -70,12 +107,18 @@
%attr(754,root,root) /etc/rc.d/init.d/%{name}
%{_bindir}/mysqlar_graph
%{_sbindir}/%{name}
+%{_mandir}/man1/*.1*
+%{_mandir}/man8/*.8*
+
+%files php
+%defattr(644,root,root,755)
+%dir %attr(750,root,http) %{_webapps}/%{_webapp}
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webapps}/%{_webapp}/apache.conf
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webapps}/%{_webapp}/httpd.conf
%dir %{_appdir}
%{_appdir}/*.gif
%{_appdir}/*.php
%{_appdir}/*.css
-%{_mandir}/man1/*.1*
-%{_mandir}/man8/*.8*
%define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
%changelog
@@ -83,6 +126,9 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.2 2006/10/02 22:26:09 blues
+- separated daemon and php, more todo, some done
+
Revision 1.1 2006/09/29 13:03:57 blues
- initial release, not tested
================================================================
---- CVS-web:
http://cvs.pld-linux.org/SPECS/mysqlard.spec?r1=1.1&r2=1.2&f=u
More information about the pld-cvs-commit
mailing list