1 |
# $Id$ |
2 |
# Authority: vip-ire |
3 |
# Name: Daniel Berteaud |
4 |
|
5 |
Name: ocsinventory |
6 |
Summary: Open Computer and Software Inventory Next Generation |
7 |
|
8 |
Version: 1.02 |
9 |
Release: 2.rc3%{?dist} |
10 |
|
11 |
Group: Applications/Internet |
12 |
License: GPLv2 |
13 |
URL: http://www.ocsinventory-ng.org/ |
14 |
|
15 |
Source0: OCSNG_UNIX_SERVER_1.02RC3.tar.gz |
16 |
Source1: ocsinventory-reports.conf |
17 |
Source2: ocsinventory-images.tgz |
18 |
Source3: OCSNG_UNIX_SERVER_1.02RC3_Patch1.tar.gz |
19 |
|
20 |
BuildArch: noarch |
21 |
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) |
22 |
BuildRequires: perl(ExtUtils::MakeMaker) |
23 |
|
24 |
# Main package is a dummy package |
25 |
Requires: ocsinventory-server = %{version}-%{release} |
26 |
Requires: ocsinventory-reports = %{version}-%{release} |
27 |
Requires: mysql-server |
28 |
|
29 |
|
30 |
%description |
31 |
Open Computer and Software Inventory Next Generation is an application |
32 |
designed to help a network or system administrator keep track of the |
33 |
computers configuration and software that are installed on the network. |
34 |
|
35 |
OCS Inventory is also able to detect all active devices on your network, |
36 |
such as switch, router, network printer and unattended devices. |
37 |
|
38 |
OCS Inventory NG includes package deployment feature on client computers |
39 |
|
40 |
%description -l fr |
41 |
Open Computer and Software Inventory Next Generation est une application |
42 |
déstinée pour aider l'administrateur système ou réseau à garder un oeil |
43 |
sur la configuration des machines du réseau et sur les logiciels qui y |
44 |
sont installés. |
45 |
|
46 |
OCS Inventory est aussi capable de détecter tout périphérique actif sur |
47 |
le réseau, comme les commutateurs, routeurs, imprimantes et autres matéreils |
48 |
inattendus. |
49 |
|
50 |
OCS Inventory NG intègre des fonctionnalités de télédiffusion de paquets |
51 |
sur les machines clients. |
52 |
|
53 |
|
54 |
%package server |
55 |
Group: Applications/Internet |
56 |
Summary: OCS Inventory NG - Communication server |
57 |
Requires: mod_perl |
58 |
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) |
59 |
Requires: perl(Compress::Zlib) >= 1.33 |
60 |
Requires: perl(DBI) >= 1.40 |
61 |
Requires: perl(Apache::DBI) >= 0.93 |
62 |
Requires: perl(DBD::mysql) >= 2.9004 |
63 |
Requires: perl(XML::Simple) >= 2.12 |
64 |
Requires: perl(Net::IP) >= 1.21 |
65 |
Requires: perl(SOAP::Lite) >= 0.66 |
66 |
Requires: perl(XML::Entities) >= 0.02 |
67 |
|
68 |
%description server |
69 |
This package provides the Communication server, which will handle HTTP |
70 |
communications between database server and agents. |
71 |
|
72 |
%description -l fr server |
73 |
Ce paquet fournit le serveur de communication (Communication server), |
74 |
qui gère les communications HTTP entre les agents et le serveur de base |
75 |
de données. |
76 |
|
77 |
|
78 |
%package reports |
79 |
Group: Applications/Internet |
80 |
Summary: OCS Inventory NG - Communication server |
81 |
Requires: php |
82 |
Requires: perl(DBI) >= 1.40 |
83 |
Requires: perl(DBD::mysql) >= 2.9004 |
84 |
Requires: perl(XML::Simple) >= 2.12 |
85 |
Requires: perl(Net::IP) >= 1.21 |
86 |
|
87 |
%description reports |
88 |
This package provides the Administration console, which will allow |
89 |
administrators to query the database server through their favorite browser. |
90 |
|
91 |
%description -l fr reports |
92 |
Ce paquet fournit la console d'administration (Administration console), |
93 |
qui autorise les administrateurs à interroger la base de données via leur |
94 |
navigateur favori. |
95 |
|
96 |
%prep |
97 |
%setup -q -n OCSNG_UNIX_SERVER_1.02RC3 |
98 |
tar xzf %{SOURCE2} |
99 |
tar xzf %{SOURCE3} |
100 |
|
101 |
# patching doc_root => /var/lib |
102 |
for fic in $(find ocsreports -type f -exec grep -q "DOCUMENT_ROOT" {} \; -print) |
103 |
do |
104 |
%{__sed} -i -e 's;\$_SERVER\["DOCUMENT_ROOT"\];"%{_localstatedir}/lib/ocsinventory-server";' $fic |
105 |
done |
106 |
|
107 |
|
108 |
%build |
109 |
cd Apache |
110 |
%{__perl} Makefile.PL INSTALLDIRS=vendor |
111 |
make %{?_smp_mflags} |
112 |
|
113 |
%install |
114 |
rm -rf %{buildroot} |
115 |
|
116 |
# --- ocsinventory-server --- communication server |
117 |
cd Apache |
118 |
make pure_install PERL_INSTALL_ROOT=%{buildroot} |
119 |
find %{buildroot} -type f -name .packlist -exec rm -f {} ';' |
120 |
find %{buildroot} -type d -depth -exec rmdir {} 2>/dev/null ';' |
121 |
|
122 |
chmod -R u+rwX,go+rX,go-w %{buildroot}/* |
123 |
find %{buildroot}%{perl_vendorlib}/Apache -name \*.pm -exec chmod -x {} \; |
124 |
|
125 |
%if 0%{?rhel} == 4 |
126 |
# To avoid bad dependency on perl(mod_perl2) |
127 |
rm -f %{buildroot}%{perl_vendorlib}/Apache/Ocsinventory/Server/Modperl2.pm |
128 |
%else |
129 |
# To avoid bad dependency on perl(mod_perl) : RHEL >= 5 && Fedora >= 4 |
130 |
rm -f %{buildroot}%{perl_vendorlib}/Apache/Ocsinventory/Server/Modperl1.pm |
131 |
%endif |
132 |
|
133 |
%{__mkdir_p} %{buildroot}%{_localstatedir}/log/ocsinventory-server |
134 |
|
135 |
%{__mkdir_p} %{buildroot}%{_sysconfdir}/logrotate.d |
136 |
%{__sed} -e 's;PATH_TO_LOG_DIRECTORY;%{_localstatedir}/log/ocsinventory-server;' \ |
137 |
./etc/logrotate.d/ocsinventory-server >%{buildroot}%{_sysconfdir}/logrotate.d/ocsinventory-server |
138 |
|
139 |
# default configuration (localhost) sould work on "simple" installation |
140 |
%{__mkdir_p} %{buildroot}%{_sysconfdir}/httpd/conf.d |
141 |
%{__sed} -e "s;DATABASE_SERVER;localhost;g" \ |
142 |
-e "s;DATABASE_PORT;3306;g" \ |
143 |
%if 0%{?rhel} == 4 |
144 |
-e "s;VERSION_MP;1;g" \ |
145 |
%else |
146 |
-e "s;VERSION_MP;2;g" \ |
147 |
%endif |
148 |
-e "s;PATH_TO_LOG_DIRECTORY;%{_localstatedir}/log/ocsinventory-server;g" \ |
149 |
./etc/ocsinventory/ocsinventory-server.conf >%{buildroot}%{_sysconfdir}/httpd/conf.d/z-ocsinventory-server.conf |
150 |
cd .. |
151 |
|
152 |
# --- ocsinventory-reports --- administration console |
153 |
|
154 |
%{__mkdir_p} %{buildroot}/%{_datadir}/ocsinventory-reports |
155 |
cp -ar ocsreports %{buildroot}/%{_datadir}/ocsinventory-reports |
156 |
find %{buildroot}/%{_datadir}/ocsinventory-reports \( -name \*.php -o -name \*.css \) -exec chmod -x {} \; |
157 |
|
158 |
%{__mkdir_p} %{buildroot}/%{_sysconfdir}/ocsinventory/ocsinventory-reports |
159 |
mv %{buildroot}/%{_datadir}/ocsinventory-reports/ocsreports/dbconfig.inc.php \ |
160 |
%{buildroot}/%{_sysconfdir}/ocsinventory/ocsinventory-reports/dbconfig.inc.php |
161 |
ln -s ../../../../%{_sysconfdir}/ocsinventory/ocsinventory-reports/dbconfig.inc.php %{buildroot}/%{_datadir}/ocsinventory-reports/ocsreports/dbconfig.inc.php |
162 |
|
163 |
%{__mkdir_p} %{buildroot}%{_localstatedir}/lib/ocsinventory-server/{download,ipd} |
164 |
|
165 |
%{__install} -pm 755 Apache/binutils/ipdiscover-util.pl %{buildroot}/%{_datadir}/ocsinventory-reports/ocsreports/ipdiscover-util.pl |
166 |
|
167 |
%{__mkdir_p} %{buildroot}%{_sysconfdir}/httpd/conf.d |
168 |
%{__sed} -e "s;OCSREPORTS_ALIAS;/ocsreports;g" \ |
169 |
-e "s;PATH_TO_OCSREPORTS_DIR;%{_datadir}/ocsinventory-reports/ocsreports;g" \ |
170 |
-e "s;PACKAGES_ALIAS;/download;g" \ |
171 |
-e "s;PATH_TO_PACKAGES_DIR;%{_localstatedir}/lib/ocsinventory-server/download;g" \ |
172 |
%{SOURCE1} >%{buildroot}%{_sysconfdir}/httpd/conf.d/z-ocsinventory-reports.conf |
173 |
|
174 |
|
175 |
%clean |
176 |
rm -rf %{buildroot} |
177 |
|
178 |
%files |
179 |
%defattr(-, root, root, -) |
180 |
|
181 |
|
182 |
%files server |
183 |
%defattr(-, root, root, -) |
184 |
%doc LICENSE.txt README |
185 |
%config(noreplace) %{_sysconfdir}/logrotate.d/ocsinventory-server |
186 |
%config(noreplace) %{_sysconfdir}/httpd/conf.d/z-ocsinventory-server.conf |
187 |
%attr(750,www,root) %{_localstatedir}/log/ocsinventory-server |
188 |
%{perl_vendorlib}/Apache |
189 |
|
190 |
|
191 |
%files reports |
192 |
%defattr(-, root, root, -) |
193 |
%doc LICENSE.txt README |
194 |
%dir %{_sysconfdir}/ocsinventory |
195 |
%dir %{_sysconfdir}/ocsinventory/ocsinventory-reports |
196 |
%attr(640,www,root) %config(noreplace) %{_sysconfdir}/ocsinventory/ocsinventory-reports/dbconfig.inc.php |
197 |
%config(noreplace) %{_sysconfdir}/httpd/conf.d/z-ocsinventory-reports.conf |
198 |
%{_datadir}/ocsinventory-reports |
199 |
%dir %{_localstatedir}/lib/ocsinventory-server |
200 |
%attr(750,www,root) %dir %{_localstatedir}/lib/ocsinventory-server/ipd |
201 |
%attr(750,www,root) %dir %{_localstatedir}/lib/ocsinventory-server/download |
202 |
|
203 |
|
204 |
%changelog |
205 |
* Tue Dec 09 2008 Daniel B. <daniel@firewall-services.com> 1.02-2.rc1 |
206 |
- Apply patch1 for ocs-inventory 1.02RC3 |
207 |
|
208 |
* Thu Sep 10 2008 Daniel B. <daniel@firewall-services.com> 1.02-02.rc1 |
209 |
- small changes for SME server |
210 |
|
211 |
* Sun Mar 15 2008 Remi Collet <Fedora@famillecollet.com> 1.02-0.2.rc1 |
212 |
- fix download dir |
213 |
|
214 |
* Sat Mar 8 2008 Remi Collet <Fedora@famillecollet.com> 1.02-0.1.rc1 |
215 |
- Initial RPM |
216 |
|