munin/munin.spec

156 lines
4.9 KiB
RPMSpec

%define munin_userid 65431
%define munin_groupid 65431
%define htmldir %(apxs -q htdocsdir 2>/dev/null)
%define cgidir %(apxs -q cgidir 2>/dev/null)
Name: munin
Version: 2.0.25
Release: 1mamba
Summary: A networked resource monitoring tool that can help analyze resource trends
Group: Network/Monitoring
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://munin-monitoring.org/
Source: http://downloads.sourceforge.net/project/munin/stable/%{version}/munin-%{version}.tar.gz
License: GPL
## AUTOBUILDREQ-BEGIN
BuildRequires: perl-Date-Manip
BuildRequires: perl-DBD-Pg
BuildRequires: perl-DBI
BuildRequires: perl-devel
BuildRequires: perl-File-Copy-Recursive
BuildRequires: perl-HTML-Template
BuildRequires: perl-IO-Socket-INET6
BuildRequires: perl-libwww
BuildRequires: perl-List-MoreUtils
BuildRequires: perl-Log-Log4perl
BuildRequires: perl-Net-DNS
BuildRequires: perl-Net-IP
BuildRequires: perl-Net-Server
BuildRequires: perl-Net-SNMP
BuildRequires: perl-URI
BuildRequires: perl-XML-LibXML
BuildRequires: perl-XML-Parser
BuildRequires: rrdtool-perl
## AUTOBUILDREQ-END
BuildRequires: perl
BuildRequires: apache
Requires(pre): apache
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
Munin is a networked resource monitoring tool that can help analyze resource trends and "what just happened to kill our performance?" problems. It is designed to be very plug and play. A default installation provides a lot of graphs with almost no work.
%prep
%setup -q
%build
%make -j1 \
PREFIX=%{_prefix} \
CONFDIR=%{_sysconfdir}/munin \
BINDIR=%{_bindir} \
SBINDIR=%{_sbindir} \
DOCDIR=%{_docdir} \
MANDIR=%{_mandir} \
LIBDIR=%{_datadir}/munin \
HTMLDIR=%{htmldir} \
CGIDIR=%{cgidir} \
DBDIR=%{_localstatedir}/cache/munin \
DBDIRNODE=%{_localstatedir}/cache/munin-node
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%makeinstall \
USER=`id -u` GROUP=`id -g` CHOWN=/bin/true \
PREFIX=%{buildroot}%{_prefix} \
CONFDIR=%{buildroot}%{_sysconfdir}/munin \
BINDIR=%{buildroot}%{_bindir} \
SBINDIR=%{buildroot}%{_sbindir} \
DOCDIR=%{buildroot}%{_docdir} \
MANDIR=%{buildroot}%{_mandir} \
LIBDIR=%{buildroot}%{_datadir}/munin \
HTMLDIR=%{buildroot}%{htmldir}/munin \
CGIDIR=%{buildroot}%{cgidir} \
DBDIR=%{buildroot}%{_localstatedir}/cache/munin \
DBDIRNODE=%{buildroot}%{_localstatedir}/cache/munin-node
# Requires perl-DBD-Sybase which requires Sybase installed
rm -f %{buildroot}%{_datadir}/munin/plugins/sybase_space
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%pre
if [ $1 -ge 1 ]; then
groupadd munin -g %{munin_groupid} 2>/dev/null
useradd -u %{munin_userid} -c 'Munin Service' -d /dev/null -g munin \
-s /bin/false munin 2>/dev/null
fi
:
%postun
if [ $1 -eq 0 ]; then
userdel munin 2>/dev/null
groupdel munin 2>/dev/null
fi
:
%files
%defattr(-,root,root)
%dir %{_sysconfdir}/munin
%config(noreplace) %{_sysconfdir}/munin/munin-node.conf
%config(noreplace) %{_sysconfdir}/munin/munin.conf
%dir %{_sysconfdir}/munin/static
%{_sysconfdir}/munin/static/*
%dir %{_sysconfdir}/munin/templates
%{_sysconfdir}/munin/templates/*
%{_bindir}/munin-check
%{_bindir}/munin-cron
%{_bindir}/munindoc
%{_sbindir}/munin-node
%{_sbindir}/munin-node-configure
%{_sbindir}/munin-run
%{_sbindir}/munin-sched
%{cgidir}/munin-cgi-graph
%{cgidir}/munin-cgi-html
%dir %{_datadir}/munin
%{_datadir}/munin/DejaVuSans.ttf
%{_datadir}/munin/DejaVuSansMono.ttf
%{_datadir}/munin/munin-*
%dir %{_datadir}/munin/plugins/
%{_datadir}/munin/plugins/*
%dir %{perl_sitelib}/Munin
%{perl_sitelib}/Munin/*
%{_mandir}/man1/munin*.1*
%{_mandir}/man3/Munin*.3pm*
%{_mandir}/man5/munin*.5*
%{_mandir}/man8/munin*.8*
%attr(-,apache,nobody) %{htmldir}/munin/.htaccess
%attr(-,munin,munin) %dir %{_localstatedir}/cache/munin-node
%attr(-,munin,munin) %dir %{_localstatedir}/cache/munin-node/plugin-state
%attr(-,munin,munin) %dir %{_localstatedir}/cache/munin
%attr(-,apache,nobody) %dir %{_localstatedir}/cache/munin/cgi-tmp
%attr(-,munin,munin) %dir %{_localstatedir}/cache/munin/spool
%attr(-,munin,munin) %dir %{_localstatedir}/run/munin
%doc COPYING
#%doc ChangeLog README README.HP-UX README.OSX
%changelog
* Sat Dec 20 2014 Automatic Build System <autodist@mambasoft.it> 2.0.25-1mamba
- automatic update by autodist
* Wed Oct 29 2014 Automatic Build System <autodist@mambasoft.it> 2.0.24-1mamba
- automatic version update by autodist
* Sun Apr 27 2014 Automatic Build System <autodist@mambasoft.it> 2.0.21-1mamba
- automatic version update by autodist
* Sat Mar 29 2014 Automatic Build System <autodist@mambasoft.it> 2.0.20-1mamba
- automatic version update by autodist
* Sat Mar 01 2014 Automatic Build System <autodist@mambasoft.it> 2.0.19-1mamba
- automatic version update by autodist
* Wed Nov 27 2013 Silvan Calarco <silvan.calarco@mambasoft.it> 2.0.17-1mamba
- package created using the webbuild interface