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