# $Id: ITO.spec,v 1.6 2010/12/09 19:36:38 ksb Exp $ # $KeyFile: ${echo:-echo} tempstats.pl.host %define _tmpdir /tmp %define _local_prefix /usr/local %define _local_bindir %{_local_prefix}/libexec %define _local_docdir /usr/share/doc/%{name}-%{version} # for signing of packages #%_signature gpg #%_gpg_name FIXME@example.org # %dist should be defined on the target but in case it isn't we can guess one %define distguess %(cat /etc/{redhat,fedora,suse,ubuntu}-release | sed -e 's/Fedora Core/fc@/; s/Fedora/f@/; s/Red Hat[^0-9]*\(Enterprise|Server\)*[^0-9]*/rhel@/; s/Red Hat[^0-9]*/rh/; s/.*Suse[^0-9]*/se@/; s/Ubuntu[^0-9]*/ubuntu@/; s/@[^0-9]*//;s/\([0-9][0-9]*\)[^0-9][^0-9]*\([0-9][0-9]*\)/\1_\2/; s/[^0-9]*$//') %{!?dist:%define dist .%{distguess}} # Do not generate debugging packages by default - older versions of rpmbuild # (like RehHat 6.2) choke on the line with the percent in the macro name: # We need a sed spell on RH6.x to "s/\(^.define \)%d/\1d/", Sigh. -- ksb %define debug_package %{nil} Name: tempstats Version: 1.7 Release: 1%{?dist} BuildRoot: %{_tmpdir}/%{name}-%{version}-%{release} Vendor: NPCGuild.org Summary: NPC tool for monitoring the temperature sensors on unix hosts Group: Utilities License: BSD URL: http://patch.sac.fedex.com/RPMS Source: http://patch.sac.fedex.com/tarball/%{name}-%{version}.tgz BuildRequires: gcc m4 msrc_base install_base # Autoreq:0 prevents misleading depencies from being generated. Normally, this # is perfectly sane; however, the system is picking up mk directives and # mkcmd directives as well as system depencies. Autoreq: 1 Requires: /bin/ksh install_base rrdup perl %description tempstats groks the temperature related output of hpasmcli, and sends and update to PEG. The init script is provided by another package, but it can also be called from cron. %prep %setup -q %install %build umask 022 mkdir -p %{buildroot}/%{_local_bindir} mkdir -p %{buildroot}/%{_local_docdir} F=`mktemp -d /tmp/bmHMXXXXXX` mmsrc -y INTO=$F -Cauto.cf -- make DESTDIR=%{buildroot} install install README %{buildroot}/%{_local_docdir}/ rm -rf $F find %{buildroot} -depth -type d -name OLD -exec rm -rf \{\} \; %clean # Do not confilct with the next user of the fixed-path build directory rm -rf %{buildroot} %files %defattr(-,root,root) %{_local_bindir}/%{name} %doc %{_local_docdir}/ %changelog * Sat Dec 26 2009 KS Braunsdorf - made the program smalled by putting the tabs back (in place of spaces). * Sat Dec 26 2009 KS Braunsdorf - minor msync bugs fixed for Ed * Thu Nov 20 2008 Ed Anderson - Built the RPM spec file and added it to the msrc cache