File isidoc-01.01.05.02.spec of Package test

# RPM spec file for isisdoc

# POST IT Specific
%define pname	isidoc

Name:		pst-%{pname}
Version:	01.01.05.02
Release:	1
License:	Die Schweizerische Post
URL:		http://bullnix.post.ch
Vendor:         Die Schweizerische Post
Source:		%{pname}-%{version}.tar.bz2
Packager:	Claude Struebin <struebinc@post.ch,struebin@gfr.ch>

# we do not want Auto Dependencies (perl path in files)
AutoReqProv: no

#BuildPrereq:	
BuildRoot:	%{_tmppath}/%{pname}-%{version}-root
BuildArch:	noarch

Summary:	Isidoc Client Files (Data Collection)
Group:		System/Monitoring

Prefix:		/opt

%description
Isidoc files to collect system informations

Requires a crontab as root as follows :

42 0 * * 0 /opt/isidoc/mkdatafiles > /dev/null 2>&1 

%prep
%setup -q -n %{pname}

%build
./configure --prefix=.
rm config*
rm makeconf*
rm install-sh
rm -rf bin/arch/solaris

%install
rm -rf %{buildroot}
mkdir -p %{buildroot}/opt/isidoc
cp -R * %{buildroot}/opt/isidoc
mkdir -p  %{buildroot}/opt/isidoc/etc
mkdir -p  %{buildroot}/etc/cron.d

cat > %{buildroot}/etc/cron.d/isidoc <<ieof
# prepare isidoc informations weekly
42 0 * * 0 	root	/opt/isidoc/mkdatafiles > /dev/null 2>&1
ieof

%clean
rm -rf %{buildroot}

%pre
# Add puma user
if getent group puma > /dev/null
then
   echo "--- group puma allready exits ..."
else
   /usr/sbin/groupadd -g 20042 puma
fi

if getent passwd puma > /dev/null
then
   echo "--- user  puma allready exits ..."
else
   /usr/sbin/useradd -c "Post Unified Management Administration" \
	-u 20042 -g 20042 \
	-s /bin/bash -m -d /home/puma puma 2> /dev/null || :
fi

%files
%defattr(-,root,root)
%dir /etc/cron.d
%dir /opt/isidoc/bin/
%dir /opt/isidoc/bin/common
%dir /opt/isidoc/bin/arch/
%dir /opt/isidoc/bin/arch/linux
%dir /opt/isidoc/init/
%attr (-,puma,puma) %dir /opt/isidoc/data/
%attr (-,puma,puma) %dir /opt/isidoc/etc/
/etc/cron.d/isidoc
/opt/isidoc/mkdatafiles
/opt/isidoc/mkhtml
/opt/isidoc/init/getbootinfo.sh
/opt/isidoc/bin/arch.sh
/opt/isidoc/bin/arp.sh
/opt/isidoc/bin/cfg2html_linux.sh
/opt/isidoc/bin/devices.sh
/opt/isidoc/bin/df.sh
/opt/isidoc/bin/etcfiles.sh
/opt/isidoc/bin/hostid.sh
/opt/isidoc/bin/hostname.sh
/opt/isidoc/bin/ifconfig.sh
/opt/isidoc/bin/ip.sh
/opt/isidoc/bin/netstat.sh
/opt/isidoc/bin/osversion.sh
/opt/isidoc/bin/staticinfo.sh
/opt/isidoc/bin/tapedevices.sh
/opt/isidoc/bin/rpminfo.sh
/opt/isidoc/bin/pkgassets.sh
/opt/isidoc/bin/user.sh
/opt/isidoc/bin/uname.sh
/opt/isidoc/bin/arch/linux/cfg2html_linux.sh
/opt/isidoc/bin/arch/linux/rpminfo.sh
/opt/isidoc/bin/common/arch.sh
/opt/isidoc/bin/common/arp.sh
/opt/isidoc/bin/common/devices.sh
/opt/isidoc/bin/common/df.sh
/opt/isidoc/bin/common/etcfiles.sh
/opt/isidoc/bin/common/hostid.sh
/opt/isidoc/bin/common/hostname.sh
/opt/isidoc/bin/common/ifconfig.sh
/opt/isidoc/bin/common/ip.sh
/opt/isidoc/bin/common/netstat.sh
/opt/isidoc/bin/common/osversion.sh
/opt/isidoc/bin/common/staticinfo.sh
/opt/isidoc/bin/common/tapedevices.sh
/opt/isidoc/bin/common/user.sh
/opt/isidoc/bin/common/uname.sh
/opt/isidoc/bin/common/pkgassets.sh

%changelog
* Wed Mar 10 2010 Thomas Hofmann <thomas.hofmann@post.ch>
- Release 01.01.05.01 with ifconfig.sh
* Tue Sep 29 2009 Claude Struebin <struebinc@post.ch>
- Release 01.01.04.16 - OUTDIR for cfg2html to /opt/isidoc/data
* Tue Jul 07 2009 Urs Frey <struebinc@post.ch>
- Update package version with new isidoc files
* Mon Jul 06 2009 Urs Frey <struebinc@post.ch>
- update cfg2html_linux.sh for SLES11 and SAN
* Mon Nov 17 2008 Claude Struebin <struebinc@post.ch>
- pkgassets.sh add CDATA to all fields
* Mon Sep 29 2008 Claude Struebin <struebinc@post.ch>
- pkgassets.sh correct presantation of &,",<, >
* Tue Sep 16 2008 Claude Struebin <struebinc@post.ch>
- add pkgassets.sh correct <cpus></cpus>
* Tue Aug 19 2008 Claude Struebin <struebinc@post.ch>
- add rpminfo.sh, pkgassets.sh
* Mon Feb 18 2008 Claude Struebin <struebinc@post.ch>
- new version of cfg2html_linux.sh
* Tue Jan 15 2008 Claude Struebin <struebinc@post.ch>
- remove .pst from Release
* Thu Oct 11 2007 Claude Struebin <struebinc@post.ch>
- add uname.sh
* Wed Oct 03 2007 Claude Struebin <struebinc@post.ch>
- add cron.d/isidoc
* Wed Oct 03 2007 Claude Struebin <struebinc@post.ch>
- add useradd of puma
* Wed Nov 09 2005 Claude Struebin <struebinc@post.ch>
- New cfg2html_linux version
* Mon Feb 21 2005 Claude Struebin <struebinc@post.ch>
- New cfg2html_linux version
* Wed Jan 19 2005 Claude Struebin <struebinc@post.ch>
- Initial specfile for isidoc