wok view cookutils/receipt @ rev 24119

Add javascript-boulderdash
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon Oct 04 18:07:23 2021 +0000 (2021-10-04)
parents 68cf96abc146
children 7d48eab9ceeb
line source
1 # SliTaz package receipt.
3 PACKAGE="cookutils"
4 VERSION="887"
5 CATEGORY="base-system"
6 SHORT_DESC="SliTaz packages builder new generation."
7 MAINTAINER="pankso@slitaz.org"
8 LICENSE="GPL3"
9 WEB_SITE="http://www.slitaz.org/"
10 TARBALL="$PACKAGE-$VERSION.tar.gz"
11 WGET_URL="http://hg.slitaz.org/$PACKAGE/archive/$VERSION.tar.gz"
12 TAGS="slitaz"
13 HOST_ARCH="i486 arm"
14 CONFIG_FILES="/etc/slitaz/cook.site /etc/slitaz/cook.conf"
16 DEPENDS="sdft"
17 SPLIT="cookutils-daemon"
19 current_version()
20 {
21 wget -O - http://hg.slitaz.org/$PACKAGE/ 2>/dev/null | \
22 sed '/^Changeset/!d;s|.*">|http://hg.slitaz.org/'$PACKAGE'/rev/|;s|<.*||' | \
23 xargs wget -O - 2>/dev/null | sed '/rev /!d;s|.*rev ||;s| .*||'
24 }
26 # Rules to configure and make the package.
27 compile_rules()
28 {
29 sed -i 's|\. receipt|. ./receipt|' cook
30 sed -i 's,grep -q ^aufs /proc/modules,grep "^nodev.aufs\$" /proc/filesystems,' cook
31 patch -p1 -i $stuff/pkgdb-absolute.patch
32 patch -p1 -i $stuff/pkgdb-no-parallel.patch
33 patch -p1 -i $stuff/cook-newest.patch
34 patch -p1 -i $stuff/wanted-version.patch
35 sed -i 's|preinit core-4in1|preinit core-4in1 core-5in1|' cookiso
36 mkdir -p $DESTDIR/usr/bin $DESTDIR/etc/slitaz
37 make DESTDIR=$DESTDIR install
38 sed -i 's|://mirror.switch.ch/ftp/mirror|s://ftp.gnu.org|' $DESTDIR/etc/slitaz/cook.conf
39 }
41 # Rules to gen a SliTaz package suitable for Tazpkg.
42 genpkg_rules()
43 {
44 mkdir -p $fs
45 cp $stuff/cookutils-doc.desktop $install/usr/share/applications
46 cp -a $install/* $fs
47 cp $stuff/check-wok $fs/usr/bin
48 chmod 755 $fs/usr/bin/check-wok
49 #Symlink cooker to busybox httpd server root
50 cd $fs/var/www
51 ln -s cgi-bin/cooker
52 # Daemon goes in cookutils-daemon
53 rm -rf $fs/etc/init.d
54 }
56 # Pre and post install commands for Tazpkg.
57 pre_install()
58 {
59 cp $1/etc/slitaz/cook.conf $1/etc/slitaz/cook.conf.old 2> /dev/null
60 }
62 post_install()
63 {
64 MD5="$(sed '/^SETUP_MD5/!d;s|.*="\(.*\)".*|\1|' \
65 $1/etc/slitaz/cook.conf.old 2> /dev/null)"
66 sed -i "s|^SETUP_MD5=\"\"|SETUP_MD5=\"$MD5\"|" $1/etc/slitaz/cook.conf
67 [ -z "$MD5" ] && case "$(cat "$1/etc/hostname" 2> /dev/null)" in
68 tank*)
69 if ! chroot "$1/" tazpkg list | grep -q aufs ; then
70 tazpkg get-install aufs --root="$1/"
71 sed -i 's/LOAD_MODULES="/&aufs /' "$1/etc/rcS.conf"
72 fi ;;
73 esac
74 }