# SliTaz package receipt. PACKAGE="linux-libre-api-headers" VERSION="3.18.129-gnu" CATEGORY="development" SHORT_DESC="Kernel headers sanitized for use in userspace." MAINTAINER="gokhlayeh@slitaz.org" LICENSE="GPL2" PROVIDE="linux-api-headers" SOURCE="linux-libre" TARBALL="$SOURCE-$VERSION.vcdiff" WEB_SITE="http://www.fsfla.org/svnwiki/selibre/linux-libre/" WGET_URL="http://linux-libre.fsfla.org/pub/linux-libre/releases/old/gen6/$VERSION/$TARBALL" EXTRA_SOURCE_FILES="https://mirrors.edge.kernel.org/pub/linux/kernel/v${VERSION%%.*}.x/linux-${VERSION%-gnu}.tar.xz" BUILD_DEPENDS="xdelta" # What is the latest version available today? current_version() { wget -O - http://linux-libre.fsfla.org/pub/linux-libre/releases/ 2> /dev/null | \ sed '/-gnu/!d;s|.*ref="||;s|/".*||' | sed '$!d' } # Common rules for cook_tmp_toolchain & compile_rules build_rules() { [ -s "$SOURCES_REPOSITORY/$(basename $EXTRA_SOURCE_FILES)" ] || busybox wget -P "$SOURCES_REPOSITORY/" "$EXTRA_SOURCE_FILES" xzcat < $SOURCES_REPOSITORY//$(basename $EXTRA_SOURCE_FILES) > $(basename $EXTRA_SOURCE_FILES .xz) xdelta3 -d $TARBALL tar xf ${TARBALL/vcdiff/tar} mv linux-*/* . make mrproper && make headers_check } # Rules to compile & install the temporary toolchain. cook_tmp_toolchain() { build_rules && make INSTALL_HDR_PATH=dest headers_install && cp -r dest/include/* /tools/include } # Rules to configure and make the package. compile_rules() { build_rules && make INSTALL_HDR_PATH=$DESTDIR/usr headers_install } # Rules to gen a SliTaz package suitable for Tazpkg. genpkg_rules() { mkdir -p $fs/usr cp -a $install/usr/include $fs/usr rm -f $(find ${fs} -name .install -or -name ..install.cmd) } # Post install commands for Tazpkg. post_install() { # Removed old linux-libre-headers [ ! -d "$1/var/lib/tazpkg/installed/linux-libre-headers" ] || rm -rf "$1/var/lib/tazpkg/installed/linux-libre-headers" }