# Can, optionaly, be define at build time (see README.RPM) # - ocstag : administrative tag # - ocsserver : OCS Inventory NG communication serveur Name: ocsinventory-agent Summary: Open Computer and Software Inventory Next Generation client Version: 0.0.9.2 Release: 1%{?dist}%{?ocstag:.%{ocstag}} #Source0: http://search.cpan.org/CPAN/authors/id/G/GO/GONERI/Ocsinventory-Agent-%{version}.tar.gz Source0: http://nana.rulezlan.org/~goneri/ocsinventory-agent/Ocsinventory-Agent-nobundle-%{version}.tar.gz Source1: %{name}.logrotate Source2: %{name}.cron Source11: %{name}.README Source12: %{name}.README.fr Patch1: %{name}-options.patch Group: Development/Libraries License: GPLv2 URL: http://www.ocsinventory-ng.org/ BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: perl(Module::Install) perl(XML::Simple) perl(LWP) perl(Net::IP) BuildRequires: perl(Digest::MD5) perl(File::Temp) perl(XML::SAX) Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) Requires: net-tools, pciutils Requires: %{_sysconfdir}/logrotate.d, %{_sysconfdir}/cron.hourly Requires: perl(HTTP::Request) Requires: perl(Proc::Daemon) Requires: nmap Requires: monitor-edid # Optionnal : dmidecode on x86, /proc in ppc # Requires: %{_sbindir}/dmidecode # Optionnal : ipdiscover or nmap, monitor-edid # Requires: ocsinventory-ipdiscover, nmap, monitor-edid Obsoletes: ocsinventory-client <= 1.01 Provides: ocsinventory-client = 1.02 # use the following line when version is strictly above 1.01 # ocsinventory-client = %{version}-%{release} %description Open Computer and Software Inventory Next Generation is an application designed to help a network or system administrator keep track of computer configuration and software installed on the network. It also allows deploying softwares, commands or files on Windows and Linux client computers. %{name} provides the client for Linux (Unified Unix Agent). %description -l fr Open Computer and Software Inventory Next Generation est une application destinée à aider l'administrateur système ou réseau à garder un oeil sur la configuration des machines du réseau et sur les logiciels qui y sont installés. Elle autorise aussi la télédiffusion (ou déploiement) de logiciels, de commandes ou de fichiers sur les clients Windows ou Linux. %{name} fournit le client pour Linux (Agent Unix Unifié) %prep %setup -q -n Ocsinventory-Agent-%{version} %patch1 -p0 cat <%{name}.conf # # OCS Inventory "Unix Unified Agent" Configuration File # used by hourly cron job # %if 0%{?ocsserver:1} # Mode, change to "none" to disable OCSMODE[0]=cron %else # Mode, change to "cron" to activate OCSMODE[0]=none %endif # can be used to override the %{name}.cfg setup. # OCSSERVER[0]=http://your.ocsserver.name/ocsinventory # # corresponds with --local=%{_localstatedir}/lib/%{name} # OCSSERVER[0]=local # Wait before inventory OCSPAUSE[0]=100 # Administrative TAG (optional, must be filed before first inventory) OCSTAG[0]=%{?ocstag} EOF cat <%{name}.cfg # # OCS Inventory "Unix Unified Agent" Configuration File # # options used by cron job overides this (see /etc/sysconfig/%{name}) # %if 0%{?ocsserver:1} server = http://%{ocsserver}/ocsinventory %else # Server URL, unconmment if needed # server = http://your.ocsserver.name/ocsinventory local = %{_localstatedir}/lib/%{name} %endif # Administrative TAG (optional, must be filed before first inventory) # tag = your_tag # How to log, can be File,Stderr,Syslog logger = Stderr logfile = %{_localstatedir}/log/%{name}/%{name}.log EOF cp %{SOURCE11} README.RPM cp %{SOURCE12} README.RPM.fr %build %{__perl} Makefile.PL INSTALLDIRS=vendor make %{?_smp_mflags} %install rm -rf %{buildroot} make pure_install PERL_INSTALL_ROOT=%{buildroot} find %{buildroot} -type f -name .packlist -exec rm -f {} ';' find %{buildroot} -type d -depth -exec rmdir {} 2>/dev/null ';' chmod -R u+rwX,go+rX,go-w %{buildroot}/* # Move exe to root directory mv %{buildroot}%{_bindir} %{buildroot}%{_sbindir} %{__mkdir_p} %{buildroot}%{_localstatedir}/{log,lib}/%{name} %{__mkdir_p} %{buildroot}%{_sysconfdir}/{logrotate.d,sysconfig,cron.hourly,ocsinventory} %{__install} -pm 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/logrotate.d/%{name} %{__install} -m 644 %{name}.conf %{buildroot}%{_sysconfdir}/sysconfig/%{name} sed -e 's;/etc/;%{_sysconfdir}/;' \ -e 's;/var/;%{_localstatedir}/;' \ -e 's;/usr/sbin/;%{_sbindir}/;' \ %{SOURCE2} > %{buildroot}%{_sysconfdir}/cron.hourly/%{name} chmod +x %{buildroot}%{_sysconfdir}/cron.hourly/%{name} %{__install} -m 644 %{name}.cfg %{buildroot}%{_sysconfdir}/ocsinventory/%{name}.cfg # Remove some unusefull files (which brings unresolvable deps) rm -rf %{buildroot}%{perl_vendorlib}/Ocsinventory/Agent/Backend/OS/Win32* # Only need for manual installation rm %{buildroot}%{perl_vendorlib}/Ocsinventory/postinst.pl %clean rm -rf %{buildroot} %files %defattr(-, root, root, -) %doc AUTHORS Changes LICENSE README THANKS README.RPM %lang(fr) %doc README.RPM.fr %{perl_vendorlib}/Ocsinventory %{_sbindir}/%{name} %dir %{_localstatedir}/log/%{name} %dir %{_localstatedir}/lib/%{name} %dir %{_sysconfdir}/ocsinventory %config(noreplace) %{_sysconfdir}/sysconfig/%{name} %config(noreplace) %{_sysconfdir}/ocsinventory/%{name}.cfg %config(noreplace) %{_sysconfdir}/logrotate.d/%{name} %{_sysconfdir}/cron.hourly/%{name} %{_mandir}/man1/%{name}.* %changelog * Sun Apr 20 2008 Remi Collet 0.0.9.2-1 - update to 0.0.9.2 (minor bug fix) * Mon Apr 07 2008 Remi Collet 0.0.9.1-2 - add Requires monitor-edid * Thu Apr 03 2008 Remi Collet 0.0.9.1-1 - update to 0.0.9.1 (minor bug fix) - swicth back to nobundle sources * Wed Apr 02 2008 Remi Collet 0.0.9-1 - update to 0.0.9 finale - provides default config to file (need options.patch) - add requires nmap (for ipdiscover) - add BR perl(XML::SAX) (to avoid install of bundled one) * Mon Mar 10 2008 Remi Collet 0.0.8.2-0.6.20080305 - rebuild against perl 5.10 * Fri Mar 7 2008 Remi Collet 0.0.8.2-0.5.20080305 - patches from review (Patrice Dumas) * Wed Mar 5 2008 Remi Collet 0.0.8.2-0.4.20080305 - update to 2008-03-05 - add /etc/sysconfig/ocsinventory-agent config file for cron job * Mon Mar 3 2008 Remi Collet 0.0.8.2-0.3.20080302 - only enable cron when server is configured * Sun Mar 2 2008 Remi Collet 0.0.8.2-0.2.20080302 - from Review, see #435593 * Sun Mar 2 2008 Remi Collet 0.0.8.2-0.1.20080302 - update to 0.0.8.2 from CVS * Fri Feb 22 2008 Remi Collet 0.0.8.2-0.1.20080222 - update to 0.0.8.2 from CVS * Sun Feb 17 2008 Remi Collet 0.0.8.1-0.1.20080217 - update to 0.0.8.1 from CVS - change config file used from /etc/ocsinventory-agent/ocsinv.conf to /etc/ocsinventory/ocsinventory-agent.cfg * Sat Jan 26 2008 Remi Collet 0.0.7-1 - update to 0.0.7 * Sat Dec 28 2007 Remi Collet 0.0.6.2-1 - update to 0.0.6.2 * Mon Apr 16 2007 Remi Collet 0.0.6-1 - update to 0.0.6 * Sat Feb 10 2007 Remi Collet 0.0.5-0.20070409 - cvs update 20070409 - create cron.daily file - create logrotate.d file - create ocsinv.conf - cvs update 20070405 - cvs update 20070403 * Sat Feb 10 2007 Remi Collet 0.0.2-0.20070210 - initial spec