wok-next annotate phpvirtualbox/receipt @ rev 21039

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