/[smecontribs]/rpms/ocsinventory/contribs7/ocsinventory.spec
ViewVC logotype

Diff of /rpms/ocsinventory/contribs7/ocsinventory.spec

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

Revision 1.2 by slords, Mon Mar 2 23:53:29 2009 UTC Revision 1.4 by vip-ire, Fri Jun 12 15:28:19 2009 UTC
# Line 1  Line 1 
1  # $Id$  # $Id: ocsinventory.spec,v 1.3 2009/03/18 14:37:45 slords Exp $
2  # Authority: vip-ire  # Authority: vip-ire
3  # Name: Daniel Berteaud  # Name: Daniel Berteaud
4    
5    %if %{?fedora}%{?rhel} >= 5
6    %define useselinux 1
7    %else
8    %define useselinux 0
9    %endif
10    
11    %define tarname OCSNG_UNIX_SERVER-1.02.1
12    
13  Name:        ocsinventory  Name:        ocsinventory
14  Summary:     Open Computer and Software Inventory Next Generation  Summary:     Open Computer and Software Inventory Next Generation
15    
16  Version:     1.02  Version:     1.02.1
17  Release:     2.rc3%{?dist}  Release:     1%{?dist}
18    
19  Group:       Applications/Internet  Group:       Applications/Internet
20  License:     GPLv2  License:     GPLv2
21  URL:         http://www.ocsinventory-ng.org/  URL:         http://www.ocsinventory-ng.org/
22    
23  Source0:     OCSNG_UNIX_SERVER_1.02RC3.tar.gz  Source0:     http://downloads.sourceforge.net/%{name}/%{tarname}.tar.gz
24  Source1:     ocsinventory-reports.conf  Source1:     ocsinventory-reports.conf
 Source2:     ocsinventory-images.tgz  
 Source3:     OCSNG_UNIX_SERVER_1.02RC3_Patch1.tar.gz  
25    
26  BuildArch:   noarch  BuildArch:   noarch
27  BuildRoot:   %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)  BuildRoot:   %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
28  BuildRequires: perl(ExtUtils::MakeMaker)  BuildRequires: perl(ExtUtils::MakeMaker)
29    BuildRequires: perl(Apache::DBI)
30    BuildRequires: perl(DBD::mysql)
31    BuildRequires: perl(Net::IP)
32    BuildRequires: perl(XML::Simple)
33    
34  # Main package is a dummy package  # Main package is a dummy package
35  Requires:    ocsinventory-server  = %{version}-%{release}  Requires:    ocsinventory-server  = %{version}-%{release}
# Line 35  computers configuration and software tha Line 45  computers configuration and software tha
45  OCS Inventory is also able to detect all active devices on your network,  OCS Inventory is also able to detect all active devices on your network,
46  such as switch, router, network printer and unattended devices.  such as switch, router, network printer and unattended devices.
47    
48  OCS Inventory NG includes package deployment feature on client computers  OCS Inventory NG includes package deployment feature on client computers.
49    
50    ocsinventory is a metapackage that will install the communication server,
51    the administration console and the database server (MySQL).
52    
53  %description -l fr  %description -l fr
54  Open Computer and Software Inventory Next Generation est une application  Open Computer and Software Inventory Next Generation est une application
55  déstinée pour aider l'administrateur système ou réseau à garder un oeil  destinée à aider l'administrateur système ou réseau à garder un oeil
56  sur la configuration des machines du réseau et sur les logiciels qui y  sur la configuration des machines du réseau et sur les logiciels qui y
57  sont installés.  sont installés.
58    
59  OCS Inventory est aussi capable de détecter tout périphérique actif sur  OCS Inventory est aussi capable de détecter tout périphérique actif sur
60  le réseau, comme les commutateurs, routeurs, imprimantes et autres matéreils  le réseau, comme les commutateurs, routeurs, imprimantes et autres matériels
61  inattendus.  autonomes.
62    
63  OCS Inventory NG intègre des fonctionnalités de télédiffusion de paquets  OCS Inventory NG intègre des fonctionnalités de télédiffusion de paquets
64  sur les machines clients.  sur les machines clients.
65    
66    ocsinventory est un metapaquet qui installera le serveur de communication,
67    la console d'administration et le serveur de base de données (MySQL).
68    
69  %package server  %package server
70  Group:    Applications/Internet  Group:    Applications/Internet
71  Summary:  OCS Inventory NG - Communication server  Summary:  OCS Inventory NG - Communication server
72  Requires: mod_perl  Requires: mod_perl
73    %if 0%{?rhel} != 4
74    # when use with mod_perl2
75    Requires: perl(SOAP::Transport::HTTP2)
76    %endif
77  Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))  Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
78  Requires: perl(Compress::Zlib) >= 1.33  # Required by the original setup script, but not detected automatically :
79  Requires: perl(DBI) >= 1.40  # Apache::DBI drags in DBI
80  Requires: perl(Apache::DBI) >= 0.93  Requires: perl(Apache::DBI)
81  Requires: perl(DBD::mysql) >= 2.9004  Requires: perl(Net::IP)
82  Requires: perl(XML::Simple) >= 2.12  Requires: perl(DBD::mysql)
83  Requires: perl(Net::IP) >= 1.21  # Optional, not detected automatically :
84  Requires: perl(SOAP::Lite) >= 0.66  Requires: perl(SOAP::Lite)
85  Requires: perl(XML::Entities) >= 0.02  Requires: perl(XML::Entities)
86    %if %{useselinux}
87    Requires: policycoreutils
88    %endif
89    
90  %description server  %description server
91  This package provides the Communication server, which will handle HTTP  This package provides the Communication server, which will handle HTTP
# Line 78  de données. Line 100  de données.
100  %package reports  %package reports
101  Group:    Applications/Internet  Group:    Applications/Internet
102  Summary:  OCS Inventory NG - Communication server  Summary:  OCS Inventory NG - Communication server
103    # From PHP_Compat : date, mysql, ereg, pcre, zip, hash, xml, gd, zlib
104  Requires: php  Requires: php
105  Requires: perl(DBI) >= 1.40  Requires: php-mysql php-zip php-gd
106  Requires: perl(DBD::mysql) >= 2.9004  %if 0%{?rhel} == 4
107  Requires: perl(XML::Simple) >= 2.12  Requires:       php-domxml
108  Requires: perl(Net::IP) >= 1.21  %else
109    Requires:       php-xml
110    %endif
111    # Required by the original setup script, but not detected automatically :
112    Requires: perl(DBD::mysql)
113    # Required by ipdiscover-util.pl (nmap and nmblookup)
114    Requires: nmap samba-client
115    %if %{useselinux}
116    Requires: policycoreutils
117    %endif
118    
119  %description reports  %description reports
120  This package provides the Administration console, which will allow  This package provides the Administration console, which will allow
# Line 93  Ce paquet fournit la console d'administr Line 125  Ce paquet fournit la console d'administr
125  qui autorise les administrateurs à interroger la base de données via leur  qui autorise les administrateurs à interroger la base de données via leur
126  navigateur favori.  navigateur favori.
127    
128    
129  %prep  %prep
130  %setup -q -n OCSNG_UNIX_SERVER_1.02RC3  %setup -q -n %{tarname}
 tar xzf %{SOURCE2}  
 tar xzf %{SOURCE3}  
   
 # patching doc_root => /var/lib  
 for fic in $(find ocsreports -type f -exec grep -q "DOCUMENT_ROOT" {} \; -print)  
 do  
         %{__sed} -i -e 's;\$_SERVER\["DOCUMENT_ROOT"\];"%{_localstatedir}/lib/ocsinventory-server";' $fic  
 done  
   
131    
132  %build  %build
133  cd Apache  cd Apache
134  %{__perl} Makefile.PL INSTALLDIRS=vendor  %{__perl} Makefile.PL INSTALLDIRS=vendor
135  make %{?_smp_mflags}  make %{?_smp_mflags}
136    
137    
138  %install  %install
139  rm -rf %{buildroot}  rm -rf %{buildroot}
140    
# Line 136  rm -f %{buildroot}%{perl_vendorlib}/Apac Line 161  rm -f %{buildroot}%{perl_vendorlib}/Apac
161  %{__sed} -e 's;PATH_TO_LOG_DIRECTORY;%{_localstatedir}/log/ocsinventory-server;' \  %{__sed} -e 's;PATH_TO_LOG_DIRECTORY;%{_localstatedir}/log/ocsinventory-server;' \
162     ./etc/logrotate.d/ocsinventory-server >%{buildroot}%{_sysconfdir}/logrotate.d/ocsinventory-server     ./etc/logrotate.d/ocsinventory-server >%{buildroot}%{_sysconfdir}/logrotate.d/ocsinventory-server
163    
164  # default configuration (localhost) sould work on "simple" installation  # default configuration (localhost) should work on "simple" installation
165  %{__mkdir_p} %{buildroot}%{_sysconfdir}/httpd/conf.d  %{__mkdir_p} %{buildroot}%{_sysconfdir}/httpd/conf.d
166  %{__sed} -e "s;DATABASE_SERVER;localhost;g" \  %{__sed} -e "s;DATABASE_SERVER;localhost;g" \
167           -e "s;DATABASE_PORT;3306;g" \      -e "s;DATABASE_PORT;3306;g" \
168  %if 0%{?rhel} == 4  %if 0%{?rhel} == 4
169           -e "s;VERSION_MP;1;g" \      -e "s;VERSION_MP;1;g" \
170  %else  %else
171           -e "s;VERSION_MP;2;g" \      -e "s;VERSION_MP;2;g" \
172  %endif  %endif
173           -e "s;PATH_TO_LOG_DIRECTORY;%{_localstatedir}/log/ocsinventory-server;g" \      -e "s;PATH_TO_LOG_DIRECTORY;%{_localstatedir}/log/ocsinventory-server;g" \
174           ./etc/ocsinventory/ocsinventory-server.conf >%{buildroot}%{_sysconfdir}/httpd/conf.d/z-ocsinventory-server.conf      ./etc/ocsinventory/ocsinventory-server.conf | \
175        grep -v IfModule >%{buildroot}%{_sysconfdir}/httpd/conf.d/ocsinventory-server.conf
176  cd ..  cd ..
177    
178  # --- ocsinventory-reports --- administration console  # --- ocsinventory-reports --- administration console
# Line 156  cp -ar ocsreports %{buildroot}/%{_datadi Line 182  cp -ar ocsreports %{buildroot}/%{_datadi
182  find %{buildroot}/%{_datadir}/ocsinventory-reports \( -name \*.php -o -name \*.css \) -exec chmod -x {} \;  find %{buildroot}/%{_datadir}/ocsinventory-reports \( -name \*.php -o -name \*.css \) -exec chmod -x {} \;
183    
184  %{__mkdir_p} %{buildroot}/%{_sysconfdir}/ocsinventory/ocsinventory-reports  %{__mkdir_p} %{buildroot}/%{_sysconfdir}/ocsinventory/ocsinventory-reports
185    
186  mv %{buildroot}/%{_datadir}/ocsinventory-reports/ocsreports/dbconfig.inc.php \  mv %{buildroot}/%{_datadir}/ocsinventory-reports/ocsreports/dbconfig.inc.php \
187     %{buildroot}/%{_sysconfdir}/ocsinventory/ocsinventory-reports/dbconfig.inc.php     %{buildroot}/%{_sysconfdir}/ocsinventory/ocsinventory-reports/dbconfig.inc.php
188  ln -s ../../../../%{_sysconfdir}/ocsinventory/ocsinventory-reports/dbconfig.inc.php %{buildroot}/%{_datadir}/ocsinventory-reports/ocsreports/dbconfig.inc.php  ln -s ../../../../%{_sysconfdir}/ocsinventory/ocsinventory-reports/dbconfig.inc.php %{buildroot}/%{_datadir}/ocsinventory-reports/ocsreports/dbconfig.inc.php
189    
190  %{__mkdir_p} %{buildroot}%{_localstatedir}/lib/ocsinventory-server/{download,ipd}  %{__mkdir_p} %{buildroot}%{_localstatedir}/lib/ocsinventory-reports/{download,ipd}
191    
192  %{__install} -pm 755 Apache/binutils/ipdiscover-util.pl %{buildroot}/%{_datadir}/ocsinventory-reports/ocsreports/ipdiscover-util.pl  %{__install} -pm 755 Apache/binutils/ipdiscover-util.pl %{buildroot}/%{_datadir}/ocsinventory-reports/ocsreports/ipdiscover-util.pl
193    
# Line 168  ln -s ../../../../%{_sysconfdir}/ocsinve Line 195  ln -s ../../../../%{_sysconfdir}/ocsinve
195  %{__sed} -e "s;OCSREPORTS_ALIAS;/ocsreports;g" \  %{__sed} -e "s;OCSREPORTS_ALIAS;/ocsreports;g" \
196           -e "s;PATH_TO_OCSREPORTS_DIR;%{_datadir}/ocsinventory-reports/ocsreports;g" \           -e "s;PATH_TO_OCSREPORTS_DIR;%{_datadir}/ocsinventory-reports/ocsreports;g" \
197           -e "s;PACKAGES_ALIAS;/download;g" \           -e "s;PACKAGES_ALIAS;/download;g" \
198           -e "s;PATH_TO_PACKAGES_DIR;%{_localstatedir}/lib/ocsinventory-server/download;g" \           -e "s;PATH_TO_PACKAGES_DIR;%{_localstatedir}/lib/ocsinventory-reports/download;g" \
199      %{SOURCE1} >%{buildroot}%{_sysconfdir}/httpd/conf.d/z-ocsinventory-reports.conf      %{SOURCE1} >%{buildroot}%{_sysconfdir}/httpd/conf.d/ocsinventory-reports.conf
200    
201    
202  %clean  %clean
203  rm -rf %{buildroot}  rm -rf %{buildroot}
204    
205    
206    %post server
207    %if %{useselinux}
208    (
209    # New File context
210    semanage fcontext -a -s system_u -t httpd_log_t -r s0 "%{_localstatedir}/log/ocsinventory-server(/.*)?"
211    # files created by app
212    restorecon -R %{_localstatedir}/log/ocsinventory-server
213    ) &>/dev/null ||:
214    %endif
215    
216    
217    %post reports
218    %if %{useselinux}
219    (
220    # New File context
221    semanage fcontext -a -s system_u -t httpd_sys_script_rw_t -r s0 "%{_sysconfdir}/ocsinventory/ocsinventory-reports(/.*)?"
222    semanage fcontext -a -s system_u -t httpd_sys_script_rw_t -r s0 "%{_localstatedir}/lib/ocsinventory-reports(/.*)?"
223    # files created by app
224    restorecon -R %{_sysconfdir}/ocsinventory/ocsinventory-reports
225    restorecon -R %{_localstatedir}/lib/ocsinventory-reports
226    ) &>/dev/null ||:
227    %endif
228    
229    
230    %postun server
231    %if %{useselinux}
232    if [ "$1" -eq "0" ]; then
233        # Remove the File Context
234        semanage fcontext -d "%{_localstatedir}/log/ocsinventory-server(/.*)?" &>/dev/null || :
235    fi
236    %endif
237    
238    
239    %postun reports
240    %if %{useselinux}
241    if [ "$1" -eq "0" ]; then
242        # Remove the File Context
243        semanage fcontext -d "%{_sysconfdir}/ocsinventory/ocsinventory-reports(/.*)?" &>/dev/null ||:
244        semanage fcontext -d "%{_localstatedir}/lib/ocsinventory-reports(/.*)?" &>/dev/null ||:
245    fi
246    %endif
247    
248    
249  %files  %files
250  %defattr(-, root, root, -)  %defattr(-, root, root, -)
251    
# Line 183  rm -rf %{buildroot} Line 254  rm -rf %{buildroot}
254  %defattr(-, root, root, -)  %defattr(-, root, root, -)
255  %doc LICENSE.txt README  %doc LICENSE.txt README
256  %config(noreplace) %{_sysconfdir}/logrotate.d/ocsinventory-server  %config(noreplace) %{_sysconfdir}/logrotate.d/ocsinventory-server
257  %config(noreplace) %{_sysconfdir}/httpd/conf.d/z-ocsinventory-server.conf  %config(noreplace) %{_sysconfdir}/httpd/conf.d/ocsinventory-server.conf
258  %attr(750,www,root) %{_localstatedir}/log/ocsinventory-server  %attr(755,www,root) %{_localstatedir}/log/ocsinventory-server
259  %{perl_vendorlib}/Apache  %{perl_vendorlib}/Apache
260    
261    
# Line 194  rm -rf %{buildroot} Line 265  rm -rf %{buildroot}
265  %dir %{_sysconfdir}/ocsinventory  %dir %{_sysconfdir}/ocsinventory
266  %dir %{_sysconfdir}/ocsinventory/ocsinventory-reports  %dir %{_sysconfdir}/ocsinventory/ocsinventory-reports
267  %attr(640,www,root) %config(noreplace) %{_sysconfdir}/ocsinventory/ocsinventory-reports/dbconfig.inc.php  %attr(640,www,root) %config(noreplace) %{_sysconfdir}/ocsinventory/ocsinventory-reports/dbconfig.inc.php
268  %config(noreplace) %{_sysconfdir}/httpd/conf.d/z-ocsinventory-reports.conf  %config(noreplace) %{_sysconfdir}/httpd/conf.d/ocsinventory-reports.conf
269  %{_datadir}/ocsinventory-reports  %{_datadir}/ocsinventory-reports
270  %dir %{_localstatedir}/lib/ocsinventory-server  %attr(755,www,root) %dir %{_localstatedir}/lib/ocsinventory-reports
271  %attr(750,www,root) %dir %{_localstatedir}/lib/ocsinventory-server/ipd  %attr(755,www,root) %dir %{_localstatedir}/lib/ocsinventory-reports/ipd
272  %attr(750,www,root) %dir %{_localstatedir}/lib/ocsinventory-server/download  %attr(755,www,root) %dir %{_localstatedir}/lib/ocsinventory-reports/download
273    
274    
275  %changelog  %changelog
276  * Tue Dec 09 2008 Daniel B. <daniel@firewall-services.com> 1.02-2.rc1  * Fri Jun 12 2009 Daniel B. <daniel@firewall-services.com> 1.02.1-1.el4.sme
277  - Apply patch1 for ocs-inventory 1.02RC3  - update to OCS Inventory NG 1.02.1
278    
279    * Wed Mar 13 2009 Daniel B. <daniel@firewall-services.com> 1.02-0.10.rc3.el4.2
280    - Changes for SME Server (apache=>www)
281    
282    * Sun Jan 18 2009 Remi Collet <Fedora@famillecollet.com> 1.02-0.10.rc3.el4.1
283    - fix php-xml > php-domxml in EL-4
284    
285    * Sun Jan 11 2009 Remi Collet <Fedora@famillecollet.com> 1.02-0.10.rc3
286    - add r1447 and r1462 patch
287    - change log selinux context (httpd_log_t)
288    
289    * Fri Oct 17 2008 Remi Collet <Fedora@famillecollet.com> 1.02-0.9.rc3
290    - upstream r1423 patch - migration script
291    
292    * Sat Oct 11 2008 Remi Collet <Fedora@famillecollet.com> 1.02-0.8.rc3
293    - upstream r1413 patch - database schema
294    
295    * Sat Oct 11 2008 Remi Collet <Fedora@famillecollet.com> 1.02-0.7.rc3
296    - update to RC3
297    
298    * Tue Jul 22 2008 Remi Collet <Fedora@famillecollet.com> 1.02-0.6.rc2
299    - add missing requires perl(SOAP::Transport::HTTP2) (with mod_perl2)
300    - AddDefaultCharset ISO-8859-1 in httpd config
301    - fix SElinux path
302    
303    * Sat Jun 14 2008 Remi Collet <Fedora@famillecollet.com> 1.02-0.5.rc2
304    - change dir from /var/lib/ocsinventory-server to /var/lib/ocsinventory-reports
305    - add Requires nmap and samba-client (nmblookup)
306    
307    * Sun May 18 2008 Remi Collet <Fedora@famillecollet.com> 1.02-0.4.rc2
308    - remove <IfModule> from ocsinventory-server.conf
309    - change perm to 755 on /var/lib/ocsinventory-server
310    - metapackage description closer to upstream components name
311    - add BR perl(DBD::mysql) to avoid build warning
312    
313    * Fri May 16 2008 Xavier Bachelot <xavier@bachelot.org> 1.02-0.3.rc2.1
314    - Fix BuildRequires and Requires.
315    - Fix %%description french translations and a few typos.
316    - Rename apache confs.
317    
318    * Sat May 10 2008 Remi Collet <Fedora@famillecollet.com> 1.02-0.3.rc2
319    - add missing requires for php extensions (from PHP_Compat result)
320    - add selinux stuff
321    
322  * Thu Sep 10 2008 Daniel B. <daniel@firewall-services.com> 1.02-02.rc1  * Thu May 08 2008 Remi Collet <Fedora@famillecollet.com> 1.02-0.2.rc2
323  - small changes for SME server  - update to RC2
324    
325  * Sun Mar 15 2008 Remi Collet <Fedora@famillecollet.com> 1.02-0.2.rc1  * Sun Mar 15 2008 Remi Collet <Fedora@famillecollet.com> 1.02-0.2.rc1
326  - fix download dir  - fix download dir


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed