# SliTaz package receipt. PACKAGE="linux64-aufs" SOURCE="aufs" VERSION="20200622" CATEGORY="base-system" SHORT_DESC="aufs3 kernel module" MAINTAINER="godane@slitaz.org" LICENSE="GPL2" WEB_SITE="https://aufs.sf.net/" TARBALL="$SOURCE-$VERSION.tar.bz2" WGET_URL="git|https://github.com/sfjro/aufs4-standalone.git" BRANCH="origin/${PACKAGE}4.19" PROVIDE="aufs:linux64" DEPENDS="linux64" BUILD_DEPENDS="linux64-module-headers git xz" # Use cross toolchain instead uclibc current_version() { wget -O - https://sourceforge.net/p/aufs/aufs4-standalone/ci/${BRANCH#*linux-}/tree/ 2> /dev/null | \ sed '/History/!d;s|.*href="|https://sourceforge.net|;s|".*||' | xargs wget -O - 2> /dev/null | \ sed '/markdown_content/!d;s|

||;s|.* ||;q' } # Rules to configure and make the package. compile_rules() { # Must match kernel version #[ -d fs ] && rm -rf * if [ ! -d fs ]; then kver=$(. $WOK/linux/receipt ; echo $VERSION) git checkout origin/aufs${kver%.*} fi sed -i \ -e 's|CONFIG_AUFS_BRANCH_MAX_127 =.*|CONFIG_AUFS_BRANCH_MAX_127 =|' \ -e 's|#CONFIG_AUFS_BRANCH_MAX_32767 =.*|CONFIG_AUFS_BRANCH_MAX_32767 = y|' \ -e 's|CONFIG_AUFS_HNOTIFY =.*|CONFIG_AUFS_HNOTIFY = y|' \ -e 's|CONFIG_AUFS_HFSNOTIFY =.*|CONFIG_AUFS_HFSNOTIFY = y|' \ -e 's|CONFIG_AUFS_EXPORT =.*|CONFIG_AUFS_EXPORT = y|' \ -e 's|CONFIG_AUFS_SHWH =.*|CONFIG_AUFS_SHWH = y|' \ -e 's|CONFIG_AUFS_BDEV_LOOP =.*|CONFIG_AUFS_BDEV_LOOP = y|' \ -e 's|CONFIG_AUFS_BR_RAMFS =.*|CONFIG_AUFS_BR_RAMFS = y|' \ -e 's|CONFIG_AUFS_INO_T_64 =.*|CONFIG_AUFS_INO_T_64 = y|' \ -e 's|CONFIG_AUFS_DEBUG =.*|CONFIG_AUFS_DEBUG =|' config.mk # The sed fixes are from gentoo portage build. sed -i "s:aufs.ko usr/include/uapi/linux/aufs_type.h:aufs.ko:g" Makefile sed -i "s:aufs.ko usr/include/linux/aufs_type.h:aufs.ko:g" Makefile sed -i "s:__user::g" include/uapi/linux/aufs_type.h sed -i 's/d_u.d_child/d_child/' fs/aufs/dcsub.c fs/aufs/hnotify.c sed -i 's/ d_alias/ d_u.d_alias/' fs/aufs/hnotify.c fs/aufs/export.c # Use cross toolchain x86_64 export PATH=$PATH:/cross/x86_64/tools/bin make ARCH=x86_64 CROSS_COMPILE=x86_64-slitaz-linux- KDIR=/usr/src/linux xz -f fs/aufs/aufs.ko } # Rules to gen a SliTaz package suitable for Tazpkg. genpkg_rules() { EXTRAVERSION=_${kvers} mkdir -p $fs/lib/modules/${kvers}-slitaz64/kernel/fs/aufs \ $install/usr/include/linux install -o root -m 0644 $src/fs/aufs/aufs.ko.xz \ $fs/lib/modules/${kvers}-slitaz64/kernel/fs/aufs/aufs.ko.xz install -o root -m 0644 $src/include/uapi/linux/aufs_type.h \ $install/usr/include/linux/aufs_type.h } # Post install/remove commands for Tazpkg. post_install() { chroot "$1/" depmod -a ${EXTRAVERSION#_}-slitaz64 } post_remove() { chroot "$1/" depmod -a ${EXTRAVERSION#_}-slitaz64 }