%define _requires_exceptions pear(dbconfig.inc.php)\\|pear(composants.php)\\|pear(dico.php) %define schema_version 2.0 Name: ocsinventory Version: 2.0.5 Release: %mkrel 1 Summary: Open Computer and Software Inventory Next Generation License: GPL Group: System/Servers URL: http://www.ocsinventory-ng.org/ Source0: http://launchpad.net/ocsinventory-server/stable-1.3/server-release-1.3/+download/OCSNG_UNIX_SERVER-%{version}.tar.gz %if %mdkversion < 201010 Requires(post): rpm-helper Requires(postun): rpm-helper %endif BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version} %description Open Computer and Software Inventory Next Generation is an application designed to help a network or system administrator keep track of the computers configuration and software that are installed on the network. OCS Inventory is also able to detect all active devices on your network, such as switch, router, network printer and unattended devices. OCS Inventory NG includes package deployment feature on client computers %package server Group: System/Servers Summary: Communication server Requires: apache-mod_perl Requires: perl(Apache::DBI) Requires: perl-DBD-mysql Requires: perl-Net-IP Requires: perl-SOAP-Lite Obsoletes: ocsng-linux-server %description server This package provides the Communication server, which will handle HTTP communications between database server and agents. %package reports Group: System/Servers Summary: Administration console Requires: apache-mod_php Requires: php-mysql Requires: php-xml Requires: php-zip Obsoletes: ocsng-linux-server %description reports This package provides the Administration console, which will allow administrators to query the database server through their favorite browser. %prep %setup -q -n OCSNG_UNIX_SERVER-%{version} perl -pi -e 's/SCHEMA_VERSION/%{schema_version}/' ocsreports/index.php %build cd Apache %{__perl} Makefile.PL INSTALLDIRS=vendor %make %install rm -rf %{buildroot} # ocsinventory-server pushd Apache 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 ';' # To avoid bad dependency on perl(mod_perl) rm -f %{buildroot}%{perl_vendorlib}/Apache/Ocsinventory/Server/Modperl1.pm popd install -d -m 755 %{buildroot}%{_localstatedir}/log/ocsinventory-server install -d -m 755 %{buildroot}%{_sysconfdir}/logrotate.d cat > %{buildroot}%{_sysconfdir}/logrotate.d/ocsinventory-server<