wok-6.x view cookutils/receipt @ rev 25459
cookutils: rework umount_aufs()
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Tue Sep 27 16:54:01 2022 +0000 (22 months ago) |
parents | 7d48eab9ceeb |
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 sed -i 's|preinit core-4in1|preinit core-4in1 core-5in1|' cookiso
39 mkdir -p $DESTDIR/usr/bin $DESTDIR/etc/slitaz
40 make DESTDIR=$DESTDIR install
41 sed -i 's|://mirror.switch.ch/ftp/mirror|s://ftp.gnu.org|' $DESTDIR/etc/slitaz/cook.conf
42 }
44 # Rules to gen a SliTaz package suitable for Tazpkg.
45 genpkg_rules()
46 {
47 mkdir -p $fs
48 cp $stuff/cookutils-doc.desktop $install/usr/share/applications
49 cp -a $install/* $fs
50 cp $stuff/check-wok $fs/usr/bin
51 chmod 755 $fs/usr/bin/check-wok
52 #Symlink cooker to busybox httpd server root
53 cd $fs/var/www
54 ln -s cgi-bin/cooker
55 # Daemon goes in cookutils-daemon
56 rm -rf $fs/etc/init.d
57 }
59 # Pre and post install commands for Tazpkg.
60 pre_install()
61 {
62 cp $1/etc/slitaz/cook.conf $1/etc/slitaz/cook.conf.old 2> /dev/null
63 }
65 post_install()
66 {
67 MD5="$(sed '/^SETUP_MD5/!d;s|.*="\(.*\)".*|\1|' \
68 $1/etc/slitaz/cook.conf.old 2> /dev/null)"
69 sed -i "s|^SETUP_MD5=\"\"|SETUP_MD5=\"$MD5\"|" $1/etc/slitaz/cook.conf
70 [ -z "$MD5" ] && case "$(cat "$1/etc/hostname" 2> /dev/null)" in
71 tank*)
72 if ! chroot "$1/" tazpkg list | grep -q aufs ; then
73 tazpkg get-install aufs --root="$1/"
74 sed -i 's/LOAD_MODULES="/&aufs /' "$1/etc/rcS.conf"
75 fi ;;
76 esac
77 }