]> git.pld-linux.org Git - packages/ocs-inventory-ng.git/blame - ocs-inventory-ng.spec
- prever virtual provides over package name
[packages/ocs-inventory-ng.git] / ocs-inventory-ng.spec
CommitLineData
aa314e65 1#
1162005a 2Summary: OCS-Inventory NG - keeping track of the configuration and installed software
0c3bf43d 3Summary(pl.UTF-8): OCS-Inventory NG - śledzenie konfiguracji i zainstalowanego oprogramowania
1162005a 4Name: ocs-inventory-ng
cc785fb9
AG
5Version: 2.0.5
6Release: 0.0.1
d8facef8
MWP
7License: GPL
8Group: Applications
cc785fb9
AG
9Source0: https://launchpad.net/ocsinventory-server/stable-2.0/2.0.5/+download/OCSNG_UNIX_SERVER-%{version}.tar.gz
10# Source0-md5: 349904d03494b8fd9fc4eea1d6859729
f9e95229
AG
11Source1: http://download.ocsinventory-ng.org/pub/plugins/PluginOcsOfficekey-2.2.4.tar.gz
12# Source1-md5: ec8c319a17f6a0d8b104cdc2a8f20127
13Patch0: %{name}-plugin-officekey.patch
aa314e65 14URL: http://www.ocsinventory-ng.org/
370972ab 15BuildRequires: perl-ExtUtils-MakeMaker
cc785fb9 16BuildRequires: perl-devel >= 1:5.6
1162005a
MWP
17Requires: apache >= 1.3.33
18Requires: apache-mod_perl >= 1.29
1162005a 19Requires: apache-mod_php >= 4.3.2
efea437e 20Requires: perl-Apache-DBI >= 0.93
1162005a 21Requires: perl-Compress-Zlib >= 1.33
624a0c53 22Requires: perl-DBD-mysql >= 2.9004
efea437e 23Requires: perl-DBI >= 1.40
1162005a 24Requires: perl-Net-IP >= 1.21
efea437e 25Requires: perl-XML-Simple >= 2.12
70f9ce0a 26Requires: perl-base >= 1:5.6
cc785fb9 27Requires: php(core) >= 4.3.2
d6143a01 28Requires: php(zip)
b64a59ec 29Requires: webapps
bb25d136 30Requires: webserver(indexfile)
cc785fb9
AG
31Suggests: perl-SOAP-Lite
32Suggests: perl-XML-Entities
d8facef8
MWP
33BuildArch: noarch
34BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35
b64a59ec 36%define _webapps /etc/webapps
37%define _webapp %{name}
38%define _webappconfdir %{_webapps}/%{_webapp}
39%define _appdir %{_datadir}/%{_webapp}
467b6b9e 40
d8facef8
MWP
41%description
42Open Computer and Software Inventory Next Generation is an application
43designed to help a network or system administrator keep track of the
44computer configuration and software installed on the network.
45
46Dialog between client computers and management server is based on
47actual standards, HTTP protocol and XML data formatting.
48
5c1de983 49Management server runs on Apache/MySQL/PHP/Perl server, under Linux or
d8facef8
MWP
50Windows NT based computers.
51
52Inventoried client computers can run Microsoft Windows
5395/98/Me/NT4/2000/XP/2003 or Linux operating systems.
54
5c1de983 55Used with a park management software such as GLPI, you will have a
efea437e
ER
56powerful inventory and park management software with automatic updates
57of computer configuration, license management, help desk and more.
d8facef8 58
7a100a84 59%description -l pl.UTF-8
5c1de983 60Open Computer and Software Inventory Next Generation to aplikacja
7a100a84
JR
61zaprojektowana, aby pomóc administratorom sieci lub systemów w
62śledzeniu konfiguracji komputerów i oprogramowania zainstalowanego w
5c1de983
JB
63sieci.
64
7a100a84
JR
65Dialog między komputerami klienckimi a serwerem zarządzającym jest
66oparty na właściwych standardach, takich jak protokół HTTP i format
5c1de983
JB
67danych XML.
68
7a100a84 69Serwer zarządzający działa na serwerze Apache/MySQL/PHP/Perl pod
5c1de983
JB
70Linuksem lub Windows NT.
71
7a100a84 72Inwentaryzowane komputery klienckie mogą działać pod kontrolą systemu
5c1de983
JB
73Microsoft Windows 95/98/Me/NT4/2000/XP/2003 lub Linux.
74
7a100a84
JR
75Przy użyciu oprogramowania do zarządzania parkiem informatycznym,
76takiego jak GLPI, otrzymamy potężne oprogramowanie do inwentaryzacji i
77zarządzania parkiem z automatycznym uaktualnianiem konfiguracji
78komputerów, zarządzaniem licencjami, help deskiem itd.
d8facef8 79
d8facef8 80%prep
f9e95229
AG
81%setup -q -n OCSNG_UNIX_SERVER-%{version} -a1
82%patch0 -p1
83
84mv -f PluginOcsOfficekey-2.2.4/README{,-Officekey}.txt
85mv -f PluginOcsOfficekey-2.2.4/CHANGES{,-Officekey}.txt
86
87# combine sql files
88cat PluginOcsOfficekey-2.2.4/*.sql >> ocsreports/files/ocsbase.sql
89cat PluginOcsOfficekey-2.2.4/*.sql >> ocsreports/files/ocsbase_new.sql
d8facef8 90
1d2a368c
AG
91# mimic setup.sh
92sed -e 's,PATH_TO_LOG_DIRECTORY,/var/log/ocs-inventory-ng,g' \
93 -i etc/logrotate.d/ocsinventory-server
94
95sed -e 's,VERSION_MP,2,g' \
96 -e 's,DATABASE_SERVER,localhost,g' \
97 -e 's,DATABASE_PORT,3306,g' \
98 -e 's,PATH_TO_LOG_DIRECTORY,/var/log/ocs-inventory-ng/,g' \
99 -i etc/ocsinventory/ocsinventory-server.conf
100
101sed -e 's,OCSREPORTS_ALIAS,/ocsreports,g' \
102 -e 's,PATH_TO_OCSREPORTS_DIR,/usr/share/ocs-inventory-ng,g' \
103 -e 's,PACKAGES_ALIAS,/download,g' \
104 -e 's,PATH_TO_PACKAGES_DIR,/var/lib/ocs-inventory-ng/,g' \
105 -i etc/ocsinventory/ocsinventory-reports.conf
d8facef8 106
a520d073
AG
107# combine apache files
108cat etc/ocsinventory/ocsinventory-{server,reports}.conf > etc/ocsinventory/ocsinventory.conf
109
110# prepare db config and drop install.php
111rm ocsreports/install.php
112cat > ocsreports/dbconfig.inc.php << 'EOF'
113<?php
114define('DB_NAME', 'ocsweb');
115define('SERVER_READ', 'localhost');
116define('SERVER_WRITE', 'localhost');
117define('COMPTE_BASE', 'ocs');
118define('PSWD_BASE', 'ocs');
119EOF
120
d8facef8 121%build
d42ad465
MWP
122cd Apache
123%{__perl} Makefile.PL \
70f9ce0a 124 INSTALLDIRS=vendor
d42ad465 125%{__make}
d8facef8
MWP
126
127%install
128rm -rf $RPM_BUILD_ROOT
d8facef8 129
d42ad465
MWP
130cd Apache
131%{__make} install \
b64a59ec 132 DESTDIR=$RPM_BUILD_ROOT
d42ad465
MWP
133cd ..
134
a92e2ee6 135install -d $RPM_BUILD_ROOT{%{_datadir}/%{name},%{_sysconfdir}/logrotate.d,%{_var}/log/%{name}}
467b6b9e 136install -d $RPM_BUILD_ROOT{%{_appdir},%{_webappconfdir}}
f9e95229
AG
137
138# ocsreports + plugins
1162005a 139cp -Rf ocsreports/* $RPM_BUILD_ROOT%{_datadir}/%{name}
f9e95229
AG
140cp -a PluginOcsOfficekey-2.2.4/cd_officepack $RPM_BUILD_ROOT%{_datadir}/%{name}/plugins/computer_detail
141cp -a PluginOcsOfficekey-2.2.4/img/cd_* $RPM_BUILD_ROOT%{_datadir}/%{name}/plugins/computer_detail/img/
142cp -a PluginOcsOfficekey-2.2.4/ms_plugins/ms_plugins_packoffice.php $RPM_BUILD_ROOT%{_datadir}/%{name}/plugins/main_sections/ms_plugins
143cp -a PluginOcsOfficekey-2.2.4/img/ms_* $RPM_BUILD_ROOT%{_datadir}/%{name}/plugins/main_sections/img/
1162005a 144
cc785fb9 145install etc/logrotate.d/ocsinventory-server $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/ocs-inventory-ng
a520d073
AG
146install etc/ocsinventory/ocsinventory.conf $RPM_BUILD_ROOT%{_webappconfdir}/apache.conf
147install etc/ocsinventory/ocsinventory.conf $RPM_BUILD_ROOT%{_webappconfdir}/httpd.conf
cc785fb9 148install binutils/ipdiscover-util.pl $RPM_BUILD_ROOT%{_datadir}/%{name}/ipdiscover-util.pl
d8facef8
MWP
149
150%clean
151rm -rf $RPM_BUILD_ROOT
152
467b6b9e
MWP
153%triggerin -- apache1 < 1.3.37-3, apache1-base
154%webapp_register apache %{_webapp}
155
156%triggerun -- apache1 < 1.3.37-3, apache1-base
157%webapp_unregister apache %{_webapp}
158
159%triggerin -- apache < 2.2.0, apache-base
160%webapp_register httpd %{_webapp}
161
162%triggerun -- apache < 2.2.0, apache-base
163%webapp_unregister httpd %{_webapp}
164
d8facef8
MWP
165%files
166%defattr(644,root,root,755)
f9e95229 167%doc README ocsreports/files/*.sql binutils/ocs-errors binutils/*.README PluginOcsOfficekey-2.2.4/*.txt PluginOcsOfficekey-2.2.4/msofficekey.vbs
467b6b9e
MWP
168%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/ocs-inventory-ng
169%attr(750,root,http) %dir %{_webappconfdir}
170%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webappconfdir}/apache.conf
171%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webappconfdir}/httpd.conf
1162005a 172%{_datadir}/%{name}/
8d1545dd
MWP
173%dir %{perl_vendorlib}/Apache/Ocsinventory
174%{perl_vendorlib}/Apache/Ocsinventory/*
175%{perl_vendorlib}/Apache/Ocsinventory.pm
a92e2ee6 176%attr(770,root,http) %dir %{_var}/log/%{name}
This page took 0.086734 seconds and 4 git commands to generate.