wok-current view linux64-aufs/receipt @ rev 25715
Adjust deps between abiword / abiword-plugins
author | Stanislas Leduc <shann@slitaz.org> |
---|---|
date | Fri Jun 14 11:52:43 2024 +0000 (5 months ago) |
parents | b47cbe0fe8c3 |
children |
line source
1 # SliTaz package receipt.
3 PACKAGE="linux64-aufs"
4 SOURCE="aufs"
5 VERSION="20220912"
6 CATEGORY="base-system"
7 SHORT_DESC="aufs5 kernel module"
8 MAINTAINER="godane@slitaz.org"
9 LICENSE="GPL2"
10 WEB_SITE="https://aufs.sf.net/"
11 TARBALL="$SOURCE-$VERSION.tar.bz2"
12 WGET_URL="git|https://github.com/sfjro/aufs-standalone.git"
13 BRANCH="origin/${SOURCE}5.10.140"
14 PROVIDE="linux-aufs:linux64"
16 DEPENDS="linux64"
17 BUILD_DEPENDS="git xz sysfsutils-dev findutils diffutils \
18 libtool kmod bc elfutils-dev openssl-dev"
20 # Use cross toolchain instead uclibc
22 current_version()
23 {
24 wget -O - https://sourceforge.net/p/aufs/aufs4-standalone/ci/${BRANCH#*linux-}/tree/ 2> /dev/null | \
25 sed '/History/!d;s|.*href="|https://sourceforge.net|;s|".*||' | xargs wget -O - 2> /dev/null | \
26 sed '/markdown_content/!d;s|</p>||;s|.* ||;q'
27 }
29 # Rules to configure and make the package.
30 compile_rules()
31 {
32 # Must match kernel version
33 #[ -d fs ] && rm -rf *
35 if [ ! -d fs ]; then
36 kver=$(. $WOK/linux/receipt ; echo $VERSION)
37 git checkout origin/aufs${kver%.*}
38 fi
40 sed -i \
41 -e 's|CONFIG_AUFS_BRANCH_MAX_127 =.*|CONFIG_AUFS_BRANCH_MAX_127 =|' \
42 -e 's|#CONFIG_AUFS_BRANCH_MAX_32767 =.*|CONFIG_AUFS_BRANCH_MAX_32767 = y|' \
43 -e 's|CONFIG_AUFS_HNOTIFY =.*|CONFIG_AUFS_HNOTIFY = y|' \
44 -e 's|CONFIG_AUFS_HFSNOTIFY =.*|CONFIG_AUFS_HFSNOTIFY = y|' \
45 -e 's|CONFIG_AUFS_EXPORT =.*|CONFIG_AUFS_EXPORT = y|' \
46 -e 's|CONFIG_AUFS_SHWH =.*|CONFIG_AUFS_SHWH = y|' \
47 -e 's|CONFIG_AUFS_BDEV_LOOP =.*|CONFIG_AUFS_BDEV_LOOP = y|' \
48 -e 's|CONFIG_AUFS_BR_RAMFS =.*|CONFIG_AUFS_BR_RAMFS = y|' \
49 -e 's|CONFIG_AUFS_INO_T_64 =.*|CONFIG_AUFS_INO_T_64 = y|' \
50 -e 's|CONFIG_AUFS_DEBUG =.*|CONFIG_AUFS_DEBUG =|' config.mk
52 # The sed fixes are from gentoo portage build.
53 sed -i "s:aufs.ko usr/include/uapi/linux/aufs_type.h:aufs.ko:g" Makefile
54 sed -i "s:aufs.ko usr/include/linux/aufs_type.h:aufs.ko:g" Makefile
55 sed -i "s:__user::g" include/uapi/linux/aufs_type.h
57 sed -i 's/d_u.d_child/d_child/' fs/aufs/dcsub.c fs/aufs/hnotify.c
58 sed -i 's/ d_alias/ d_u.d_alias/' fs/aufs/hnotify.c fs/aufs/export.c
61 # Use cross toolchain x86_64
62 export PATH=$PATH:/cross/x86_64/tools/bin
64 # linux64-module-headers seem not enought for aufs build at least for kernel 5.x / aufs5
65 # Use linux kernel source and modules_prepare
66 tar xf $SRC/linux-$kvers.tar.xz
67 cd linux-$kvers
68 patch -p1 < ../aufs5-base.patch
69 patch -p1 < ../aufs5-mmap.patch
70 patch -p1 < ../aufs5-standalone.patch
71 cp $WOK/linux/stuff/linux-slitaz.config64 .config
72 make ARCH=x86_64 CROSS_COMPILE=x86_64-slitaz-linux- modules_prepare
73 cp $WOK/linux/install/linux64/usr/src/linux-$kvers-slitaz64/Module.symvers .
74 cd -
76 make ARCH=x86_64 CROSS_COMPILE=x86_64-slitaz-linux- KDIR=./linux-$kvers
77 xz -f fs/aufs/aufs.ko
78 }
80 # Rules to gen a SliTaz package suitable for Tazpkg.
81 genpkg_rules()
82 {
83 EXTRAVERSION=_${kvers}
84 mkdir -p $fs/lib/modules/${kvers}-slitaz64/kernel/fs/aufs \
85 $install/usr/include/linux
86 install -o root -m 0644 $src/fs/aufs/aufs.ko.xz \
87 $fs/lib/modules/${kvers}-slitaz64/kernel/fs/aufs/aufs.ko.xz
88 install -o root -m 0644 $src/include/uapi/linux/aufs_type.h \
89 $install/usr/include/linux/aufs_type.h
90 }
92 # Post install/remove commands for Tazpkg.
93 post_install()
94 {
95 chroot "$1/" depmod -a ${EXTRAVERSION#_}-slitaz64
96 }
98 post_remove()
99 {
100 chroot "$1/" depmod -a ${EXTRAVERSION#_}-slitaz64
101 }