SPECS: hotsanic.spec - builds - needs to be tested
sardzent
sardzent at pld-linux.org
Thu Jun 30 00:30:13 CEST 2005
Author: sardzent Date: Wed Jun 29 22:30:13 2005 GMT
Module: SPECS Tag: HEAD
---- Log message:
- builds
- needs to be tested
---- Files affected:
SPECS:
hotsanic.spec (1.2 -> 1.3)
---- Diffs:
================================================================
Index: SPECS/hotsanic.spec
diff -u SPECS/hotsanic.spec:1.2 SPECS/hotsanic.spec:1.3
--- SPECS/hotsanic.spec:1.2 Wed Jun 1 23:40:29 2005
+++ SPECS/hotsanic.spec Thu Jun 30 00:30:07 2005
@@ -10,14 +10,19 @@
Group: Applications/Networking
Source0: http://dl.sourceforge.net/hotsanic/%{name}-%{version}-%{_pver}.tgz
# Source0-md5: 2b005b9ef437abf105a9426cfea51b11
+Source1: %{name}.conf
URL: http://sourceforge.net/projects/hotsanic/
BuildRequires: ImageMagick-devel
BuildRequires: iptables
+BuildRequires: perl >= 1:5.0.0
BuildRequires: perl-devel >= 1:5.0.0
BuildRequires: rrdtool
BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+%define _sysinfodir %{_datadir}/%{name}
+%define _sysconfdir /etc/%{name}
+
%description
HotSaNIC is a Web-based information center for Unix-based systems.
It gives you a graphical overview about certain network and
@@ -33,22 +38,67 @@
%prep
%setup -q -n %{_name}
-%build
-#%configure
-#%{__make}
-
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_mandir}/man8}
-
-install doc/man/* $RPM_BUILD_ROOT%{_mandir}/man8
+install -d $RPM_BUILD_ROOT%{_sysinfodir}/images \
+ $RPM_BUILD_ROOT%{_sysinfodir}/lib \
+ $RPM_BUILD_ROOT%{_sysinfodir}/tools \
+ $RPM_BUILD_ROOT%{_sysinfodir}/var \
+ $RPM_BUILD_ROOT{%{_sysconfdir}/%{name},/etc/httpd}
+
+install images/*.gif $RPM_BUILD_ROOT%{_sysinfodir}/images
+install lib/*.pm $RPM_BUILD_ROOT%{_sysinfodir}/lib
+install tools/*.sh *.pl $RPM_BUILD_ROOT%{_sysinfodir}/tools
+install tools/{makeperlheaders,killmod} $RPM_BUILD_ROOT%{_sysinfodir}/tools
+cp -r modules $RPM_BUILD_ROOT%{_sysinfodir}
+install %{SOURCE1} $RPM_BUILD_ROOT/etc/httpd/%{name}.conf
%clean
rm -rf $RPM_BUILD_ROOT
+%post
+if [ -f /etc/httpd/httpd.conf ] && ! grep -q "^Include.*%{name}.conf" /etc/httpd/httpd.conf; then
+ echo "Include /etc/httpd/%{name}.conf" >> /etc/httpd/httpd.conf
+ if [ -f /var/lock/subsys/httpd ]; then
+ /usr/sbin/apachectl restart 1>&2
+ fi
+elif [ -d /etc/httpd/httpd.conf ]; then
+ ln -sf /etc/httpd/%{name}.conf /etc/httpd/httpd.conf/99_%{name}.conf
+ if [ -f /var/lock/subsys/httpd ]; then
+ /usr/sbin/apachectl restart 1>&2
+ fi
+fi
+echo " NOTICE"
+echo " You have to run setup.pl script"
+echo " to configure what You want to monitor."
+
+%preun
+if [ "$1" = "0" ]; then
+ umask 027
+ if [ -d /etc/httpd/httpd.conf ]; then
+ rm -f /etc/httpd/httpd.conf/99_%{name}.conf
+ else
+ grep -v "^Include.*%{name}.conf" /etc/httpd/httpd.conf > \
+ /etc/httpd/httpd.conf.tmp
+ mv -f /etc/httpd/httpd.conf.tmp /etc/httpd/httpd.conf
+ fi
+ if [ -f /var/lock/subsys/httpd ]; then
+ /usr/sbin/apachectl restart 1>&2
+ fi
+fi
+
+
%files
%defattr(644,root,root,755)
%doc Documentation/CHANGES Documentation/README Documentation/README.snmp Documentation/TODO
+%dir %{_sysconfdir}
+%config(noreplace) %verify(not size mtime md5) /etc/httpd/%{name}.conf
+%dir %{_sysinfodir}
+%attr(755,root,http) %{_sysinfodir}/images
+%{_sysinfodir}/lib
+%{_sysinfodir}/modules
+%attr(755,root,http) %{_sysinfodir}/tools
+%{_sysinfodir}/var
%define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
%changelog
@@ -56,6 +106,10 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.3 2005/06/29 22:30:07 sardzent
+- builds
+- needs to be tested
+
Revision 1.2 2005/06/01 21:40:29 qboosh
- pl, missing Log
================================================================
---- CVS-web:
http://cvs.pld-linux.org/SPECS/hotsanic.spec?r1=1.2&r2=1.3&f=u
More information about the pld-cvs-commit
mailing list