1 # ExContributor: Cagnulein <cagnulein@tin.it>
2 # Contributor: Filip <fila@pruda.com>
7 pkgdesc="PHP script that displays information about the host being accessed."
10 url="http://phpsysinfo.sourceforge.net/"
11 backup=(etc/webapps/phpsysinfo/config.php
12 etc/webapps/phpsysinfo/.htaccess
13 etc/webapps/phpsysinfo/plugins/{BAT,ipmi,MDStatus,PS,PSStatus,Quotas,SMART,SNMPPInfo,UpdateNotifier}.config.php)
15 optdepends=('lm_sensors: for providing temperature')
16 source=(http://downloads.sourceforge.net/sourceforge/phpsysinfo/phpsysinfo/$pkgver/$pkgname-$pkgver.tar.gz)
17 md5sums=('90b65354bf41c17beac5ac0c5336762c')
21 _destdir=$pkgdir/usr/share/webapps/phpsysinfo
22 _destdir_etc=$pkgdir/etc/webapps/phpsysinfo
24 install -dm755 ${_destdir}
25 install -dm755 ${_destdir_etc}/plugins
27 cp -r $srcdir/$pkgname/* ${_destdir}
29 # fix all the 755 perms on files
30 find ${_destdir}/* -type f -exec chmod 644 {} \;
31 find ${_destdir}/* -type d -exec chmod 755 {} \;
34 mv ${_destdir}/config.php.new ${_destdir_etc}/config.php
35 ln -s /etc/webapps/phpsysinfo/config.php ${_destdir}/config.php
36 touch ${_destdir_etc}/.htaccess
37 ln -s /etc/webapps/phpsysinfo/.htaccess ${_destdir}/.htaccess
40 for _plugin_name in BAT ipmi MDStatus PS PSStatus Quotas SMART SNMPPInfo UpdateNotifier; do
41 mv ${_destdir}/plugins/${_plugin_name}/${_plugin_name}.config.php ${_destdir_etc}/plugins/${_plugin_name}.config.php
42 ln -s /etc/webapps/phpsysinfo/plugins/${_plugin_name}.config.php ${_destdir}/plugins/${_plugin_name}/${_plugin_name}.config.php
46 cat >${_destdir_etc}/apache.example.conf <<EOF
47 Alias /phpsysinfo "/usr/share/webapps/phpsysinfo"
48 <Directory "/usr/share/webapps/phpsysinfo">
49 PHP_ADMIN_FLAG safe_mode off
50 PHP_ADMIN_VALUE open_basedir none
52 Options FollowSymlinks