Sophie

Sophie

distrib > Mandriva > current > i586 > media > contrib-release-src > by-pkgid > e29f98db7cfa7b73381a9ffacd2c0b49 > files > 6

ocsinventory-agent-1.1.2-4mdv2010.1.src.rpm

Name:		ocsinventory-agent
Version:	1.1.2
Release:	%mkrel 4
Epoch:      1
Summary:	Unified client for OCS-Inventory
License:	GPLv2+
Group:		System/Servers
URL:		http://www.ocsinventory-ng.org/
Source0:	http://launchpad.net/ocsinventory-unix-agent/stable/ocsinventory-unix-agent-1.1.2/+download/Ocsinventory-Agent-%{version}.tar.gz
Patch0:     Ocsinventory-Agent-1.1.2-fix-syslog-usage.patch
Patch1:     Ocsinventory-Agent-1.1.2-fix-dmidecode-version-test.patch
Patch2:     Ocsinventory-Agent-1.1.2-fix-xen-dom0-identification.patch
Patch3:     Ocsinventory-Agent-1.1.2-add-bios-informations-for-xen-pv-hosts.patch
Requires:	net-tools
Requires:	pciutils
Requires:	nmap
Requires:	monitor-edid
Requires:	dmidecode >= 2.6
Requires:	perl-Net-IP
Requires:       perl-XML-Simple
Requires:       perl-Digest-MD5
Requires:       perl-libwww-perl
Suggests:   perl-Net-CUPS
Suggests:   perl-Proc-Daemon
Suggests:   ipmitool
Obsoletes:  ocsng-linux-agent
Obsoletes:  perl-Ocsinventory
BuildArch:	noarch
BuildRoot:	%{_tmppath}/%{name}-%{version}

%description
Linux agent for ocs-inventory. Dialog between client computers and management
server is based on actual standards, HTTP protocol and XML data formatting.

%prep
%setup -q -n Ocsinventory-Agent-%{version}
%patch0 -p 1
%patch1 -p 1
%patch2 -p 1
%patch3 -p 1

%build
%{__perl} Makefile.PL INSTALLDIRS=vendor
%make

%install
rm -rf %{buildroot}
rm -f run-postinst
%makeinstall_std

install -d %{buildroot}%{_sbindir}
mv %{buildroot}%{_bindir}/* %{buildroot}%{_sbindir}/

install -d -m 755 %{buildroot}%{_sysconfdir}/ocsinventory
cat > %{buildroot}%{_sysconfdir}/ocsinventory/ocsinventory-agent.cfg<<EOF
basevardir = %{_localstatedir}/lib/ocsinventory-agent
logger  = File
logfile = %{_localstatedir}/log/ocsinventory-agent/ocsinventory-agent.log
EOF

install -d -m 755 %{buildroot}%{_sysconfdir}/cron.daily
cat > %{buildroot}%{_sysconfdir}/cron.daily/ocsinventory-agent<<EOF
%{_sbindir}/ocsinventory-agent --lazy > /dev/null 2>&1
EOF
chmod +x %{buildroot}%{_sysconfdir}/cron.daily/ocsinventory-agent

install -d %{buildroot}%{_sysconfdir}/logrotate.d
cat > %{buildroot}%{_sysconfdir}/logrotate.d/ocsinventory-agent<<EOF
/var/log/ocsinventory-agent/*.log {
    missingok
}
EOF

install -d %{buildroot}%{_localstatedir}/lib/ocsinventory-agent
install -d %{buildroot}%{_localstatedir}/log/ocsinventory-agent

# cleanup
rm -f %{buildroot}%{perl_vendorlib}/Ocsinventory/postinst.pl

%clean
rm -rf %{buildroot}

%files
%defattr(-,root, root)
%doc AUTHORS Changes LICENSE README THANKS
%{_sbindir}/%{name}
%{_mandir}/man1/%{name}.*
%{_mandir}/man3/Ocsinventory::Agent::XML::Inventory.3pm*
%{perl_vendorlib}/Ocsinventory
%config(noreplace) %{_sysconfdir}/cron.daily/%{name}
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
%config(noreplace) %{_sysconfdir}/ocsinventory
%{_localstatedir}/log/%{name}
%{_localstatedir}/lib/%{name}


%changelog
* Mon Jun 14 2010 Anne Nicolas <anne.nicolas@mandriva.com> 1:1.1.2-4mdv2010.1
+ Revision: 547999
- Fix requires and suggests (#59459)

* Sat May 29 2010 Guillaume Rousse <guillomovitch@mandriva.org> 1:1.1.2-3mdv2010.1
+ Revision: 546575
- patch1: fix dmidecode version test
- patch2: fix xen dom0 identification
- patch3: add bios information for xen PV hosts
- suggests optional perl modules and tools (fix #59459)

* Thu Apr 29 2010 Guillaume Rousse <guillomovitch@mandriva.org> 1:1.1.2-2mdv2010.1
+ Revision: 540800
- patch0: fix syslog usage
- new version
- fix cron task

* Mon Nov 30 2009 Guillaume Rousse <guillomovitch@mandriva.org> 1.02-2mdv2010.1
+ Revision: 471940
- ensure cron script is executable

* Sat Jun 06 2009 Guillaume Rousse <guillomovitch@mandriva.org> 1.02-1mdv2010.0
+ Revision: 383255
- new version
- merge perl package, no need for a distinct one
- use herein document whenever possible
- switch to a daily cron job, as per default installation

* Sun May 10 2009 Guillaume Rousse <guillomovitch@mandriva.org> 1.0.1-1mdv2010.0
+ Revision: 373950
- new version
- drop patches, not needed anymore

* Fri Aug 08 2008 Thierry Vignaud <tv@mandriva.org> 0.0.9.2-2mdv2009.0
+ Revision: 268323
- rebuild early 2009.0 package (before pixel changes)

  + Pixel <pixel@mandriva.com>
    - adapt to %%_localstatedir now being /var instead of /var/lib (#22312)

* Thu May 15 2008 Oden Eriksson <oeriksson@mandriva.com> 0.0.9.2-1mdv2009.0
+ Revision: 207628
- remove versioned deps

* Wed May 14 2008 Oden Eriksson <oeriksson@mandriva.com> 0.0.9.2-0.1mdv2009.0
+ Revision: 207254
- import ocsinventory-agent


* Wed May 14 2008 Oden Eriksson <oeriksson@mandriva.com> 0.0.9.2-0.1mdv2009.0
- initial Mandriva package (requested by psycocat)
- used the fedora package as a start