wok-current annotate phpvirtualbox/receipt @ rev 23432
updated phpvirtualbox (4.0-7 -> 5.2.1)
author | Hans-G?nter Theisgen |
---|---|
date | Wed Apr 01 17:31:39 2020 +0100 (2020-04-01) |
parents | 8dd8bab3f0ca |
children | 5ea0ce1cecc0 |
rev | line source |
---|---|
pascal@7738 | 1 # SliTaz package receipt. |
pascal@7738 | 2 |
pascal@7738 | 3 PACKAGE="phpvirtualbox" |
Hans-G?nter@23432 | 4 VERSION="5.2.1" |
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@20672 | 9 WEB_SITE="https://github.com/phpvirtualbox/phpvirtualbox" |
Hans-G?nter@23432 | 10 |
Hans-G?nter@23432 | 11 TARBALL="$PACKAGE-$VERSION.tar.gz" |
Hans-G?nter@23432 | 12 WGET_URL="$WEB_SITE/archive/${VERSION%.*}-${VERSION##*.}.tar.gz" |
pascal@15198 | 13 |
pascal@7738 | 14 DEPENDS="php-soap virtualbox" |
pascal@7738 | 15 |
pascal@7738 | 16 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@7738 | 17 genpkg_rules() |
pascal@7738 | 18 { |
Hans-G?nter@23432 | 19 mkdir -p $fs/usr/share |
Hans-G?nter@23432 | 20 mkdir -p $fs/etc |
Hans-G?nter@23432 | 21 |
Hans-G?nter@23432 | 22 cp -a $src $fs/usr/share/phpvirtualbox |
Hans-G?nter@23432 | 23 cp -a $fs/usr/share/phpvirtualbox/config.php-example \ |
Hans-G?nter@23432 | 24 $fs/etc/phpvirtualbox.php |
Hans-G?nter@23432 | 25 dos2unix $fs/etc/phpvirtualbox.php |
Hans-G?nter@23432 | 26 ln -s /etc/phpvirtualbox.php $fs/usr/share/phpvirtualbox/config.php |
Hans-G?nter@23432 | 27 cp -a stuff/* $fs |
pascal@7738 | 28 } |
pascal@7738 | 29 |
pascal@7738 | 30 post_install() |
pascal@7738 | 31 { |
pascal@7738 | 32 # Virtualbox OSE needs to disable authenication for vboxwebsrv |
pascal@18730 | 33 [ -d "$1/var/lib/tazpkg/installed/virtualbox" ] || |
pascal@18730 | 34 chroot "$1/" VBoxManage setproperty websrvauthlibrary null |
pascal@7738 | 35 |
pascal@7738 | 36 # Configure lighttpd server |
Hans-G?nter@23432 | 37 if [ -f "$1/etc/lighttpd/lighttpd.conf" ] |
Hans-G?nter@23432 | 38 then |
Hans-G?nter@23432 | 39 if ! grep -q /usr/share/phpvirtualbox/ "$1/etc/lighttpd/lighttpd.conf" |
Hans-G?nter@23432 | 40 then |
Hans-G?nter@23432 | 41 sed -e 's|.*"/examples/" => "/usr/share/examples/",| "/examples/" => "/usr/share/examples/",\n "/phpvirtualbox/" => "/usr/share/phpvirtualbox/",|g' -i "$1/etc/lighttpd/lighttpd.conf" |
Hans-G?nter@23432 | 42 if [ -z "$1" ] |
Hans-G?nter@23432 | 43 then |
pascal@7738 | 44 # Start Web server. |
pascal@7738 | 45 /etc/init.d/lighttpd stop |
pascal@7738 | 46 /etc/init.d/lighttpd start |
pascal@7738 | 47 fi |
pascal@7738 | 48 fi |
pascal@7738 | 49 fi |
Hans-G?nter@23432 | 50 |
pascal@7738 | 51 # Configure apache server |
Hans-G?nter@23432 | 52 if [ -f "$1/etc/apache/httpd.conf" ] |
Hans-G?nter@23432 | 53 then |
Hans-G?nter@23432 | 54 if [ ! -f "$1/etc/apache/conf.d/phpvirtualbox" ] |
Hans-G?nter@23432 | 55 then |
pascal@18730 | 56 cat > "$1/etc/apache/conf.d/phpvirtualbox" <<EOT |
pascal@7738 | 57 <IfModule mod_alias.c> |
pascal@7738 | 58 Alias /phpvirtualbox /usr/share/phpvirtualbox |
pascal@7738 | 59 </IfModule> |
pascal@7738 | 60 <DirectoryMatch /usr/share/phpvirtualbox/> |
pascal@7738 | 61 DirectoryIndex index.php |
pascal@7738 | 62 Options +FollowSymLinks |
pascal@7738 | 63 AllowOverride None |
pascal@7738 | 64 Order allow,deny |
pascal@7738 | 65 Allow from all |
pascal@7738 | 66 </DirectoryMatch> |
pascal@7738 | 67 EOT |
Hans-G?nter@23432 | 68 if [ -z "$1" ] |
Hans-G?nter@23432 | 69 then |
pascal@7738 | 70 # Start Web server. |
pascal@7738 | 71 /etc/init.d/apache stop |
pascal@7738 | 72 /etc/init.d/apache start |
pascal@7738 | 73 fi |
pascal@7738 | 74 fi |
pascal@7738 | 75 fi |
pascal@7738 | 76 [ -z "$1" ] && /etc/init.d/vboxwebsrv start |
pascal@7738 | 77 cat <<EOT |
pascal@7738 | 78 Please configure /etc/phpvirtualbox.php now. |
pascal@7738 | 79 EOT |
pascal@7738 | 80 } |
pascal@7738 | 81 |
pascal@7738 | 82 pre_remove() |
pascal@7738 | 83 { |
pascal@7738 | 84 /etc/init.d/vboxwebsrv stop |
pascal@7738 | 85 } |