# # $Id$ # Summary: A utility to collect various linux performance data Name: collectl Version: 2.2.8 Packager: Bruno Cornec <bcornec@mandriva.org> Release: %mkrel 1 License: GPL Group: Monitoring Source0: %{name}-%{version}-src.tar.gz Source1: %{name}-mdv Url: http://collectl.sourceforge.net BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -u -n) BuildArch: noarch %description A utility to collect linux performance data %prep %setup -n %{name}-%{version} %build %clean %{__rm} -Rf $RPM_BUILD_ROOT %install %{__rm} -rf $RPM_BUILD_ROOT # create required directories mkdir -p ${RPM_BUILD_ROOT}/var/log/%{name} ${RPM_BUILD_ROOT}%{_sbindir} ${RPM_BUILD_ROOT}%{_docdir}/%{name} ${RPM_BUILD_ROOT}%{_sysconfdir}/init.d/ ${RPM_BUILD_ROOT}%{_mandir}/man1/ # install the files, setting the mode install -m 755 %{name}.pl ${RPM_BUILD_ROOT}%{_sbindir}/%{name} # Should be put elsewhere normaly install -m 755 formatit.ph ${RPM_BUILD_ROOT}/%{_sbindir}/formatit.ph install -m 444 RELEASE-%{name} FAQ-%{name}.html ${RPM_BUILD_ROOT}%{_docdir}/%{name} install -m 755 %{SOURCE1} ${RPM_BUILD_ROOT}%{_sysconfdir}/init.d/%{name} install -m 644 %{name}.conf ${RPM_BUILD_ROOT}%{_sysconfdir} install -m 644 man1/%{name}*.1 ${RPM_BUILD_ROOT}%{_mandir}/man1/ # lspci is under /usr/bin echo "Lspci = /usr/bin/lspci" >> ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}.conf %files %defattr(-,root,root) %doc RELEASE-%{name} FAQ-%{name}.html %config(noreplace) %{_sysconfdir}/%{name}.conf %dir /var/log/%{name} %{_sbindir}/* %{_mandir}/man1/* %{_sysconfdir}/init.d/%{name} %preun # If collectl is running, stop it before removing. /etc/init.d/%{name} stop chkconfig --del %{name} 2>&1 > /dev/null %post chkconfig --add %{name} 2>&1 > /dev/null /etc/init.d/%{name} start %changelog * Fri Jul 20 2007 Bruno Cornec <bcornec@mandriva.org> 2.2.8-1mdv2008.0 + Revision: 53968 - Doc dir is now without version number - introduction of collectl tool in Mandriva Work needs to be done with upstream to make it more conformant (.ph) - Import collectl * Fri May 18 2007 Mark Seger - move to Open Source * Tue Nov 29 2006 Mark Seger - change locations for installation and build symlinks to everything * Tue Apr 27 2006 Mark Seger - remove relative links to /etc/init.d and put in specific paths to collect-X for suse and debian * Tue Nov 08 2005 Darragh Bailey - Changed the install section to set the permissions and removed the chmod line from the post script section - Updated the postun scriptlet to support upgrades - Added specific entry if redhat distro is detected - Changed to use of double [, since use of single [ in tests which fail will result in an exit code of non 0. - Changed install of init.d scripts so that rpm removes the files it adds and postun script will remove the symlinks added by the post script. * Fri Nov 04 2005 Mark Seger - use of /opt/hp/collectl directory * Fri Jan 14 2005 Mark Seger - changed to support mulitple man pages AND mulitple distros * Mon Oct 13 2003 Mark Seger - added collectl.ph support * Mon Jun 23 2003 Mark Seger - made starting of collectl optional - changed location of man1 * Tue Jun 03 2003 Mark Seger <mark.seger@hp.com? - first attempt to get rpm to do something