wok-next annotate phpvirtualbox/receipt @ rev 17381
Add incron
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Wed Nov 26 14:59:55 2014 +0100 (2014-11-26) |
parents | 43000dd3196f |
children | 9e01bc6321ea |
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" |
pascal@7738 | 6 SHORT_DESC="Virtualbox AJAX interface." |
pascal@7738 | 7 MAINTAINER="pascal.bellard@slitaz.org" |
pascal@15198 | 8 LICENSE="GPL3" |
pascal@7738 | 9 TARBALL="$PACKAGE-$VERSION.zip" |
pascal@14030 | 10 WEB_SITE="http://code.google.com/${PACKAGE:0:1}/$PACKAGE/" |
pascal@7738 | 11 WGET_URL="http://$PACKAGE.googlecode.com/files/$TARBALL" |
pascal@15198 | 12 |
pascal@7738 | 13 DEPENDS="php-soap virtualbox" |
pascal@7738 | 14 |
pascal@7738 | 15 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@7738 | 16 genpkg_rules() |
pascal@7738 | 17 { |
pascal@7738 | 18 mkdir -p $fs/usr/share $fs/etc |
pascal@7738 | 19 cp -a $src $fs/usr/share/phpvirtualbox |
slaxemulator@8772 | 20 cp -a $fs/usr/share/phpvirtualbox/config.php-example $fs/etc/phpvirtualbox.php |
pascal@7738 | 21 dos2unix $fs/etc/phpvirtualbox.php |
pascal@7738 | 22 ln -s /etc/phpvirtualbox.php $fs/usr/share/phpvirtualbox/config.php |
pascal@7738 | 23 cp -a stuff/* $fs/ |
pascal@7738 | 24 } |
pascal@7738 | 25 |
pascal@7738 | 26 post_install() |
pascal@7738 | 27 { |
pascal@7738 | 28 # Virtualbox OSE needs to disable authenication for vboxwebsrv |
pascal@7738 | 29 [ -d $1/var/lib/tazpkg/installed/virtualbox ] || |
pascal@14006 | 30 chroot $1/ VBoxManage setproperty websrvauthlibrary null |
pascal@7738 | 31 |
pascal@7738 | 32 # Configure lighttpd server |
pascal@7738 | 33 if [ -f $1/etc/lighttpd/lighttpd.conf ]; then |
pascal@7738 | 34 if ! grep -q /usr/share/phpvirtualbox/ $1/etc/lighttpd/lighttpd.conf; then |
pascal@7738 | 35 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 | 36 if [ -z "$1" ]; then |
pascal@7738 | 37 # Start Web server. |
pascal@7738 | 38 /etc/init.d/lighttpd stop |
pascal@7738 | 39 /etc/init.d/lighttpd start |
pascal@7738 | 40 fi |
pascal@7738 | 41 fi |
pascal@7738 | 42 fi |
pascal@7738 | 43 # Configure apache server |
pascal@7738 | 44 if [ -f $1/etc/apache/httpd.conf ]; then |
pascal@7738 | 45 if [ ! -f $1/etc/apache/conf.d/phpvirtualbox ]; then |
pascal@7738 | 46 cat > $1/etc/apache/conf.d/phpvirtualbox <<EOT |
pascal@7738 | 47 <IfModule mod_alias.c> |
pascal@7738 | 48 Alias /phpvirtualbox /usr/share/phpvirtualbox |
pascal@7738 | 49 </IfModule> |
pascal@7738 | 50 <DirectoryMatch /usr/share/phpvirtualbox/> |
pascal@7738 | 51 DirectoryIndex index.php |
pascal@7738 | 52 Options +FollowSymLinks |
pascal@7738 | 53 AllowOverride None |
pascal@7738 | 54 Order allow,deny |
pascal@7738 | 55 Allow from all |
pascal@7738 | 56 </DirectoryMatch> |
pascal@7738 | 57 EOT |
pascal@7738 | 58 if [ -z "$1" ]; then |
pascal@7738 | 59 # Start Web server. |
pascal@7738 | 60 /etc/init.d/apache stop |
pascal@7738 | 61 /etc/init.d/apache start |
pascal@7738 | 62 fi |
pascal@7738 | 63 fi |
pascal@7738 | 64 fi |
pascal@7738 | 65 [ -z "$1" ] && /etc/init.d/vboxwebsrv start |
pascal@7738 | 66 cat <<EOT |
pascal@7738 | 67 Please configure /etc/phpvirtualbox.php now. |
pascal@7738 | 68 EOT |
pascal@7738 | 69 } |
pascal@7738 | 70 |
pascal@7738 | 71 pre_remove() |
pascal@7738 | 72 { |
pascal@7738 | 73 /etc/init.d/vboxwebsrv stop |
pascal@7738 | 74 } |