wok-next annotate ovz-web-panel/receipt @ rev 8060

Add: sqlite3-ruby
author Eric Joseph-Alexandre <erjo@slitaz.org>
date Fri Jan 21 01:07:16 2011 +0100 (2011-01-21)
parents
children 0b4cf0d9e1b5
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"
erjo@8059 5 CATEGORY="networking"
erjo@8059 6 SHORT_DESC="GUI web-based frontend for OpenVZ"
erjo@8059 7 MAINTAINER="erjo@slitaz.org"
erjo@8059 8 DEPENDS="ruby rubygems sqlite3-ruby"
erjo@8059 9 TARBALL="${PACKAGE}-${VERSION}.tgz"
erjo@8059 10 WEB_SITE="http://code.google.com/p/ovz-web-panel/"
erjo@8059 11 WGET_URL="http://ovz-web-panel.googlecode.com/files/$TARBALL"
erjo@8059 12
erjo@8059 13
erjo@8059 14 # Rules to configure and make the package.
erjo@8059 15 compile_rules()
erjo@8059 16 {
erjo@8059 17 cd $PACKAGE
erjo@8059 18 # Apply patches
erjo@8059 19 while read patch_file; do
erjo@8059 20 if [ -f done.$patch_file ]; then
erjo@8059 21 echo "Skipping $patch_file"
erjo@8059 22 continue
erjo@8059 23 fi
erjo@8059 24 echo "Apply $patch_file"
erjo@8059 25 patch -p1 < ../stuff/$patch_file || exit 1
erjo@8059 26 touch done.$patch_file
erjo@8059 27 done <<EOT
erjo@8059 28 owp-${VERSION}.u
erjo@8059 29 EOT
erjo@8059 30
erjo@8059 31 }
erjo@8059 32
erjo@8059 33 # Rules to gen a SliTaz package suitable for Tazpkg.
erjo@8059 34 genpkg_rules()
erjo@8059 35 {
erjo@8059 36 mkdir -p $fs/usr/share \
erjo@8059 37 $fs/etc
erjo@8059 38
erjo@8059 39 cp -a $PACKAGE $fs/usr/share
erjo@8059 40 cp -a $fs/usr/share/$PACKAGE/config/owp.conf.sample $fs/etc/owp.conf
erjo@8059 41 cp -a $fs/usr/share//$PACKAGE/utils/hw-daemon/hw-daemon.ini.sample $fs/usr/share/$PACKAGE/utils/hw-daemon/hw-daemon.ini
erjo@8059 42
erjo@8059 43 # Set secret key
erjo@8059 44 sed -i 's/secret/2918b7aafc1f5f753ee232a7e7f78175/' \
erjo@8059 45 $fs/usr/share/$PACKAGE/utils/hw-daemon/hw-daemon.ini
erjo@8059 46
erjo@8059 47 # Set program homedir
erjo@8059 48 sed -i 's!/opt!/usr/share!' $fs/etc/owp.conf
erjo@8059 49
erjo@8059 50 # Fix perms
erjo@8059 51 chmod 755 $fs/usr/share/$PACKAGE/script/owp
erjo@8059 52 }
erjo@8059 53
erjo@8059 54 post_install()
erjo@8059 55 {
erjo@8059 56 echo "Processing post-install commands..."
erjo@8059 57 chroot "$1/" ln -s /usr/share/$PACKAGE/script/owp /etc/init.d/owp
erjo@8059 58 }
erjo@8059 59
erjo@8059 60 clean_wok()
erjo@8059 61 {
erjo@8059 62 [ -d $PACKAGE ] && rm -rf $PACKAGE
erjo@8059 63 }