1 # Maintainer: Sergej Pupykin <pupykin.s@gmail.com>
2 # Contributor:Techlive Zheng <techlivezheng at gmail dot com>
7 pkgdesc="PHP/AJAX web interface for VirtualBox 4.*"
9 url="http://code.google.com/p/phpvirtualbox/"
12 backup=("etc/webapps/phpvirtualbox/.htaccess" "etc/webapps/phpvirtualbox/config.php")
13 source=(http://phpvirtualbox.googlecode.com/files/${pkgname}-${pkgver/_/-}.zip)
14 md5sums=('0bb2afd8d81857693d1537f8c11fcf25')
21 cd ${srcdir}/${pkgname}-${pkgver/_/-}
23 mkdir -p ${pkgdir}/etc/webapps/phpvirtualbox
25 install -D -m644 config.php-example ${pkgdir}/etc/webapps/phpvirtualbox/config.php
27 # sed -e "s/var \\\$username = 'vbox';/var \\\$username = '';/g" \
28 # -e "s/var \\\$password = 'pass';/var \\\$password = '';/g" \
29 # -e "s/#var \\\$noAuth = true;/var \\\$noAuth = true;/g" \
30 # -i ${pkgdir}/etc/webapps/phpvirtualbox/config.php
32 # Apache configuration
33 cat > ${pkgdir}/etc/webapps/phpvirtualbox/apache.example.conf <<EOF
34 Alias /phpvirtualbox "/usr/share/webapps/phpvirtualbox"
35 <Directory "/usr/share/webapps/phpvirtualbox">
36 Options FollowSymlinks
43 # Deny access by default
44 echo "deny from all" >> ${pkgdir}/etc/webapps/phpvirtualbox/.htaccess
46 find . -type f -exec install -D -m644 {,${pkgdir}/usr/share/webapps/${pkgname}/}{} \;
48 ln -s /etc/webapps/phpvirtualbox/.htaccess ${pkgdir}/usr/share/webapps/phpvirtualbox/.htaccess
49 ln -s /etc/webapps/phpvirtualbox/config.php ${pkgdir}/usr/share/webapps/phpvirtualbox/config.php