wok annotate ovz-web-panel/receipt @ rev 25303

updated shared-mime-info and shared-mime-info-dev (1.15 -> 2.2)
author Hans-G?nter Theisgen
date Wed Jul 20 09:08:48 2022 +0100 (2022-07-20)
parents d765616e1f3d
children 7364ffdaaa60
rev   line source
erjo@8059 1 # SliTaz package receipt.
erjo@8059 2
erjo@8059 3 PACKAGE="ovz-web-panel"
erjo@8059 4 VERSION="1.7"
slaxemulator@8856 5 CATEGORY="network"
erjo@8059 6 SHORT_DESC="GUI web-based frontend for OpenVZ"
erjo@8059 7 MAINTAINER="erjo@slitaz.org"
pascal@15610 8 LICENSE="GPL2"
erjo@8059 9 TARBALL="${PACKAGE}-${VERSION}.tgz"
pascal@25031 10 WEB_SITE="https://github.com/sibprogrammer/owp"
pascal@24979 11 WGET_URL="https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/$PACKAGE/$TARBALL"
erjo@8059 12
pascal@15610 13 DEPENDS="ruby-enterprise sqlite3-ruby"
erjo@8059 14
pascal@24545 15 # What is the latest version available today?
pascal@24545 16 current_version()
pascal@24545 17 {
pascal@24545 18 wget -O - https://github.com/Bickets/ovz-web-panel/tags 2>/dev/null | \
pascal@24545 19 sed '/archive.*tar/!d;s|.*/v*\(.*\).tar.*|\1|;q'
pascal@24545 20 }
pascal@24545 21
erjo@8059 22 # Rules to configure and make the package.
erjo@8059 23 compile_rules()
erjo@8059 24 {
erjo@8059 25 # Apply patches
erjo@8059 26 while read patch_file; do
erjo@8059 27 if [ -f done.$patch_file ]; then
erjo@8059 28 echo "Skipping $patch_file"
erjo@8059 29 continue
erjo@8059 30 fi
erjo@8059 31 echo "Apply $patch_file"
slaxemulator@9700 32 patch -p1 < $stuff/$patch_file || return 1
erjo@8059 33 touch done.$patch_file
erjo@8059 34 done <<EOT
erjo@8059 35 owp-${VERSION}.u
erjo@8059 36 EOT
pascal@15603 37 mkdir $DESTDIR
pascal@15603 38 mv * $DESTDIR 2> /dev/null || true
erjo@8059 39 }
erjo@8059 40
erjo@8059 41 # Rules to gen a SliTaz package suitable for Tazpkg.
erjo@8059 42 genpkg_rules()
erjo@8059 43 {
erjo@8059 44 mkdir -p $fs/usr/share \
al@18734 45 $fs/etc
al@18734 46
pascal@15603 47 cp -a $install $fs/usr/share/$PACKAGE
erjo@8059 48 cp -a $fs/usr/share/$PACKAGE/config/owp.conf.sample $fs/etc/owp.conf
pascal@15610 49 cp -a $fs/usr/share/$PACKAGE/utils/hw-daemon/hw-daemon.ini.sample $fs/usr/share/$PACKAGE/utils/hw-daemon/hw-daemon.ini
al@18734 50
erjo@8059 51 # Set secret key
erjo@8059 52 sed -i 's/secret/2918b7aafc1f5f753ee232a7e7f78175/' \
erjo@8059 53 $fs/usr/share/$PACKAGE/utils/hw-daemon/hw-daemon.ini
al@18734 54
erjo@8059 55 # Set program homedir
erjo@8059 56 sed -i 's!/opt!/usr/share!' $fs/etc/owp.conf
al@18734 57
erjo@8059 58 # Fix perms
erjo@8059 59 chmod 755 $fs/usr/share/$PACKAGE/script/owp
al@18734 60
erjo@9424 61 # Cleaning.
erjo@9424 62 rm -f $fs/usr/share/$PACKAGE/done.*.u
erjo@8059 63 }
erjo@8059 64
erjo@8059 65 post_install()
erjo@8059 66 {
erjo@8059 67 chroot "$1/" ln -s /usr/share/$PACKAGE/script/owp /etc/init.d/owp
erjo@8059 68 }
erjo@8059 69
erjo@8059 70 clean_wok()
erjo@8059 71 {
erjo@8059 72 [ -d $PACKAGE ] && rm -rf $PACKAGE
erjo@8059 73 }