Sisyphus repository
Last update: 10 july 2020 | SRPMs: 17697 | Visits: 18858270
en ru br
ALT Linux repos
S:9.4.5-alt1

Group :: Networking/Other
RPM: glpi

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

%define installdir %webserver_webappsdir/%name

Name: glpi
Version: 9.4.3
Release: alt1

Summary: IT and asset management software
License: GPLv2
Group: Networking/Other

URL: http://www.glpi-project.org
Packager: Pavel Zilke <zidex at altlinux dot org>
BuildArch: noarch

Source0: http://www.glpi-project.org/IMG/gz/%name-%version.tar.gz
Source1: apache2.conf
Source2: README.ALT
Patch: patch0.patch

Requires: webserver-common php-engine curl lynx
BuildRequires(pre): rpm-macros-webserver-common

%description
GLPI is the Information Resource-Manager with an additional Administration-
Interface.
You can use it to build up a database with an inventory for your company
(computer, software, printers...).
It has enhanced functions to make the daily life for the administrators easier,
like a job-tracking-system with mail-notification and methods to build a
database with basic information about your network-topology.

%package apache2
Summary: Apache 2.x web-server configuration for %name
Group: Networking/Other
Requires: %name = %version-%release, apache2
%description apache2
Apache 2.x web-server configuration for %name

%package php7
Summary: PHP7 dependencies for %name
Group: Networking/Other
Requires: %name = %version-%release, php7-mysqli, php7-ldap, php7-imap, php7-curl, php7-gd2, php7-fileinfo, php7-mbstring, php7-apcu, php7-opcache, php7-xmlrpc, php7-exif
%description php7
PHP7 dependencies for %name

%prep
%setup
%patch -p0

%build

%install
# install apache config
install -pD -m0644 %_sourcedir/apache2.conf %buildroot%_sysconfdir/httpd2/conf/sites-available/%name.conf

# install glpi

mkdir -p %buildroot%installdir
cp -rp * %buildroot%installdir/

#install README.ALT

install -pD -m0644 %_sourcedir/README.ALT README.ALT

# remove .htaccess files - we're use apache config instead

find %buildroot%installdir -name .htaccess -delete

# remove files

find %buildroot%installdir -name remove.txt -delete
find $RPM_BUILD_ROOT \( -name 'Thumbs.db' -o -name 'Thumbs.db.gz' \) -print -delete

%post

%post apache2
if [ "$1" = "1" ]; then
 a2ensite %name
 %_initdir/httpd2 condreload
fi

%preun apache2
if [ "$1" = "0" ]; then
 a2dissite %name
fi

%postun apache2
if [ "$1" = "0" ]; then
 %_initdir/httpd2 condreload
fi

%files
%dir %installdir
%dir %attr(2770,root,%webserver_group) %installdir/config
#%config %attr(0664,root,%webserver_group) %installdir/config/based_config.php
#%config %attr(0664,root,%webserver_group) %installdir/config/config.php
#%config %attr(0664,root,%webserver_group) %installdir/config/define.php
%dir %attr(2770,root,%webserver_group) %installdir/files
%attr(2770,root,%webserver_group) %installdir/files/*
%installdir/ajax
%installdir/bin
%installdir/config
%installdir/css
%installdir/files
%installdir/front
%installdir/inc
%installdir/install
%installdir/js
%installdir/lib
%installdir/locales
%installdir/pics
%installdir/plugins
%installdir/scripts
%installdir/sound
%installdir/vendor
%installdir/*.php
#%installdir/*.js
#%installdir/*.json
%installdir/COPYING.txt
%doc CHANGELOG.md
%doc CONTRIBUTING.md
%doc README.md
%doc SUPPORT.md
%doc apirest.md
%doc README.ALT

%files apache2
%config(noreplace) %attr(0644,root,root) %_sysconfdir/httpd2/conf/sites-available/%name.conf

%files php7

%changelog

Full changelog you can see here

 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin