wok annotate phpvirtualbox/receipt @ rev 25604

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