# HG changeset patch # User Aleksej Bobylev # Date 1482359133 -7200 # Node ID a6984f0827942cb4bb7853fd5a4092c6df0e0863 # Parent 96871f3890f0d046e52860c5fbb9a69ff6bf811d Up linux-api-headers (4.9) diff -r 96871f3890f0 -r a6984f082794 linux-api-headers/receipt --- a/linux-api-headers/receipt Wed Dec 21 23:21:13 2016 +0200 +++ b/linux-api-headers/receipt Thu Dec 22 00:25:33 2016 +0200 @@ -1,8 +1,8 @@ # SliTaz package receipt. PACKAGE="linux-api-headers" -VERSION="4.7.2" -#KBASEVER="${VERSION:0:3}" +VERSION="4.9" +KBASEVER="$(echo $VERSION | cut -d. -f1,2)" CATEGORY="development" SHORT_DESC="Kernel headers sanitized for use in userspace." MAINTAINER="devel@slitaz.org" @@ -10,37 +10,26 @@ SOURCE="linux" WEB_SITE="https://www.kernel.org/" -TARBALL="$SOURCE-$VERSION.tar.xz" +TARBALL="$SOURCE-$KBASEVER.tar.xz" WGET_URL="https://www.kernel.org/pub/linux/kernel/v4.x/$TARBALL" PROVIDE="linux-headers linux64-api-headers linux64-headers" -BUILD_DEPENDS="bash libtinfo" +BUILD_DEPENDS="bash libtinfo perl" -#[ "$KBASEVER" != "$VERSION" ] && -#PATCH="$(dirname $WGET_URL)/patch-$VERSION.xz" && -#EXTRA_SOURCE_FILES="$(basename $PATCH)" - -# Rules to compile & install the temporary toolchain. -cook_tmp_toolchain() -{ - cd $src - make mrproper && - make headers_check && - make INSTALL_HDR_PATH=dest headers_install && - cp -r dest/include/* /tools/include -} +if [ "$KBASEVER" != "$VERSION" ]; then + PATCH="$(dirname $WGET_URL)/patch-$VERSION.xz" + EXTRA_SOURCE_FILES="$(basename $PATCH)" +fi # Rules to configure and make the package. compile_rules() { -# cd $src -# -# if [ "$KBASEVER" != "$VERSION" ]; then -# [ -s $SRC/$(basename $PATCH) ] || -# wget --no-check-certificate $PATCH -O $SRC/$(basename $PATCH) -# xzcat $SRC/$(basename $PATCH) | patch -Np1 -# touch done.patch-$VERSION -# fi + if [ "$KBASEVER" != "$VERSION" ]; then + [ -s $SRC/$(basename $PATCH) ] || + wget --no-check-certificate $PATCH -O $SRC/$(basename $PATCH) + xzcat $SRC/$(basename $PATCH) | patch -Np1 + touch done.patch-$VERSION + fi make mrproper && make headers_check && @@ -52,12 +41,5 @@ { mkdir -p $fs/usr cp -a $install/usr/include $fs/usr - rm -f $(find ${fs} -name .install -or -name ..install.cmd) + rm -f $(find $fs -name .install -or -name ..install.cmd) } - -# Post install commands for Tazpkg. -post_install() -{ - # Removed old linux-headers - rm -rf ${1}${INSTALLED}/linux-headers 2>/dev/null -}