wok-current annotate kmod/receipt @ rev 24084
libjson-c-dev: fix version
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sat Jul 10 13:06:31 2021 +0000 (2021-07-10) |
parents | ef1efd2c8811 |
children | 5926178cd6fa |
rev | line source |
---|---|
pankso@12484 | 1 # SliTaz package receipt. |
pankso@12484 | 2 |
pankso@12484 | 3 PACKAGE="kmod" |
pascal@19603 | 4 VERSION="23" |
pankso@12484 | 5 CATEGORY="base-system" |
pascal@13336 | 6 SHORT_DESC="Linux kernel modules tools." |
pankso@12484 | 7 MAINTAINER="pankso@slitaz.org" |
pascal@15001 | 8 LICENSE="GPL2" |
pankso@12484 | 9 TARBALL="$PACKAGE-$VERSION.tar.xz" |
pascal@17923 | 10 WEB_SITE="https://www.kernel.org/pub/linux/utils/kernel/kmod/" |
pascal@17923 | 11 WGET_URL="$WEB_SITE$TARBALL" |
pascal@19640 | 12 PROVIDE="modules-init-tools depmod" |
pankso@16067 | 13 HOST_ARCH="i486 arm" |
pankso@12484 | 14 |
pankso@12531 | 15 DEPENDS="zlib liblzma" |
pascal@17923 | 16 BUILD_DEPENDS="wget zlib-dev liblzma-dev tar" |
pankso@12484 | 17 |
pankso@16067 | 18 # Handle cross compilation. ARM use build host: tar |
pankso@16067 | 19 case "$ARCH" in |
pascal@17923 | 20 arm) BUILD_DEPENDS="wget zlib-dev liblzma-dev" ;; |
pankso@16067 | 21 esac |
pankso@16067 | 22 |
pascal@24068 | 23 current_version() |
pascal@24068 | 24 { |
pascal@24068 | 25 wget -O - $WEB_SITE 2>/dev/null | \ |
pascal@24069 | 26 sed '/tar.xz/!d;s|.*>kmod-||;s|.tar.*||' | sort -n -r | sed q |
pascal@24068 | 27 } |
pascal@24068 | 28 |
pankso@12484 | 29 # Rules to configure and make the package. |
pankso@12484 | 30 compile_rules() |
pankso@12484 | 31 { |
pascal@19605 | 32 # link dynamically with libkmod |
pascal@19606 | 33 sed -i 's|\(.libkmod/libkmod\)-internal\.la|\1.la|' Makefile* |
pascal@19605 | 34 |
pascal@19603 | 35 # Add lzma support |
pascal@19603 | 36 sed -i -e 's/stream_decoder/auto_decoder/' \ |
pascal@19603 | 37 -e 's/.*c_xz\[.*/&\nstatic const char magic_lz[] = {0x5d, 0};/' \ |
pascal@19603 | 38 -e 's/.*c_xz,.*/&\n\t{sizeof(magic_lz), magic_lz, {load_xz, unload_xz}},/' \ |
pascal@19603 | 39 libkmod/libkmod-file.c |
pankso@12484 | 40 ./configure \ |
pankso@12531 | 41 --bindir=/sbin \ |
erjo@15800 | 42 --with-rootlibdir=/lib \ |
pankso@12484 | 43 --sysconfdir=/etc \ |
pankso@12484 | 44 --with-zlib \ |
pankso@12531 | 45 --with-xz \ |
pankso@13605 | 46 --disable-manpages \ |
pankso@12531 | 47 $CONFIGURE_ARGS && |
pankso@12531 | 48 make && make pkgconfigdir=/usr/lib/pkgconfig install |
pankso@12484 | 49 } |
pankso@12484 | 50 |
pankso@12484 | 51 # Rules to gen a SliTaz package suitable for Tazpkg. |
pankso@12484 | 52 genpkg_rules() |
pankso@12484 | 53 { |
pascal@19604 | 54 mkdir -p $fs/lib $fs/bin $fs/usr/lib $install/usr/share/man |
pankso@16067 | 55 cp -a $install/sbin $fs |
pankso@12531 | 56 cp -a $install/lib/*.so* $fs/lib |
pankso@16067 | 57 cp -a $install/usr/lib/*.so* $fs/usr/lib |
pankso@16067 | 58 |
pankso@12531 | 59 cd $fs/sbin |
pankso@12531 | 60 # The kmod tools symlinks |
pankso@12531 | 61 for tool in rmmod insmod modinfo modprobe depmod |
pankso@12531 | 62 do |
pankso@12531 | 63 ln -s kmod $tool |
pankso@12531 | 64 done |
pascal@12703 | 65 cd ../bin && ln -s ../sbin/kmod lsmod |
pascal@19604 | 66 cp $src/man/*.? $install/usr/share/man |
pankso@12484 | 67 } |