updated on Thu Jan 19 20:01:47 UTC 2012
[aur-mirror.git] / phpvirtualbox / PKGBUILD
blobdadbd04b86ba64de74c00892649f6f06bf928ac1
1 # Maintainer: Sergej Pupykin <pupykin.s@gmail.com>
2 # Contributor:Techlive Zheng <techlivezheng at gmail dot com>
4 pkgname=phpvirtualbox
5 pkgver=4.1_2
6 pkgrel=1
7 pkgdesc="PHP/AJAX web interface for VirtualBox 4.*"
8 arch=(any)
9 url="http://code.google.com/p/phpvirtualbox/"
10 license=('GPL')
11 depends=('php')
12 backup=("etc/webapps/phpvirtualbox/.htaccess" "etc/webapps/phpvirtualbox/config.php")
13 source=(http://phpvirtualbox.googlecode.com/files/${pkgname}-${pkgver/_/-}.zip)
14 md5sums=('0bb2afd8d81857693d1537f8c11fcf25')
16 build() {
17   true
20 package() {
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
37     AllowOverride All
38     Order allow,deny
39     Allow from all
40   </Directory>
41 EOF
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