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