wok-next annotate linux-cloop/receipt @ rev 20255
Up linux-cloop (4.12) again
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Tue Nov 07 14:55:55 2017 +0100 (2017-11-07) |
parents | 7dbe630f6bf9 |
children | b278b2018965 |
rev | line source |
---|---|
pascal@17000 | 1 # SliTaz package receipt. |
pascal@17000 | 2 |
pascal@17000 | 3 PACKAGE="linux-cloop" |
pascal@17000 | 4 SOURCE="cloop" |
pascal@20252 | 5 GITHASH="897009b4b2fe70433a1e8aea8a024aeebc32b209" # 3.4 |
pascal@20234 | 6 VERSION="${GITHASH:0:7}" |
al@20251 | 7 EXTRAVERSION="_$kvers" |
pascal@17000 | 8 CATEGORY="base-system" |
pascal@17000 | 9 MAINTAINER="pascal.bellard@slitaz.org" |
pascal@17000 | 10 LICENSE="GPL2" |
pascal@17000 | 11 SHORT_DESC="The read-only compressed loop device kernel module." |
pascal@17000 | 12 WEB_SITE="http://knoppix.net/wiki/Cloop" |
pascal@20234 | 13 TARBALL="$SOURCE-$VERSION.zip" |
pascal@20252 | 14 #WGET_URL="http://debian-knoppix.alioth.debian.org/packages/$SOURCE/$TARBALL" |
pascal@20252 | 15 #WGET_URL="https://github.com/KlausKnopper/cloop/archive/$GITHASH.zip" |
pascal@20254 | 16 WGET_URL="https://github.com/Outernet-Project/cloop/archive/$GITHASH.zip" |
pascal@17000 | 17 |
pascal@17000 | 18 DEPENDS="linux" |
pascal@17000 | 19 BUILD_DEPENDS="linux-module-headers xz" |
pascal@17000 | 20 SUGGESTED="cloop-utils" |
pascal@17000 | 21 |
pascal@17000 | 22 # Rules to configure and make the package. |
pascal@17000 | 23 |
pascal@17000 | 24 compile_rules() |
pascal@17000 | 25 { |
pascal@20255 | 26 sed -i 's|dev_t.*|&\n#define uint64_t loff_t|' cloop_suspend.c |
pascal@20239 | 27 make cloop_suspend && |
pascal@17000 | 28 make KERNEL_DIR="/usr/src/linux" cloop.ko && xz cloop.ko |
pascal@17000 | 29 } |
al@20251 | 30 |
pascal@17000 | 31 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@17000 | 32 genpkg_rules() |
al@20251 | 33 { |
pascal@17002 | 34 mkdir -p $fs/lib/modules/$kvers-slitaz/kernel/misc $fs/dev $fs/usr/bin |
pascal@17002 | 35 cp $src/cloop_suspend $fs/usr/bin |
pascal@17000 | 36 cp $src/cloop.ko.xz $fs/lib/modules/$kvers-slitaz/kernel/misc |
pascal@17866 | 37 for i in $(seq 0 7); do |
pascal@17000 | 38 mknod $fs/dev/cloop$i b 240 $i |
pascal@17000 | 39 done |
pascal@17000 | 40 } |
pascal@17000 | 41 |
pascal@17000 | 42 post_install() |
pascal@17000 | 43 { |
pascal@17000 | 44 chroot "$1/" depmod -a ${EXTRAVERSION#_}-slitaz |
pascal@17000 | 45 } |
pascal@17000 | 46 |
pascal@17000 | 47 post_remove() |
pascal@17000 | 48 { |
pascal@17000 | 49 depmod -a |
pascal@17000 | 50 } |