wok-current annotate linux-cloop/receipt @ rev 17001

linux-cloop: apply patch
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon Aug 11 16:36:05 2014 +0200 (2014-08-11)
parents a306e9a56613
children 88eaf6800bac
rev   line source
pascal@17000 1 # SliTaz package receipt.
pascal@17000 2
pascal@17000 3 PACKAGE="linux-cloop"
pascal@17000 4 SOURCE="cloop"
pascal@17000 5 VERSION="2.639-2"
pascal@17000 6 CATEGORY="base-system"
pascal@17000 7 MAINTAINER="pascal.bellard@slitaz.org"
pascal@17000 8 LICENSE="GPL2"
pascal@17000 9 SHORT_DESC="The read-only compressed loop device kernel module."
pascal@17000 10 WEB_SITE="http://knoppix.net/wiki/Cloop"
pascal@17000 11 TARBALL="${SOURCE}_${VERSION}.tar.gz"
pascal@17000 12 WGET_URL="http://debian-knoppix.alioth.debian.org/packages/$SOURCE/$TARBALL"
pascal@17000 13
pascal@17000 14 DEPENDS="linux"
pascal@17000 15 BUILD_DEPENDS="linux-module-headers xz"
pascal@17000 16 SUGGESTED="cloop-utils"
pascal@17000 17
pascal@17000 18 # Rules to configure and make the package.
pascal@17000 19
pascal@17000 20 compile_rules()
pascal@17000 21 {
pascal@17001 22 patch -p0 < $stuff/cloop.u
pascal@17000 23 make KERNEL_DIR="/usr/src/linux" cloop.ko && xz cloop.ko
pascal@17000 24 }
pascal@17000 25
pascal@17000 26 # Rules to gen a SliTaz package suitable for Tazpkg.
pascal@17000 27 genpkg_rules()
pascal@17000 28 {
pascal@17000 29 EXTRAVERSION=_${kvers%.*}
pascal@17000 30 mkdir -p $fs/lib/modules/$kvers-slitaz/kernel/misc $fs/dev
pascal@17000 31 cp $src/cloop.ko.xz $fs/lib/modules/$kvers-slitaz/kernel/misc
pascal@17000 32 mknod $fs/dev/cloop b 240 0
pascal@17000 33 for i in $(seq 1 7); do
pascal@17000 34 mknod $fs/dev/cloop$i b 240 $i
pascal@17000 35 done
pascal@17000 36 }
pascal@17000 37
pascal@17000 38 post_install()
pascal@17000 39 {
pascal@17000 40 chroot "$1/" depmod -a ${EXTRAVERSION#_}-slitaz
pascal@17000 41 }
pascal@17000 42
pascal@17000 43 post_remove()
pascal@17000 44 {
pascal@17000 45 depmod -a
pascal@17000 46 }