blob: 8420700675aa3c5a07563c86e01db21375f8010e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
# Maintainer: Nils Czernia <nils[at]czserver[dot]de>
pkgname=librenms
pkgver=201512
pkgrel=1
pkgdesc='LibreNMS is an autodiscovering PHP/MySQL-based network monitoring system.'
arch=('any')
url='http://www.librenms.org/'
license=('GPLv3')
depends=('php' 'php-intl' 'php-gd' 'php-pear' 'net-snmp' 'graphviz' 'php-snmp' 'php-mcrypt' 'fping' 'imagemagick' 'whois' 'nmap' 'rrdtool' 'git' 'perl-net-ip')
backup=("etc/webapps/${pkgname}/config.php")
source=("https://github.com/librenms/${pkgname}/archive/${pkgver}.tar.gz"
"apache.example.conf"
"nginx.example.conf")
install=("librenms.install")
sha256sums=('3f4eb3263e9f6eb89b9373a944ed061eb7104756da18e815e7598a84092e2f4d'
'aed1a35b2d84f3b40e0d519ccdb56a5929896ae7cfedd3766f5df4b51fac3319'
'e1722c586e61e320c2382b2322150e176c61523dccb81eeec6c3d4618819110c')
package() {
cd "$pkgdir"
install -dm0755 usr/share/webapps
install -dm0755 etc/webapps/${pkgname}
install -dm0755 var/log/${pkgname}
cp -a "$srcdir"/${pkgname}-${pkgver} usr/share/webapps/${pkgname}
# copy config in etc and link it
cp usr/share/webapps/${pkgname}/config.php.default etc/webapps/${pkgname}/config.php
cp usr/share/webapps/${pkgname}/config.php.default etc/webapps/${pkgname}/config.php.default
ln -s ../../../../etc/webapps/${pkgname}/config.php usr/share/webapps/${pkgname}/config.php
ln -s ../,,/,,/,,/etc/webapps/${pkgname}/config.php.default usr/share/webapps/${pkgname}/config.php.default
rm ../../../../etc/webapps/${pkgname}/config.php
# move logs to /var/log
ln -s ../../../../var/log/${pkgname} usr/share/webapps/${pkgname}/logs
install -dm0775 usr/share/webapps/${pkgname}/rrd
# php.ini
install -dm0755 $pkgdir/etc/php/conf.d/
echo 'open_basedir = ${open_basedir}:/usr/share/webapps/librenms:/etc/webapps/librenms:/proc' > etc/php/conf.d/${pkgname}.ini
}
|