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

Annotation of /rpms/ocsinventory/contribs7/ocsinventory.spec

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


Revision 1.1 - (hide annotations) (download)
Mon Mar 2 23:22:17 2009 UTC (15 years, 3 months ago) by slords
Branch: MAIN
Initial import of ocsinventory

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

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