wok-current annotate cookutils/receipt @ rev 23766
qemu/cloop: tiny fix
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Wed May 06 19:55:46 2020 +0000 (2020-05-06) |
parents | cac55d0adf9e |
children | 727610a9d454 |
rev | line source |
---|---|
pankso@9812 | 1 # SliTaz package receipt. |
pankso@9812 | 2 |
pankso@9812 | 3 PACKAGE="cookutils" |
al@19823 | 4 VERSION="887" |
pankso@9812 | 5 CATEGORY="base-system" |
pankso@9812 | 6 SHORT_DESC="SliTaz packages builder new generation." |
pankso@9812 | 7 MAINTAINER="pankso@slitaz.org" |
pascal@15022 | 8 LICENSE="GPL3" |
al@19252 | 9 WEB_SITE="http://www.slitaz.org/" |
pankso@9812 | 10 TARBALL="$PACKAGE-$VERSION.tar.gz" |
pascal@13892 | 11 WGET_URL="http://hg.slitaz.org/$PACKAGE/archive/$VERSION.tar.gz" |
pankso@9812 | 12 TAGS="slitaz" |
pankso@12778 | 13 HOST_ARCH="i486 arm" |
pascal@19787 | 14 CONFIG_FILES="/etc/slitaz/cook.site /etc/slitaz/cook.conf" |
pankso@9812 | 15 |
al@18550 | 16 DEPENDS="sdft" |
al@19252 | 17 SPLIT="cookutils-daemon" |
pascal@14173 | 18 |
pankso@9812 | 19 # Rules to configure and make the package. |
pankso@9812 | 20 compile_rules() |
pankso@9812 | 21 { |
pascal@20655 | 22 sed -i 's|\. receipt|. ./receipt|' cook |
al@20666 | 23 patch -p1 -i $stuff/pkgdb-absolute.patch |
al@20667 | 24 patch -p1 -i $stuff/pkgdb-no-parallel.patch |
pascal@21780 | 25 patch -p1 -i $stuff/cook-newest.patch |
pascal@23649 | 26 patch -p1 -i $stuff/wanted-version.patch |
pascal@21793 | 27 sed -i 's|preinit core-4in1|preinit core-4in1 core-5in1|' cookiso |
pankso@9812 | 28 mkdir -p $DESTDIR/usr/bin $DESTDIR/etc/slitaz |
pankso@9812 | 29 make DESTDIR=$DESTDIR install |
pascal@22678 | 30 sed -i 's|://mirror.switch.ch/ftp/mirror|s://ftp.gnu.org|' $DESTDIR/etc/slitaz/cook.conf |
pankso@9812 | 31 } |
pankso@9812 | 32 |
pankso@9812 | 33 # Rules to gen a SliTaz package suitable for Tazpkg. |
pankso@9812 | 34 genpkg_rules() |
pankso@9812 | 35 { |
pankso@9812 | 36 mkdir -p $fs |
pankso@9812 | 37 cp -a $install/* $fs |
pascal@22986 | 38 cp $stuff/check-wok $fs/usr/bin |
pascal@22986 | 39 chmod 755 $fs/usr/bin/check-wok |
mojo@13856 | 40 #Symlink cooker to busybox httpd server root |
mojo@13856 | 41 cd $fs/var/www |
mojo@13856 | 42 ln -s cgi-bin/cooker |
al@19161 | 43 # Daemon goes in cookutils-daemon |
pankso@9826 | 44 rm -rf $fs/etc/init.d |
pankso@9812 | 45 } |
pascal@12966 | 46 |
pascal@12966 | 47 # Pre and post install commands for Tazpkg. |
pascal@22678 | 48 pre_install() |
pascal@22678 | 49 { |
pascal@22678 | 50 cp $1/etc/slitaz/cook.conf $1/etc/slitaz/cook.conf.old 2> /dev/null |
pascal@22678 | 51 } |
pascal@22678 | 52 |
pascal@12966 | 53 post_install() |
pascal@12966 | 54 { |
pascal@22678 | 55 MD5="$(sed '/^SETUP_MD5/!d;s|.*="\(.*\)".*|\1|' \ |
pascal@22678 | 56 $1/etc/slitaz/cook.conf.old)" |
pascal@22678 | 57 sed -i "s|^SETUP_MD5=\"\"|SETUP_MD5=\"$MD5\"|" $1/etc/slitaz/cook.conf |
pascal@22678 | 58 [ -z "$MD5" ] && case "$(cat "$1/etc/hostname" 2> /dev/null)" in |
pascal@12966 | 59 tank*) |
pascal@18730 | 60 if ! chroot "$1/" tazpkg list | grep -q aufs ; then |
pascal@18730 | 61 tazpkg get-install aufs --root="$1/" |
pascal@18730 | 62 sed -i 's/LOAD_MODULES="/&aufs /' "$1/etc/rcS.conf" |
pascal@12966 | 63 fi ;; |
pascal@12966 | 64 esac |
pascal@12966 | 65 } |