diff options
author | khvalera | 2022-07-06 13:43:09 +0300 |
---|---|---|
committer | khvalera | 2022-07-06 13:43:09 +0300 |
commit | 5c88e01539a0c6ab5e92ecfc9e70011e375438b8 (patch) | |
tree | 9aea8d5cc35b3e518488ffa00cb1411aa12b7f47 | |
parent | 8c2ea4ec0ad76dd71c850633b3d2b9b712d1264e (diff) | |
download | aur-5c88e01539a0c6ab5e92ecfc9e70011e375438b8.tar.gz |
10.0.2-1
-rw-r--r-- | .SRCINFO | 32 | ||||
-rw-r--r-- | PKGBUILD | 66 | ||||
-rw-r--r-- | downstream.php | 6 | ||||
-rw-r--r-- | glpi.install | 29 | ||||
-rw-r--r-- | httpd-glpi.conf | 7 | ||||
-rw-r--r-- | local_define.php | 3 |
6 files changed, 94 insertions, 49 deletions
@@ -1,27 +1,45 @@ pkgbase = glpi pkgdesc = GLPI Inventory Management - pkgver = 9.5.0 + pkgver = 10.0.2 pkgrel = 1 url = https://www.glpi-project.org install = glpi.install arch = any license = GPL depends = mysql - depends = php optdepends = nginx: a more performant webserver optdepends = apache: a more performant webserver + optdepends = php7 + optdepends = php7-gd + optdepends = php7-intl + optdepends = php7-sodium + optdepends = php7-apache + optdepends = php + optdepends = php-gd + optdepends = php-intl + optdepends = php-sodium + optdepends = php-apache + optdepends = libxml2 + optdepends = zlib + optdepends = openssl options = !strip - backup = etc/glpi/config_db.php - source = https://github.com/glpi-project/glpi/releases/download/9.5.0/glpi-9.5.0.tgz + backup = etc/httpd/conf/extra/httpd-glpi.conf + backup = etc/glpi/local_define.php + source = https://github.com/glpi-project/glpi/releases/download/10.0.2/glpi-10.0.2.tgz + source = httpd-glpi.conf source = glpi.install source = glpi.service source = glpi-cron.service source = glpi-cron.timer - sha256sums = ae89029fe02f272ca9f8812d6f889698ffd3bda3281ddafa0993fff005808cf2 - sha256sums = 6ba1f37a68179b04dfeff44b67c0806a513c1548ebd2cf47232e5f6026f76296 + source = downstream.php + source = local_define.php + sha256sums = 783492568b8070a60ed6051110af348335f755ecd3e79d13e0f614c21f374d54 + sha256sums = 32bd84daa949cfa1158f2c6cd8fa2593fd4bd3cc6392791b69ab24ca98eee0dd + sha256sums = c02b51467eaf9164e8a1e988f3d2cf15ab7a05c40904140d71a18a330a42eccd sha256sums = c5ca6a8d1bcc73c71348d5f8a4c3de0fd023c346d1c2bf02c9dd627bcda9bfe8 sha256sums = 6b515c1c8cc44ef703fe01e53b64d6aea56ed1c833b3553233482437478d4e77 sha256sums = eea9489db1fa8f4762957eb6299dd22ca43c25f9dc62628c973a53cbcfdbab1f + sha256sums = f6ab611d8e8a4520323a6da6c469d9c30e7c713073d47aa8a2719bb8e81e5f7f + sha256sums = ac778bd538e0f2cb3195e1e5794bd57e45850bb823f30df9a7625746048a2d3d pkgname = glpi - @@ -1,58 +1,66 @@ # Maintainer: Felix Golatofski <contact@xdfr.de> # Contributor: Peter Hoeg <first name at last name dot com> +# Contributor: khvalera <khvalera[at]ukr[dot]net> pkgname=glpi -pkgver=9.5.0 +pkgver=10.0.2 pkgrel=1 pkgdesc="GLPI Inventory Management" arch=('any') url='https://www.glpi-project.org' source=("https://github.com/glpi-project/glpi/releases/download/${pkgver}/glpi-${pkgver}.tgz" + 'httpd-glpi.conf' 'glpi.install' 'glpi.service' 'glpi-cron.service' - 'glpi-cron.timer') + 'glpi-cron.timer' + 'downstream.php' + 'local_define.php') license=('GPL') options=(!strip) -depends=(mysql php) -backup=(etc/glpi/config_db.php) +depends=("mysql") +backup=("etc/httpd/conf/extra/httpd-glpi.conf" + "etc/glpi/local_define.php") optdepends=('nginx: a more performant webserver' - 'apache: a more performant webserver') -sha256sums=('ae89029fe02f272ca9f8812d6f889698ffd3bda3281ddafa0993fff005808cf2' - '6ba1f37a68179b04dfeff44b67c0806a513c1548ebd2cf47232e5f6026f76296' + 'apache: a more performant webserver' + 'php7' 'php7-gd' 'php7-intl' 'php7-sodium' 'php7-apache' + 'php' 'php-gd' 'php-intl' 'php-sodium' 'php-apache' + 'libxml2' 'zlib' 'openssl') +sha256sums=('783492568b8070a60ed6051110af348335f755ecd3e79d13e0f614c21f374d54' + '32bd84daa949cfa1158f2c6cd8fa2593fd4bd3cc6392791b69ab24ca98eee0dd' + 'c02b51467eaf9164e8a1e988f3d2cf15ab7a05c40904140d71a18a330a42eccd' 'c5ca6a8d1bcc73c71348d5f8a4c3de0fd023c346d1c2bf02c9dd627bcda9bfe8' '6b515c1c8cc44ef703fe01e53b64d6aea56ed1c833b3553233482437478d4e77' - 'eea9489db1fa8f4762957eb6299dd22ca43c25f9dc62628c973a53cbcfdbab1f') + 'eea9489db1fa8f4762957eb6299dd22ca43c25f9dc62628c973a53cbcfdbab1f' + 'f6ab611d8e8a4520323a6da6c469d9c30e7c713073d47aa8a2719bb8e81e5f7f' + 'ac778bd538e0f2cb3195e1e5794bd57e45850bb823f30df9a7625746048a2d3d') install=glpi.install package() { cd $srcdir/glpi || exit - _base=$pkgdir/usr/share/webapps/glpi - mkdir -p \ - $pkgdir/usr/lib/systemd/system \ $pkgdir/etc \ - $pkgdir/var/lib \ + $pkgdir/etc/httpd/conf/extra \ $pkgdir/usr/share/doc/glpi \ - $_base - - cp $srcdir/glpi*.{service,timer} $pkgdir/usr/lib/systemd/system - - mv *.txt $pkgdir/usr/share/doc/glpi - cp -r * $_base - - mv $_base/config $pkgdir/etc/glpi - ln -s /etc/glpi $_base/config + $pkgdir/usr/share/licenses/$pkgname \ + $pkgdir/usr/share/webapps/glpi \ + $pkgdir/var/lib \ - mv $_base/files $pkgdir/var/lib/glpi - ln -s /var/lib/glpi $_base/files + install -dm 775 $pkgdir/var/log/glpi + #install -dm 775 $pkgdir/var/log/glpi + install -Dm644 "${srcdir}"/httpd-glpi.conf $pkgdir/etc/httpd/conf/extra + ln -s LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE + mv *.md $pkgdir/usr/share/doc/glpi + mv config $pkgdir/etc/glpi + mv files $pkgdir/var/lib/glpi + cp -r * $pkgdir/usr/share/webapps/glpi + install -Dm644 "${srcdir}"/downstream.php $pkgdir/usr/share/webapps/glpi/inc/downstream.php + install -Dm644 "${srcdir}"/local_define.php $pkgdir/etc/glpi/local_define.php find $pkgdir -name remove.txt -delete - - find $pkgdir -type d | xargs chmod 755 - find $pkgdir -type f | xargs chmod 644 - - find $_base/scripts -name '*.sh' | xargs chmod 755 - find $_base/scripts -name '*.sh' | xargs sed -i 's/YOURSERVER/localhost:8080/' + chmod 775 $pkgdir/etc/glpi + chmod 775 $pkgdir/usr/share/webapps/glpi/marketplace + find $pkgdir/var/lib/glpi -type d -exec chmod 775 "{}" \; + rmdir "$pkgdir"/var/lib/glpi/_log } diff --git a/downstream.php b/downstream.php new file mode 100644 index 000000000000..f26e783fda41 --- /dev/null +++ b/downstream.php @@ -0,0 +1,6 @@ +<?php +define('GLPI_CONFIG_DIR', '/etc/glpi/'); + +if (file_exists(GLPI_CONFIG_DIR . '/local_define.php')) { + require_once GLPI_CONFIG_DIR . '/local_define.php'; +}
\ No newline at end of file diff --git a/glpi.install b/glpi.install index 734da21fd040..15e2afa6efdd 100644 --- a/glpi.install +++ b/glpi.install @@ -1,21 +1,24 @@ -post_install() { - groupadd --system glpi - useradd --system \ - --home-dir /var/lib/glpi \ - --shell /usr/bin/nologin \ - --gid glpi \ - glpi +GROUP=http +USER=http + +pre_install() { + getent group ${GROUP} > /dev/null || groupadd --system ${GROUP} + getent passwd ${USER} > /dev/null || useradd --system --gid ${USER} --home-dir /srv/http --shell /usr/bin/nologin --no-create-home ${USER} +} - chown -R glpi:glpi /var/lib/glpi /etc/glpi +post_install() { + chown -R http:http /etc/glpi + chown -R http:http /var/log/glpi + chown -R http:http /var/lib/glpi + chown -R http:http /usr/share/webapps/glpi } -pre_remove() { - systemctl stop glpi - systemctl disable glpi +pre_upgrade() { + pre_install } -post_remove() { - userdel glpi +post_upgrade() { + post_install } # vim:set ts=2 sw=2 et: diff --git a/httpd-glpi.conf b/httpd-glpi.conf new file mode 100644 index 000000000000..52f9dd884a7e --- /dev/null +++ b/httpd-glpi.conf @@ -0,0 +1,7 @@ +Alias /glpi "/usr/share/webapps/glpi" + +<Directory "/usr/share/webapps/glpi"> + Options Indexes MultiViews + AllowOverride None + Require all granted +</Directory>
\ No newline at end of file diff --git a/local_define.php b/local_define.php new file mode 100644 index 000000000000..837b0535978d --- /dev/null +++ b/local_define.php @@ -0,0 +1,3 @@ +<?php +define('GLPI_VAR_DIR', '/var/lib/glpi'); +define('GLPI_LOG_DIR', '/var/log/glpi'); |