wok-next view phpvirtualbox/receipt @ rev 21303
updated gujin (2.8.6 -> 2.8.7)
author | Hans-G?nter Theisgen |
---|---|
date | Tue Dec 10 07:57:29 2019 +0100 (2019-12-10) |
parents | a3c581bf52b8 |
children |
line source
1 # SliTaz package receipt.
3 PACKAGE="phpvirtualbox"
4 VERSION="4.0-7"
5 CATEGORY="network"
6 SHORT_DESC="Virtualbox AJAX interface"
7 MAINTAINER="pascal.bellard@slitaz.org"
8 LICENSE="GPL3"
9 WEB_SITE="https://github.com/phpvirtualbox/phpvirtualbox"
11 TARBALL="$PACKAGE-$VERSION.zip"
12 WGET_URL="http://$PACKAGE.googlecode.com/files/$TARBALL" # FIXME
14 genpkg_rules() {
15 mkdir -p $fs/usr/share $fs/etc
16 cp -a $src $fs/usr/share/phpvirtualbox
17 cp -a $fs/usr/share/phpvirtualbox/config.php-example $fs/etc/phpvirtualbox.php
18 dos2unix $fs/etc/phpvirtualbox.php
19 ln -s /etc/phpvirtualbox.php $fs/usr/share/phpvirtualbox/config.php
20 cp -a $stuff/* $fs/
21 DEPENDS="php-soap virtualbox"
22 }
24 post_install() {
25 # Virtualbox OSE needs to disable authenication for vboxwebsrv
26 [ -d "$1/var/lib/tazpkg/installed/virtualbox" ] ||
27 chroot "$1/" VBoxManage setproperty websrvauthlibrary null
29 # Configure lighttpd server
30 if [ -f "$1/etc/lighttpd/lighttpd.conf" ]; then
31 if ! grep -q /usr/share/phpvirtualbox/ "$1/etc/lighttpd/lighttpd.conf"; then
32 sed -e 's|.*"/examples/" => "/usr/share/examples/",| "/examples/" => "/usr/share/examples/",\n "/phpvirtualbox/" => "/usr/share/phpvirtualbox/",|g' -i "$1/etc/lighttpd/lighttpd.conf"
33 if [ -z "$1" ]; then
34 # Start Web server.
35 /etc/init.d/lighttpd stop
36 /etc/init.d/lighttpd start
37 fi
38 fi
39 fi
40 # Configure apache server
41 if [ -f "$1/etc/apache/httpd.conf" ]; then
42 if [ ! -f "$1/etc/apache/conf.d/phpvirtualbox" ]; then
43 cat > "$1/etc/apache/conf.d/phpvirtualbox" <<EOT
44 <IfModule mod_alias.c>
45 Alias /phpvirtualbox /usr/share/phpvirtualbox
46 </IfModule>
47 <DirectoryMatch /usr/share/phpvirtualbox/>
48 DirectoryIndex index.php
49 Options +FollowSymLinks
50 AllowOverride None
51 Order allow,deny
52 Allow from all
53 </DirectoryMatch>
54 EOT
55 if [ -z "$1" ]; then
56 # Start Web server.
57 /etc/init.d/apache stop
58 /etc/init.d/apache start
59 fi
60 fi
61 fi
62 [ -z "$1" ] && /etc/init.d/vboxwebsrv start
64 [ -n "$quiet" ] || cat <<EOT
66 .----------------------------------------------.
67 | Please configure /etc/phpvirtualbox.php now. |
68 '----------------------------------------------'
69 EOT
70 }
72 pre_remove() {
73 /etc/init.d/vboxwebsrv stop
74 }