wok-next annotate linux-cloop/receipt @ rev 21020

Cleaning is almost finished... I should proceed to upgrades.
author Aleksej Bobylev <al.bobylev@gmail.com>
date Fri Nov 02 14:15:08 2018 +0200 (2018-11-02)
parents df20b2110f7e
children
rev   line source
al@20481 1 # SliTaz package receipt v2.
pascal@17000 2
pascal@17000 3 PACKAGE="linux-cloop"
pascal@20252 4 GITHASH="897009b4b2fe70433a1e8aea8a024aeebc32b209" # 3.4
pascal@20234 5 VERSION="${GITHASH:0:7}"
al@20251 6 EXTRAVERSION="_$kvers"
pascal@17000 7 CATEGORY="base-system"
pascal@17000 8 MAINTAINER="pascal.bellard@slitaz.org"
pascal@17000 9 LICENSE="GPL2"
al@21020 10 SHORT_DESC="The read-only compressed loop device kernel module"
pascal@17000 11 WEB_SITE="http://knoppix.net/wiki/Cloop"
al@20883 12 REPOLOGY="cloop"
al@20481 13
al@20481 14 TARBALL="cloop-$VERSION.zip"
al@20481 15 #WGET_URL="http://debian-knoppix.alioth.debian.org/packages/cloop/$TARBALL"
pascal@20252 16 #WGET_URL="https://github.com/KlausKnopper/cloop/archive/$GITHASH.zip"
pascal@20254 17 WGET_URL="https://github.com/Outernet-Project/cloop/archive/$GITHASH.zip"
pascal@17000 18
pascal@17000 19 BUILD_DEPENDS="linux-module-headers xz"
pascal@17000 20
al@20481 21 compile_rules() {
pascal@20255 22 sed -i 's|dev_t.*|&\n#define uint64_t loff_t|' cloop_suspend.c
pascal@20239 23 make cloop_suspend &&
al@20481 24 make KERNEL_DIR="/usr/src/linux" cloop.ko && xz cloop.ko || return 1
al@20251 25
al@20481 26 mkdir -p \
al@20481 27 $install/lib/modules/$kvers-slitaz/kernel/misc \
al@20481 28 $install/dev \
al@20481 29 $install/usr/bin
al@20481 30 cp $src/cloop_suspend $install/usr/bin
al@20481 31 cp $src/cloop.ko.xz $install/lib/modules/$kvers-slitaz/kernel/misc
pascal@17866 32 for i in $(seq 0 7); do
al@20481 33 mknod $install/dev/cloop$i b 240 $i
pascal@17000 34 done
pascal@17000 35 }
pascal@17000 36
al@20481 37 genpkg_rules() {
al@20481 38 copy @std
al@20481 39 DEPENDS="linux"
al@20481 40 SUGGESTED="cloop-utils"
al@20481 41 }
al@20481 42
al@20481 43 post_install() {
pascal@17000 44 chroot "$1/" depmod -a ${EXTRAVERSION#_}-slitaz
pascal@17000 45 }
pascal@17000 46
al@20481 47 post_remove() {
pascal@17000 48 depmod -a
pascal@17000 49 }