Check_hpasm nagios plugins

My Company using HP Server in production server, after implementing Nagios. we need a plugins to monitoring this HP Server. ok then once again I found a good plugins from http://labs.consol.de/ called check_hpasm, wow many thanks to Lausser the creator,
I'm using CentOs as a base operating system, HP provide the rpm, but I want to build it using the latest package version 4.5.2
Ok then let start to build.
Install based packages for making rpm.
[root@fazries.com ~]# yum install rpm-build make gcc-c++ gcc automake redhat-rpm-config
check the folder at /usr/src/redhat/ for build environtment.
put tarball package (check_hpasm-4.5.2.tar.gz) at SOURCES folder
[root@fazries.com ~]# cd /usr/src/redhat/
[root@fazries.com ~]# ls
BUILD  RPMS  SOURCES  SPECS  SRPMS
[root@fazries.com ~]# cd SOURCES
[root@fazries.com SOURCES]# wget -c http://labs.consol.de/download/shinken-nagios-plugins/check_hpasm-4.5.2.tar.gz
Back to root home and create spec file
[root@fazries.com SOURCES]# cd
[root@fazries.com ~]# vi hpasm.spec
edit hpasm.spec with these syntax below
Summary: Checks the hardware health of Hewlett-Packard Proliant Servers for Nagios
Name: check_hpasm
Version: 4.5
Release: 2%{?dist}
License: GPL
Group: Applications/System
URL: http://labs.consol.de/lang/en/nagios/check_hpasm/
Packager: Fazrie Setyadi
Vendor: Fazrie Setyadi
Source: http://labs.consol.de/download/shinken-nagios-plugins/check_hpasm-4.5.2.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}.%{release}-root

%description
 check_hpasm is a plugin for Nagios which checks the hardware health of Hewlett-Packard Proliant Servers. To accomplish this, you must have installed the hpasm package. The plugin checks the health of

%prep

%setup -n %{name}-%{version}.%{release}

%build

%configure  --libexecdir=%_libdir/nagios/plugins --enable-perfdata --enable-hpacucli --enable-extendedinfo

%install
%{__rm} -rf %{buildroot}
%{__make} install DESTDIR="%{buildroot}"

%clean
%{__rm} -rf %{buildroot}

%files
%defattr(-, root, root, 0755)
%{_libdir}/nagios/plugins/check_hpasm

%changelog
#* Sat Mar 03 2012 Lausser - 4.5.2 - add another error log: Main Memory Corrected Memory Error threshold exceeded.
Run the rpm-build to make rpm, using rpmbuild -ba specfile_name.spec
[root@fazries.com ~]# rpmbuild -ba hpasm.spec 
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.43889
+ umask 022
+ cd /usr/src/redhat/BUILD
+ LANG=C
+ export LANG
+ unset DISPLAY
+ cd /usr/src/redhat/BUILD
+ rm -rf check_hpasm-4.5.2
+ /bin/gzip -dc /usr/src/redhat/SOURCES/check_hpasm-4.5.2.tar.gz
+ tar -xvvf -
drwxr-xr-x koarlmoik/koarlmoik 0 2012-03-23 23:19:19 check_hpasm-4.5.2/
-rw-r--r-- koarlmoik/koarlmoik 0 2012-03-23 23:18:53 check_hpasm-4.5.2/NEWS
-rw-r--r-- koarlmoik/koarlmoik 104 2012-03-23 23:18:53 check_hpasm-4.5.2/Makefile.am
-rw-r--r-- koarlmoik/koarlmoik 20509 2012-03-23 23:18:56 check_hpasm-4.5.2/aclocal.m4
-rw-r--r-- koarlmoik/koarlmoik 18007 2012-03-23 23:18:53 check_hpasm-4.5.2/COPYING
-rw-r--r-- koarlmoik/koarlmoik  9240 2012-03-23 23:18:53 check_hpasm-4.5.2/INSTALL
-rw-r--r-- koarlmoik/koarlmoik 13621 2012-03-23 23:18:53 check_hpasm-4.5.2/README
-rwxr-xr-x koarlmoik/koarlmoik 97154 2012-03-23 23:19:11 check_hpasm-4.5.2/configure
-rwxr-xr-x koarlmoik/koarlmoik 42929 2012-03-23 23:18:53 check_hpasm-4.5.2/config.guess
-rw-r--r-- koarlmoik/koarlmoik  1083 2012-03-23 23:18:53 check_hpasm-4.5.2/TODO
-rw-r--r-- koarlmoik/koarlmoik 17850 2012-03-23 23:19:02 check_hpasm-4.5.2/Makefile.in
-rw-r--r-- koarlmoik/koarlmoik    44 2012-03-23 23:18:53 check_hpasm-4.5.2/AUTHORS
-rwxr-xr-x koarlmoik/koarlmoik 10678 2012-03-23 23:18:53 check_hpasm-4.5.2/missing
-rwxr-xr-x koarlmoik/koarlmoik  8316 2012-03-23 23:18:53 check_hpasm-4.5.2/install-sh
-rw-r--r-- koarlmoik/koarlmoik  2407 2012-03-23 23:18:53 check_hpasm-4.5.2/acinclude.m4
drwxr-xr-x koarlmoik/koarlmoik     0 2012-03-23 23:19:19 check_hpasm-4.5.2/plugins-scripts/
-rw-r--r-- koarlmoik/koarlmoik  6263 2012-03-23 23:18:53 check_hpasm-4.5.2/plugins-scripts/check_hpasm.pl
-rw-r--r-- koarlmoik/koarlmoik  3559 2012-03-23 23:18:53 check_hpasm-4.5.2/plugins-scripts/Makefile.am
-rw-r--r-- koarlmoik/koarlmoik 13449 2012-03-23 23:19:02 check_hpasm-4.5.2/plugins-scripts/Makefile.in
-rw-r--r-- koarlmoik/koarlmoik  1460 2012-03-23 23:18:53 check_hpasm-4.5.2/plugins-scripts/subst.in
drwxr-xr-x koarlmoik/koarlmoik     0 2012-03-23 23:19:19 check_hpasm-4.5.2/plugins-scripts/Nagios/
-rw-r--r-- koarlmoik/koarlmoik  8337 2012-03-23 23:18:53 check_hpasm-4.5.2/plugins-scripts/Nagios/MiniPlugin.pm
drwxr-xr-x koarlmoik/koarlmoik     0 2012-03-23 23:19:21 check_hpasm-4.5.2/plugins-scripts/HP/
-rw-r--r-- koarlmoik/koarlmoik 26688 2012-03-23 23:18:53 check_hpasm-4.5.2/plugins-scripts/HP/Proliant.pm
-rw-r--r-- koarlmoik/koarlmoik  8328 2012-03-23 23:18:53 check_hpasm-4.5.2/plugins-scripts/HP/BladeSystem.pm
drwxr-xr-x koarlmoik/koarlmoik     0 2012-03-23 23:19:19 check_hpasm-4.5.2/plugins-scripts/HP/SNMP/
-rw-r--r-- koarlmoik/koarlmoik  2606 2012-03-23 23:18:53 check_hpasm-4.5.2/plugins-scripts/HP/SNMP/Utils.pm
drwxr-xr-x koarlmoik/koarlmoik     0 2012-03-23 23:19:21 check_hpasm-4.5.2/plugins-scripts/HP/Proliant/
drwxr-xr-x koarlmoik/koarlmoik     0 2012-03-23 23:19:21 check_hpasm-4.5.2/plugins-scripts/HP/Proliant/Component/
drwxr-xr-x koarlmoik/koarlmoik     0 2012-03-23 23:19:20 check_hpasm-4.5.2/plugins-scripts/HP/Proliant/Component/EventSubsystem/
-rw-r--r-- koarlmoik/koarlmoik  2073 2012-03-23 23:18:53 check_hpasm-4.5.2/plugins-scripts/HP/Proliant/Component/EventSubsystem/CLI.pm
-rw-r--r-- koarlmoik/koarlmoik  7949 2012-03-23 23:18:53 check_hpasm-4.5.2/plugins-scripts/HP/Proliant/Component/EventSubsystem/SNMP.pm
-rw-r--r-- koarlmoik/koarlmoik  6774 2012-03-23 23:18:53 check_hpasm-4.5.2/plugins-scripts/HP/Proliant/Component/NicSubsystem.pm
drwxr-xr-x koarlmoik/koarlmoik     0 2012-03-23 23:19:20 check_hpasm-4.5.2/plugins-scripts/HP/Proliant/Component/AsrSubsystem/
-rw-r--r-- koarlmoik/koarlmoik   577 2012-03-23 23:18:53 check_hpasm-4.5.2/plugins-scripts/HP/Proliant/Component/AsrSubsystem/CLI.pm
-rw-r--r-- koarlmoik/koarlmoik  1707 2012-03-23 23:18:53 check_hpasm-4.5.2/plugins-scripts/HP/Proliant/Component/AsrSubsystem/SNMP.pm
-rw-r--r-- koarlmoik/koarlmoik  4484 2012-03-23 23:18:53 check_hpasm-4.5.2/plugins-scripts/HP/Proliant/Component/DiskSubsystem.pm
-rw-r--r-- koarlmoik/koarlmoik  5788 2012-03-23 23:18:53 check_hpasm-4.5.2/plugins-scripts/HP/Proliant/Component/TemperatureSubsystem.pm
-rw-r--r-- koarlmoik/koarlmoik  6012 2012-03-23 23:18:53 check_hpasm-4.5.2/plugins-scripts/HP/Proliant/Component/PowersupplySubsystem.pm
drwxr-xr-x koarlmoik/koarlmoik     0 2012-03-23 23:19:20 check_hpasm-4.5.2/plugins-scripts/HP/Proliant/Component/NicSubsystem/
-rw-r--r-- koarlmoik/koarlmoik  6908 2012-03-23 23:18:53 check_hpasm-4.5.2/plugins-scripts/HP/Proliant/Component/NicSubsystem/SNMP.pm
drwxr-xr-x koarlmoik/koarlmoik     0 2012-03-23 23:19:20 check_hpasm-4.5.2/plugins-scripts/HP/Proliant/Component/PowersupplySubsystem/
-rw-r--r-- koarlmoik/koarlmoik  2361 2012-03-23 23:18:53 check_hpasm-4.5.2/plugins-scripts/HP/Proliant/Component/PowersupplySubsystem/CLI.pm
-rw-r--r-- koarlmoik/koarlmoik  2925 2012-03-23 23:18:53 check_hpasm-4.5.2/plugins-scripts/HP/Proliant/Component/PowersupplySubsystem/SNMP.pm
drwxr-xr-x koarlmoik/koarlmoik     0 2012-03-23 23:19:21 check_hpasm-4.5.2/plugins-scripts/HP/Proliant/Component/DiskSubsystem/
-rw-r--r-- koarlmoik/koarlmoik  7171 2012-03-23 23:18:53 check_hpasm-4.5.2/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Sas.pm
-rw-r--r-- koarlmoik/koarlmoik  7868 2012-03-23 23:18:53 check_hpasm-4.5.2/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Ide.pm
drwxr-xr-x koarlmoik/koarlmoik     0 2012-03-23 23:19:20 check_hpasm-4.5.2/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Ide/
-rw-r--r-- koarlmoik/koarlmoik   496 2012-03-23 23:18:53 check_hpasm-4.5.2/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Ide/CLI.pm
-rw-r--r-- koarlmoik/koarlmoik  3868 2012-03-23 23:18:53 check_hpasm-4.5.2/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Ide/SNMP.pm
drwxr-xr-x koarlmoik/koarlmoik     0 2012-03-23 23:19:21 check_hpasm-4.5.2/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Fca/
-rw-r--r-- koarlmoik/koarlmoik   691 2012-03-23 23:18:53 check_hpasm-4.5.2/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Fca/CLI.pm
-rw-r--r-- koarlmoik/koarlmoik  8546 2012-03-23 23:18:53 check_hpasm-4.5.2/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Fca/SNMP.pm
-rw-r--r-- koarlmoik/koarlmoik 10765 2012-03-23 23:18:53 check_hpasm-4.5.2/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Da.pm
drwxr-xr-x koarlmoik/koarlmoik     0 2012-03-23 23:19:20 check_hpasm-4.5.2/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Da/
-rw-r--r-- koarlmoik/koarlmoik  8115 2012-03-23 23:18:53 check_hpasm-4.5.2/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Da/CLI.pm
-rw-r--r-- koarlmoik/koarlmoik  5861 2012-03-23 23:18:53 check_hpasm-4.5.2/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Da/SNMP.pm
-rw-r--r-- koarlmoik/koarlmoik  6045 2012-03-23 23:18:53 check_hpasm-4.5.2/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Scsi.pm
drwxr-xr-x koarlmoik/koarlmoik     0 2012-03-23 23:19:20 check_hpasm-4.5.2/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Scsi/
-rw-r--r-- koarlmoik/koarlmoik   498 2012-03-23 23:18:53 check_hpasm-4.5.2/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Scsi/CLI.pm
-rw-r--r-- koarlmoik/koarlmoik  4243 2012-03-23 23:18:53 check_hpasm-4.5.2/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Scsi/SNMP.pm
-rw-r--r-- koarlmoik/koarlmoik 12144 2012-03-23 23:18:53 check_hpasm-4.5.2/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Fca.pm
drwxr-xr-x koarlmoik/koarlmoik     0 2012-03-23 23:19:20 check_hpasm-4.5.2/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Sas/
-rw-r--r-- koarlmoik/koarlmoik   496 2012-03-23 23:18:53 check_hpasm-4.5.2/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Sas/CLI.pm
-rw-r--r-- koarlmoik/koarlmoik  3795 2012-03-23 23:18:53 check_hpasm-4.5.2/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Sas/SNMP.pm
-rw-r--r-- koarlmoik/koarlmoik  9502 2012-03-23 23:18:53 check_hpasm-4.5.2/plugins-scripts/HP/Proliant/Component/FanSubsystem.pm
drwxr-xr-x koarlmoik/koarlmoik     0 2012-03-23 23:19:20 check_hpasm-4.5.2/plugins-scripts/HP/Proliant/Component/MemorySubsystem/
-rw-r--r-- koarlmoik/koarlmoik  2675 2012-03-23 23:18:53 check_hpasm-4.5.2/plugins-scripts/HP/Proliant/Component/MemorySubsystem/CLI.pm
-rw-r--r-- koarlmoik/koarlmoik 26266 2012-03-23 23:18:53 check_hpasm-4.5.2/plugins-scripts/HP/Proliant/Component/MemorySubsystem/SNMP.pm
-rw-r--r-- koarlmoik/koarlmoik  7780 2012-03-23 23:18:53 check_hpasm-4.5.2/plugins-scripts/HP/Proliant/Component/EventSubsystem.pm
drwxr-xr-x koarlmoik/koarlmoik     0 2012-03-23 23:19:20 check_hpasm-4.5.2/plugins-scripts/HP/Proliant/Component/CpuSubsystem/
-rw-r--r-- koarlmoik/koarlmoik  1365 2012-03-23 23:18:53 check_hpasm-4.5.2/plugins-scripts/HP/Proliant/Component/CpuSubsystem/CLI.pm
-rw-r--r-- koarlmoik/koarlmoik  1235 2012-03-23 23:18:53 check_hpasm-4.5.2/plugins-scripts/HP/Proliant/Component/CpuSubsystem/SNMP.pm
-rw-r--r-- koarlmoik/koarlmoik  2919 2012-03-23 23:18:53 check_hpasm-4.5.2/plugins-scripts/HP/Proliant/Component/CpuSubsystem.pm
-rw-r--r-- koarlmoik/koarlmoik  1911 2012-03-23 23:18:53 check_hpasm-4.5.2/plugins-scripts/HP/Proliant/Component/SNMP.pm
-rw-r--r-- koarlmoik/koarlmoik  6168 2012-03-23 23:18:53 check_hpasm-4.5.2/plugins-scripts/HP/Proliant/Component/MemorySubsystem.pm
-rw-r--r-- koarlmoik/koarlmoik   951 2012-03-23 23:18:53 check_hpasm-4.5.2/plugins-scripts/HP/Proliant/Component/AsrSubsystem.pm
drwxr-xr-x koarlmoik/koarlmoik     0 2012-03-23 23:19:20 check_hpasm-4.5.2/plugins-scripts/HP/Proliant/Component/TemperatureSubsystem/
-rw-r--r-- koarlmoik/koarlmoik  1835 2012-03-23 23:18:53 check_hpasm-4.5.2/plugins-scripts/HP/Proliant/Component/TemperatureSubsystem/CLI.pm
-rw-r--r-- koarlmoik/koarlmoik  3151 2012-03-23 23:18:53 check_hpasm-4.5.2/plugins-scripts/HP/Proliant/Component/TemperatureSubsystem/SNMP.pm
drwxr-xr-x koarlmoik/koarlmoik     0 2012-03-23 23:19:20 check_hpasm-4.5.2/plugins-scripts/HP/Proliant/Component/FanSubsystem/
-rw-r--r-- koarlmoik/koarlmoik  3676 2012-03-23 23:18:53 check_hpasm-4.5.2/plugins-scripts/HP/Proliant/Component/FanSubsystem/CLI.pm
-rw-r--r-- koarlmoik/koarlmoik  7029 2012-03-23 23:18:53 check_hpasm-4.5.2/plugins-scripts/HP/Proliant/Component/FanSubsystem/SNMP.pm
-rw-r--r-- koarlmoik/koarlmoik    67 2012-03-23 23:18:53 check_hpasm-4.5.2/plugins-scripts/HP/Proliant/Component.pm
drwxr-xr-x koarlmoik/koarlmoik     0 2012-03-23 23:19:21 check_hpasm-4.5.2/plugins-scripts/HP/BladeSystem/
drwxr-xr-x koarlmoik/koarlmoik     0 2012-03-23 23:19:21 check_hpasm-4.5.2/plugins-scripts/HP/BladeSystem/Component/
-rw-r--r-- koarlmoik/koarlmoik  8722 2012-03-23 23:18:53 check_hpasm-4.5.2/plugins-scripts/HP/BladeSystem/Component/PowerSupplySubsystem.pm
drwxr-xr-x koarlmoik/koarlmoik     0 2012-03-23 23:19:21 check_hpasm-4.5.2/plugins-scripts/HP/BladeSystem/Component/CommonEnclosureSubsystem/
-rw-r--r-- koarlmoik/koarlmoik  4000 2012-03-23 23:18:53 check_hpasm-4.5.2/plugins-scripts/HP/BladeSystem/Component/CommonEnclosureSubsystem/FuseSubsystem.pm
-rw-r--r-- koarlmoik/koarlmoik  5740 2012-03-23 23:18:53 check_hpasm-4.5.2/plugins-scripts/HP/BladeSystem/Component/CommonEnclosureSubsystem/TempSubsystem.pm
-rw-r--r-- koarlmoik/koarlmoik  5122 2012-03-23 23:18:53 check_hpasm-4.5.2/plugins-scripts/HP/BladeSystem/Component/CommonEnclosureSubsystem/FanSubsystem.pm
-rw-r--r-- koarlmoik/koarlmoik  5962 2012-03-23 23:18:53 check_hpasm-4.5.2/plugins-scripts/HP/BladeSystem/Component/CommonEnclosureSubsystem/ManagerSubsystem.pm
-rw-r--r-- koarlmoik/koarlmoik  6738 2012-03-23 23:18:53 check_hpasm-4.5.2/plugins-scripts/HP/BladeSystem/Component/CommonEnclosureSubsystem.pm
-rw-r--r-- koarlmoik/koarlmoik  4881 2012-03-23 23:18:53 check_hpasm-4.5.2/plugins-scripts/HP/BladeSystem/Component/NetConnectorSubsystem.pm
-rw-r--r-- koarlmoik/koarlmoik  4012 2012-03-23 23:18:53 check_hpasm-4.5.2/plugins-scripts/HP/BladeSystem/Component/PowerEnclosureSubsystem.pm
-rw-r--r-- koarlmoik/koarlmoik  5873 2012-03-23 23:18:53 check_hpasm-4.5.2/plugins-scripts/HP/BladeSystem/Component/ServerBladeSubsystem.pm
-rw-r--r-- koarlmoik/koarlmoik    86 2012-03-23 23:18:53 check_hpasm-4.5.2/plugins-scripts/HP/BladeSystem/Component.pm
-rw-r--r-- koarlmoik/koarlmoik 13469 2012-03-23 23:18:53 check_hpasm-4.5.2/plugins-scripts/HP/Server.pm
-rw-r--r-- koarlmoik/koarlmoik  8831 2012-03-23 23:18:53 check_hpasm-4.5.2/plugins-scripts/HP/Storage.pm
-rwxr-xr-x koarlmoik/koarlmoik 30845 2012-03-23 23:18:53 check_hpasm-4.5.2/config.sub
-rw-r--r-- koarlmoik/koarlmoik  3786 2012-03-23 23:18:53 check_hpasm-4.5.2/configure.in
-rw-r--r-- koarlmoik/koarlmoik  7084 2012-03-23 23:18:53 check_hpasm-4.5.2/ChangeLog
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd check_hpasm-4.5.2
++ /usr/bin/id -u
+ '[' 0 = 0 ']'
+ /bin/chown -Rhf root .
++ /usr/bin/id -u
+ '[' 0 = 0 ']'
+ /bin/chgrp -Rhf root .
+ /bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.43889
+ umask 022
+ cd /usr/src/redhat/BUILD
+ cd check_hpasm-4.5.2
+ LANG=C
+ export LANG
+ unset DISPLAY
+ CFLAGS='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic'
+ export CFLAGS
+ CXXFLAGS='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic'
+ export CXXFLAGS
+ FFLAGS='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic'
+ export FFLAGS
++ find . -name config.guess -o -name config.sub
+ for i in '$(find . -name config.guess -o -name config.sub)'
++ basename ./config.sub
+ '[' -f /usr/lib/rpm/redhat/config.sub ']'
+ /bin/rm -f ./config.sub
++ basename ./config.sub
+ /bin/cp -fv /usr/lib/rpm/redhat/config.sub ./config.sub
`/usr/lib/rpm/redhat/config.sub' -> `./config.sub'
+ for i in '$(find . -name config.guess -o -name config.sub)'
++ basename ./config.guess
+ '[' -f /usr/lib/rpm/redhat/config.guess ']'
+ /bin/rm -f ./config.guess
++ basename ./config.guess
+ /bin/cp -fv /usr/lib/rpm/redhat/config.guess ./config.guess
`/usr/lib/rpm/redhat/config.guess' -> `./config.guess'
+ ./configure --build=x86_64-redhat-linux-gnu --host=x86_64-redhat-linux-gnu --target=x86_64-redhat-linux-gnu --program-prefix= --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/usr/com --mandir=/usr/share/man --infodir=/usr/share/info --libexecdir=/usr/lib64/nagios/plugins --enable-perfdata --enable-hpacucli --enable-extendedinfo
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking how to create a pax tar archive... gnutar
checking build system type... x86_64-redhat-linux-gnu
checking host system type... x86_64-redhat-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether make sets $(MAKE)... (cached) yes
checking for gawk... (cached) gawk
checking for sh... /bin/sh
checking for perl... /usr/bin/perl
configure: creating ./config.status
config.status: creating Makefile
config.status: creating plugins-scripts/Makefile
config.status: creating plugins-scripts/subst
                       --with-perl: /usr/bin/perl
                --with-nagios-user: nagios
               --with-nagios-group: nagios
               --with-noinst-level: unknown
                    --with-degrees: unknown
                 --enable-perfdata: yes
             --enable-extendedinfo: yes
                   --enable-hwinfo: yes
                 --enable-hpacucli: yes
+ exit 0
Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.89408
+ umask 022
+ cd /usr/src/redhat/BUILD
+ cd check_hpasm-4.5.2
+ LANG=C
+ export LANG
+ unset DISPLAY
+ /bin/rm -rf /var/tmp/check_hpasm-4.5.2-root
+ /usr/bin/make install DESTDIR=/var/tmp/check_hpasm-4.5.2-root
Making install in plugins-scripts
make[1]: Entering directory `/usr/src/redhat/BUILD/check_hpasm-4.5.2/plugins-scripts'
/bin/echo "#! #PERL# -w" | gawk -f ./subst > check_hpasm
/bin/echo >> check_hpasm
for m in Nagios/MiniPlugin.pm HP/SNMP/Utils.pm HP/Proliant/Component/EventSubsystem.pm HP/Proliant/Component/EventSubsystem/CLI.pm HP/Proliant/Component/EventSubsystem/SNMP.pm HP/Proliant/Component/PowersupplySubsystem.pm HP/Proliant/Component/PowersupplySubsystem/CLI.pm HP/Proliant/Component/PowersupplySubsystem/SNMP.pm HP/Proliant/Component/TemperatureSubsystem.pm HP/Proliant/Component/TemperatureSubsystem/CLI.pm HP/Proliant/Component/TemperatureSubsystem/SNMP.pm HP/Proliant/Component/CpuSubsystem.pm HP/Proliant/Component/CpuSubsystem/CLI.pm HP/Proliant/Component/CpuSubsystem/SNMP.pm HP/Proliant/Component/FanSubsystem.pm HP/Proliant/Component/FanSubsystem/CLI.pm HP/Proliant/Component/FanSubsystem/SNMP.pm HP/Proliant/Component/MemorySubsystem/CLI.pm HP/Proliant/Component/MemorySubsystem/SNMP.pm HP/Proliant/Component/MemorySubsystem.pm HP/Proliant/Component/NicSubsystem/SNMP.pm HP/Proliant/Component/NicSubsystem.pm HP/Proliant/Component/AsrSubsystem/CLI.pm HP/Proliant/Component/AsrSubsystem/SNMP.pm HP/Proliant/Component/AsrSubsystem.pm HP/Proliant/Component/SNMP.pm HP/Proliant/Component/DiskSubsystem/Da/CLI.pm HP/Proliant/Component/DiskSubsystem/Da/SNMP.pm HP/Proliant/Component/DiskSubsystem/Da.pm HP/Proliant/Component/DiskSubsystem/Sas/CLI.pm HP/Proliant/Component/DiskSubsystem/Sas/SNMP.pm HP/Proliant/Component/DiskSubsystem/Sas.pm HP/Proliant/Component/DiskSubsystem/Scsi/CLI.pm HP/Proliant/Component/DiskSubsystem/Scsi/SNMP.pm HP/Proliant/Component/DiskSubsystem/Scsi.pm HP/Proliant/Component/DiskSubsystem/Ide/CLI.pm HP/Proliant/Component/DiskSubsystem/Ide/SNMP.pm HP/Proliant/Component/DiskSubsystem/Ide.pm HP/Proliant/Component/DiskSubsystem/Fca/CLI.pm HP/Proliant/Component/DiskSubsystem/Fca/SNMP.pm HP/Proliant/Component/DiskSubsystem/Fca.pm HP/Proliant/Component/DiskSubsystem.pm HP/Proliant/Component.pm HP/Proliant.pm HP/BladeSystem/Component/CommonEnclosureSubsystem.pm HP/BladeSystem/Component/CommonEnclosureSubsystem/FanSubsystem.pm HP/BladeSystem/Component/CommonEnclosureSubsystem/TempSubsystem.pm HP/BladeSystem/Component/CommonEnclosureSubsystem/FuseSubsystem.pm HP/BladeSystem/Component/CommonEnclosureSubsystem/ManagerSubsystem.pm HP/BladeSystem/Component/PowerEnclosureSubsystem.pm HP/BladeSystem/Component/PowerSupplySubsystem.pm HP/BladeSystem/Component/NetConnectorSubsystem.pm HP/BladeSystem/Component/ServerBladeSubsystem.pm HP/BladeSystem/Component.pm HP/BladeSystem.pm HP/Storage.pm HP/Server.pm ; do \
  /bin/sed -e 's/^1;//g' < $m | gawk -f ./subst | /bin/grep -v "use Nagios::Plugin" >> check_hpasm; \
 done
/bin/echo "package main;" >> check_hpasm
/bin/cat check_hpasm.pl | gawk -f ./subst >> check_hpasm
chmod +x check_hpasm
make[2]: Entering directory `/usr/src/redhat/BUILD/check_hpasm-4.5.2/plugins-scripts'
test -z "/usr/lib64/nagios/plugins" || mkdir -p -- "/var/tmp/check_hpasm-4.5.2-root/usr/lib64/nagios/plugins"
 /usr/bin/install -c 'check_hpasm' '/var/tmp/check_hpasm-4.5.2-root/usr/lib64/nagios/plugins/check_hpasm'
make[2]: Nothing to be done for `install-data-am'.
make[2]: Leaving directory `/usr/src/redhat/BUILD/check_hpasm-4.5.2/plugins-scripts'
make[1]: Leaving directory `/usr/src/redhat/BUILD/check_hpasm-4.5.2/plugins-scripts'
make[1]: Entering directory `/usr/src/redhat/BUILD/check_hpasm-4.5.2'
make[2]: Entering directory `/usr/src/redhat/BUILD/check_hpasm-4.5.2'
make[2]: Nothing to be done for `install-exec-am'.
make[2]: Nothing to be done for `install-data-am'.
make[2]: Leaving directory `/usr/src/redhat/BUILD/check_hpasm-4.5.2'
make[1]: Leaving directory `/usr/src/redhat/BUILD/check_hpasm-4.5.2'
+ /usr/lib/rpm/find-debuginfo.sh /usr/src/redhat/BUILD/check_hpasm-4.5.2
+ /usr/lib/rpm/redhat/brp-compress
+ /usr/lib/rpm/redhat/brp-strip-static-archive /usr/bin/strip
+ /usr/lib/rpm/redhat/brp-strip-comment-note /usr/bin/strip /usr/bin/objdump
+ /usr/lib/rpm/brp-python-bytecompile
+ /usr/lib/rpm/redhat/brp-java-repack-jars
Processing files: check_hpasm-4.5-2
Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1
Requires: /usr/bin/perl perl(Data::Dumper) perl(Exporter) perl(File::Basename) perl(Getopt::Long) perl(Time::Local) perl(constant) perl(strict)
Processing files: check_hpasm-debuginfo-4.5-2
Checking for unpackaged file(s): /usr/lib/rpm/check-files /var/tmp/check_hpasm-4.5.2-root
Wrote: /usr/src/redhat/SRPMS/check_hpasm-4.5-2.src.rpm
Wrote: /usr/src/redhat/RPMS/x86_64/check_hpasm-4.5-2.x86_64.rpm
Wrote: /usr/src/redhat/RPMS/x86_64/check_hpasm-debuginfo-4.5-2.x86_64.rpm
Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.40512
+ umask 022
+ cd /usr/src/redhat/BUILD
+ cd check_hpasm-4.5.2
+ /bin/rm -rf /var/tmp/check_hpasm-4.5.2-root
+ exit 0
After it finish, check your package at /usr/src/redhat/RPMS/(arch).
[root@fazries.com ~]# cd /usr/src/redhat/
[root@fazries.com redhat]# ls RPMS/x86_64/
check_hpasm-4.5-2.x86_64.rpm  check_hpasm-debuginfo-4.5-2.x86_64.rpm

[root@fazries.com redhat]# ls SRPMS/   
check_hpasm-4.5-2.src.rpm
we can also use the src.rpm,so next time just run, rpmbuild --rebuild check_hpasm-4.5-2.src.rpm
thanks to:
http://labs.consol.de/

Comments