wok-6.x view ovz-web-panel/receipt @ rev 9186

Automated merge with http://hg.slitaz.org/wok
author Antoine Bodin <gokhlayeh@slitaz.org>
date Wed Mar 09 05:02:28 2011 +0100 (2011-03-09)
parents 121f9a2a94eb
children fc791f57fde8
line source
1 # SliTaz package receipt.
3 PACKAGE="ovz-web-panel"
4 VERSION="1.7"
5 CATEGORY="network"
6 SHORT_DESC="GUI web-based frontend for OpenVZ"
7 MAINTAINER="erjo@slitaz.org"
8 DEPENDS="ruby sqlite3-ruby"
9 TARBALL="${PACKAGE}-${VERSION}.tgz"
10 WEB_SITE="http://code.google.com/p/ovz-web-panel/"
11 WGET_URL="http://ovz-web-panel.googlecode.com/files/$TARBALL"
14 # Rules to configure and make the package.
15 compile_rules()
16 {
17 cd $src
18 # Apply patches
19 while read patch_file; do
20 if [ -f done.$patch_file ]; then
21 echo "Skipping $patch_file"
22 continue
23 fi
24 echo "Apply $patch_file"
25 patch -p1 < ../stuff/$patch_file || return 1
26 touch done.$patch_file
27 done <<EOT
28 owp-${VERSION}.u
29 EOT
30 mkdir _pkg
31 mv * _pkg 2> /dev/null || true
32 }
34 # Rules to gen a SliTaz package suitable for Tazpkg.
35 genpkg_rules()
36 {
37 mkdir -p $fs/usr/share \
38 $fs/etc
40 cp -a $_pkg $fs/usr/share/$PACKAGE
41 cp -a $fs/usr/share/$PACKAGE/config/owp.conf.sample $fs/etc/owp.conf
42 cp -a $fs/usr/share//$PACKAGE/utils/hw-daemon/hw-daemon.ini.sample $fs/usr/share/$PACKAGE/utils/hw-daemon/hw-daemon.ini
44 # Set secret key
45 sed -i 's/secret/2918b7aafc1f5f753ee232a7e7f78175/' \
46 $fs/usr/share/$PACKAGE/utils/hw-daemon/hw-daemon.ini
48 # Set program homedir
49 sed -i 's!/opt!/usr/share!' $fs/etc/owp.conf
51 # Fix perms
52 chmod 755 $fs/usr/share/$PACKAGE/script/owp
53 }
55 post_install()
56 {
57 echo "Processing post-install commands..."
58 chroot "$1/" ln -s /usr/share/$PACKAGE/script/owp /etc/init.d/owp
59 }
61 clean_wok()
62 {
63 [ -d $PACKAGE ] && rm -rf $PACKAGE
64 }