wok-current annotate phpvirtualbox/receipt @ rev 24586
updated gawk (5.0.1 -> 5.1.1)
author | Hans-G?nter Theisgen |
---|---|
date | Mon Feb 28 09:01:30 2022 +0100 (2022-02-28) |
parents | 4cf10037f0f9 |
children |
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@24055 | 16 current_version() |
pascal@24055 | 17 { |
pascal@24055 | 18 wget -O - ${WGET_URL%/arch*}/releases 2>/dev/null | \ |
pascal@24055 | 19 sed '/archive.*tar/!d;s|.*/\(.*\).tar.*|\1|;s|-|.|;q' |
pascal@24055 | 20 } |
pascal@24055 | 21 |
pascal@7738 | 22 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@7738 | 23 genpkg_rules() |
pascal@7738 | 24 { |
Hans-G?nter@23432 | 25 mkdir -p $fs/usr/share |
Hans-G?nter@23432 | 26 mkdir -p $fs/etc |
Hans-G?nter@23432 | 27 |
Hans-G?nter@23432 | 28 cp -a $src $fs/usr/share/phpvirtualbox |
Hans-G?nter@23432 | 29 cp -a $fs/usr/share/phpvirtualbox/config.php-example \ |
Hans-G?nter@23432 | 30 $fs/etc/phpvirtualbox.php |
Hans-G?nter@23432 | 31 dos2unix $fs/etc/phpvirtualbox.php |
Hans-G?nter@23432 | 32 ln -s /etc/phpvirtualbox.php $fs/usr/share/phpvirtualbox/config.php |
Hans-G?nter@23432 | 33 cp -a stuff/* $fs |
pascal@7738 | 34 } |
pascal@7738 | 35 |
pascal@7738 | 36 post_install() |
pascal@7738 | 37 { |
pascal@7738 | 38 # Virtualbox OSE needs to disable authenication for vboxwebsrv |
pascal@18730 | 39 [ -d "$1/var/lib/tazpkg/installed/virtualbox" ] || |
pascal@18730 | 40 chroot "$1/" VBoxManage setproperty websrvauthlibrary null |
pascal@7738 | 41 |
pascal@7738 | 42 # Configure lighttpd server |
Hans-G?nter@23432 | 43 if [ -f "$1/etc/lighttpd/lighttpd.conf" ] |
Hans-G?nter@23432 | 44 then |
Hans-G?nter@23432 | 45 if ! grep -q /usr/share/phpvirtualbox/ "$1/etc/lighttpd/lighttpd.conf" |
Hans-G?nter@23432 | 46 then |
Hans-G?nter@23432 | 47 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 | 48 if [ -z "$1" ] |
Hans-G?nter@23432 | 49 then |
pascal@7738 | 50 # Start Web server. |
pascal@7738 | 51 /etc/init.d/lighttpd stop |
pascal@7738 | 52 /etc/init.d/lighttpd start |
pascal@7738 | 53 fi |
pascal@7738 | 54 fi |
pascal@7738 | 55 fi |
Hans-G?nter@23432 | 56 |
pascal@7738 | 57 # Configure apache server |
Hans-G?nter@23432 | 58 if [ -f "$1/etc/apache/httpd.conf" ] |
Hans-G?nter@23432 | 59 then |
Hans-G?nter@23432 | 60 if [ ! -f "$1/etc/apache/conf.d/phpvirtualbox" ] |
Hans-G?nter@23432 | 61 then |
pascal@18730 | 62 cat > "$1/etc/apache/conf.d/phpvirtualbox" <<EOT |
pascal@7738 | 63 <IfModule mod_alias.c> |
pascal@7738 | 64 Alias /phpvirtualbox /usr/share/phpvirtualbox |
pascal@7738 | 65 </IfModule> |
pascal@7738 | 66 <DirectoryMatch /usr/share/phpvirtualbox/> |
pascal@7738 | 67 DirectoryIndex index.php |
pascal@7738 | 68 Options +FollowSymLinks |
pascal@7738 | 69 AllowOverride None |
pascal@7738 | 70 Order allow,deny |
pascal@7738 | 71 Allow from all |
pascal@7738 | 72 </DirectoryMatch> |
pascal@7738 | 73 EOT |
Hans-G?nter@23432 | 74 if [ -z "$1" ] |
Hans-G?nter@23432 | 75 then |
pascal@7738 | 76 # Start Web server. |
pascal@7738 | 77 /etc/init.d/apache stop |
pascal@7738 | 78 /etc/init.d/apache start |
pascal@7738 | 79 fi |
pascal@7738 | 80 fi |
pascal@7738 | 81 fi |
pascal@7738 | 82 [ -z "$1" ] && /etc/init.d/vboxwebsrv start |
pascal@7738 | 83 cat <<EOT |
pascal@7738 | 84 Please configure /etc/phpvirtualbox.php now. |
pascal@7738 | 85 EOT |
pascal@7738 | 86 } |
pascal@7738 | 87 |
pascal@7738 | 88 pre_remove() |
pascal@7738 | 89 { |
pascal@7738 | 90 /etc/init.d/vboxwebsrv stop |
pascal@7738 | 91 } |