wok view phpvirtualbox/receipt @ rev 22680
rsync, openssh: update $CONFIG_FILES
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sat Jan 18 18:26:14 2020 +0100 (2020-01-18) |
parents | 9e01bc6321ea |
children | 4cf10037f0f9 |
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="https://github.com/phpvirtualbox/phpvirtualbox"
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 }