wok view phpvirtualbox/receipt @ rev 19294

sane-backends, scons, scrot, shell-fm, smake, soundtouch, wireless_tools: fix man or doc path
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Jul 06 16:30:34 2016 +0200 (2016-07-06)
parents 78cb1e930abd
children 8dd8bab3f0ca
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 TARBALL="$PACKAGE-$VERSION.zip"
10 WEB_SITE="http://code.google.com/${PACKAGE:0:1}/$PACKAGE/"
11 WGET_URL="http://$PACKAGE.googlecode.com/files/$TARBALL"
13 DEPENDS="php-soap virtualbox"
15 # Rules to gen a SliTaz package suitable for Tazpkg.
16 genpkg_rules()
17 {
18 mkdir -p $fs/usr/share $fs/etc
19 cp -a $src $fs/usr/share/phpvirtualbox
20 cp -a $fs/usr/share/phpvirtualbox/config.php-example $fs/etc/phpvirtualbox.php
21 dos2unix $fs/etc/phpvirtualbox.php
22 ln -s /etc/phpvirtualbox.php $fs/usr/share/phpvirtualbox/config.php
23 cp -a stuff/* $fs/
24 }
26 post_install()
27 {
28 # Virtualbox OSE needs to disable authenication for vboxwebsrv
29 [ -d "$1/var/lib/tazpkg/installed/virtualbox" ] ||
30 chroot "$1/" VBoxManage setproperty websrvauthlibrary null
32 # Configure lighttpd server
33 if [ -f "$1/etc/lighttpd/lighttpd.conf" ]; then
34 if ! grep -q /usr/share/phpvirtualbox/ "$1/etc/lighttpd/lighttpd.conf"; then
35 sed -e 's|.*"/examples/" => "/usr/share/examples/",| "/examples/" => "/usr/share/examples/",\n "/phpvirtualbox/" => "/usr/share/phpvirtualbox/",|g' -i "$1/etc/lighttpd/lighttpd.conf"
36 if [ -z "$1" ]; then
37 # Start Web server.
38 /etc/init.d/lighttpd stop
39 /etc/init.d/lighttpd start
40 fi
41 fi
42 fi
43 # Configure apache server
44 if [ -f "$1/etc/apache/httpd.conf" ]; then
45 if [ ! -f "$1/etc/apache/conf.d/phpvirtualbox" ]; then
46 cat > "$1/etc/apache/conf.d/phpvirtualbox" <<EOT
47 <IfModule mod_alias.c>
48 Alias /phpvirtualbox /usr/share/phpvirtualbox
49 </IfModule>
50 <DirectoryMatch /usr/share/phpvirtualbox/>
51 DirectoryIndex index.php
52 Options +FollowSymLinks
53 AllowOverride None
54 Order allow,deny
55 Allow from all
56 </DirectoryMatch>
57 EOT
58 if [ -z "$1" ]; then
59 # Start Web server.
60 /etc/init.d/apache stop
61 /etc/init.d/apache start
62 fi
63 fi
64 fi
65 [ -z "$1" ] && /etc/init.d/vboxwebsrv start
66 cat <<EOT
67 Please configure /etc/phpvirtualbox.php now.
68 EOT
69 }
71 pre_remove()
72 {
73 /etc/init.d/vboxwebsrv stop
74 }