SliTaz Packages

Community Doc Forum Pro Shop Bugs Hg
.

Receipt for package "linux64-wireguard"

# SliTaz package receipt.

PACKAGE="linux64-wireguard"
VERSION="1.0.20220627"
CATEGORY="base-system"
MAINTAINER="pascal.bellard@slitaz.org"
LICENSE="GPL2"
SHORT_DESC="The Wireguard VPN kernel module."
WEB_SITE="https://www.wireguard.com/"
SOURCE="wireguard-linux-compat"
TARBALL="$SOURCE-$VERSION.tar.xz"
WGET_URL="https://git.zx2c4.com/$SOURCE/snapshot/$TARBALL"

DEPENDS="linux64"
BUILD_DEPENDS="linux64-module-headers xz"
SUGGESTED="wireguard-tools"

# Use cross toolchain instead uclibc

# What is the latest version available today?
current_version()
{
    wget -O - https://git.zx2c4.com/wireguard-linux-compat/ 2>/dev/null | \
    sed '/tag\/.h=/!d;s|.*h=v||;s|.>.*||;q'
}

# Rules to configure and make the package.
compile_rules()
{
    cd src
    sed -i '/Wframe-larger-than=2048/d' Kbuild
    patch -p0 < $stuff/socket.u

        # Use cross toolchain x86_64
        export PATH=$PATH:/cross/x86_64/tools/bin

    make -k ARCH=x86_64 CROSS_COMPILE=x86_64-slitaz-linux- \
        KERNELDIR="/usr/src/linux" && xz wireguard.ko
}
    
# Rules to gen a SliTaz package suitable for Tazpkg.
genpkg_rules()
{    
    EXTRAVERSION=_$kvers
    mkdir -p $fs/lib/modules/$kvers-slitaz64/kernel/misc
    cp $src/src/wireguard.ko.xz $fs/lib/modules/$kvers-slitaz64/kernel/misc
}

post_install()
{
    chroot "$1/" depmod -a ${EXTRAVERSION#_}-slitaz64
}

post_remove()
{
    depmod -a
}
6025 packages and 203154 files in current database (Thu Apr 25 06:17:47 2024)