wok-current view cookutils/receipt @ rev 25685

Add checkspace / fetchall feature for tazpkg
author Stanislas Leduc <shann@slitaz.org>
date Thu Mar 14 20:28:39 2024 +0000 (8 months ago)
parents 715a7620dc23
children
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 patch -p1 -i $stuff/avoid-gawk-warning.patch
36 patch -p1 -i $stuff/avoid-hard-link-exist-error.patch
37 patch -p1 -i $stuff/rework-umount_aufs.patch
38 patch -p1 -i $stuff/current-version.patch
39 sed -i 's|preinit core-4in1|preinit core-4in1 core-5in1|' cookiso
40 mkdir -p $DESTDIR/usr/bin $DESTDIR/etc/slitaz
41 make DESTDIR=$DESTDIR install
42 sed -i 's|://mirror.switch.ch/ftp/mirror|s://ftp.gnu.org|' $DESTDIR/etc/slitaz/cook.conf
43 }
45 # Rules to gen a SliTaz package suitable for Tazpkg.
46 genpkg_rules()
47 {
48 mkdir -p $fs
49 cp $stuff/cookutils-doc.desktop $install/usr/share/applications
50 cp -a $install/* $fs
51 cp $stuff/check-wok $fs/usr/bin
52 chmod 755 $fs/usr/bin/check-wok
53 #Symlink cooker to busybox httpd server root
54 cd $fs/var/www
55 ln -s cgi-bin/cooker
56 # Daemon goes in cookutils-daemon
57 rm -rf $fs/etc/init.d
58 }
60 # Pre and post install commands for Tazpkg.
61 pre_install()
62 {
63 cp $1/etc/slitaz/cook.conf $1/etc/slitaz/cook.conf.old 2> /dev/null
64 }
66 post_install()
67 {
68 MD5="$(sed '/^SETUP_MD5/!d;s|.*="\(.*\)".*|\1|' \
69 $1/etc/slitaz/cook.conf.old 2> /dev/null)"
70 sed -i "s|^SETUP_MD5=\"\"|SETUP_MD5=\"$MD5\"|" $1/etc/slitaz/cook.conf
71 [ -z "$MD5" ] && case "$(cat "$1/etc/hostname" 2> /dev/null)" in
72 tank*)
73 if ! chroot "$1/" tazpkg list | grep -q aufs ; then
74 tazpkg get-install aufs --root="$1/"
75 sed -i 's/LOAD_MODULES="/&aufs /' "$1/etc/rcS.conf"
76 fi ;;
77 esac
78 }