diff options
-rw-r--r-- | .SRCINFO | 34 | ||||
-rw-r--r-- | PKGBUILD | 80 | ||||
-rw-r--r-- | downstream.php | 6 | ||||
-rw-r--r-- | glpi.install | 34 | ||||
-rw-r--r-- | httpd-glpi.conf | 7 | ||||
-rw-r--r-- | local_define.php | 3 | ||||
-rw-r--r-- | uk_UA.po.bz2 | bin | 0 -> 131996 bytes |
7 files changed, 108 insertions, 56 deletions
@@ -1,29 +1,43 @@ -# Generated by mksrcinfo v8 -# Mon May 23 10:33:44 UTC 2016 pkgbase = glpi pkgdesc = GLPI Inventory Management - pkgver = 0.90.3 + pkgver = 10.0.14 pkgrel = 1 - url = http://www.glpi-project.org + url = https://www.glpi-project.org install = glpi.install arch = any license = GPL + makedepends = gettext depends = mysql - depends = php optdepends = nginx: a more performant webserver optdepends = apache: a more performant webserver + 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/0.90.3/glpi-0.90.3.tar.gz + 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.14/glpi-10.0.14.tgz + source = httpd-glpi.conf source = glpi.install source = glpi.service source = glpi-cron.service source = glpi-cron.timer - sha256sums = 15d1cdef40b425d5e6af67e65855298ba9b25af714f44fc3a4f5fb8e646f1227 - sha256sums = 6ba1f37a68179b04dfeff44b67c0806a513c1548ebd2cf47232e5f6026f76296 + source = downstream.php + source = local_define.php + source = https://github.com/snuglinux/glpi_uk/raw/main/uk_UA.po.bz2 + sha256sums = 69c7503c453a85ef47b47cbf08d3ebe8cb8bfe0d45f6aeb32d58c10321e911f5 + sha256sums = 32bd84daa949cfa1158f2c6cd8fa2593fd4bd3cc6392791b69ab24ca98eee0dd + sha256sums = 04e40235a4a6c7d1e0daaa91e630654e632073fd5fee33bb6befa7b6f3713e44 sha256sums = c5ca6a8d1bcc73c71348d5f8a4c3de0fd023c346d1c2bf02c9dd627bcda9bfe8 sha256sums = 6b515c1c8cc44ef703fe01e53b64d6aea56ed1c833b3553233482437478d4e77 sha256sums = eea9489db1fa8f4762957eb6299dd22ca43c25f9dc62628c973a53cbcfdbab1f + sha256sums = f6ab611d8e8a4520323a6da6c469d9c30e7c713073d47aa8a2719bb8e81e5f7f + sha256sums = ac778bd538e0f2cb3195e1e5794bd57e45850bb823f30df9a7625746048a2d3d + sha256sums = 1467a885c2d5c8cbdf222fc6db025d054529a96e741f36b53aa3d709c6a00c81 pkgname = glpi - @@ -1,57 +1,71 @@ -# Maintainer: Peter Hoeg <first name at last name dot com> +# 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=0.90.3 +pkgver=10.0.14 pkgrel=1 pkgdesc="GLPI Inventory Management" arch=('any') -url='http://www.glpi-project.org' -source=("https://github.com/glpi-project/glpi/releases/download/${pkgver}/glpi-${pkgver}.tar.gz" +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' + 'https://github.com/snuglinux/glpi_uk/raw/main/uk_UA.po.bz2' + ) + 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=('15d1cdef40b425d5e6af67e65855298ba9b25af714f44fc3a4f5fb8e646f1227' - '6ba1f37a68179b04dfeff44b67c0806a513c1548ebd2cf47232e5f6026f76296' + 'apache: a more performant webserver' + 'php' 'php-gd' 'php-intl' 'php-sodium' 'php-apache' + 'libxml2' 'zlib' 'openssl') +makedepends=("gettext") +sha256sums=('69c7503c453a85ef47b47cbf08d3ebe8cb8bfe0d45f6aeb32d58c10321e911f5' + '32bd84daa949cfa1158f2c6cd8fa2593fd4bd3cc6392791b69ab24ca98eee0dd' + '04e40235a4a6c7d1e0daaa91e630654e632073fd5fee33bb6befa7b6f3713e44' 'c5ca6a8d1bcc73c71348d5f8a4c3de0fd023c346d1c2bf02c9dd627bcda9bfe8' '6b515c1c8cc44ef703fe01e53b64d6aea56ed1c833b3553233482437478d4e77' - 'eea9489db1fa8f4762957eb6299dd22ca43c25f9dc62628c973a53cbcfdbab1f') + 'eea9489db1fa8f4762957eb6299dd22ca43c25f9dc62628c973a53cbcfdbab1f' + 'f6ab611d8e8a4520323a6da6c469d9c30e7c713073d47aa8a2719bb8e81e5f7f' + 'ac778bd538e0f2cb3195e1e5794bd57e45850bb823f30df9a7625746048a2d3d' + '1467a885c2d5c8cbdf222fc6db025d054529a96e741f36b53aa3d709c6a00c81' + ) 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 - - mv $_base/files $pkgdir/var/lib/glpi - ln -s /var/lib/glpi $_base/files + $pkgdir/usr/share/licenses/$pkgname \ + $pkgdir/usr/share/webapps/glpi \ + $pkgdir/var/lib \ + 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 + install -Dm644 "${srcdir}"/*.po $pkgdir/usr/share/webapps/glpi/locales/ + msgfmt $pkgdir/usr/share/webapps/glpi/locales/uk_UA.po -o $pkgdir/usr/share/webapps/glpi/locales/uk_UA.mo } 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..e0b511d4d6b8 100644 --- a/glpi.install +++ b/glpi.install @@ -1,21 +1,29 @@ -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 + # Needed to update the translations + rm -f /var/lib/glpi/_sessions/* + echo ">============================================================<" + echo -e "To update translations, do the following:\nphp /usr/share/webapps/glpi/bin/console cache:clear\nsystemctl restart httpd\n" + echo ">============================================================<" } # 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'); diff --git a/uk_UA.po.bz2 b/uk_UA.po.bz2 Binary files differnew file mode 100644 index 000000000000..28a8a9be1ef8 --- /dev/null +++ b/uk_UA.po.bz2 |