wok-next annotate linux-dev/receipt @ rev 20496
Packages with tag "Xfce": fix (b)deps
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Wed Mar 14 17:14:32 2018 +0200 (2018-03-14) |
parents | 60e87d3e45c7 |
children | d5aab818505e |
rev | line source |
---|---|
pascal@20322 | 1 # SliTaz package receipt v2. |
al@19595 | 2 |
al@19595 | 3 PACKAGE="linux-dev" |
al@20436 | 4 VERSION="$(. $WOK/linux/receipt; echo $VERSION)" |
al@20436 | 5 KBASEVER="$(. $WOK/linux/receipt; echo $KBASEVER)" |
al@19595 | 6 CATEGORY="development" |
al@20326 | 7 SHORT_DESC="The Linux Kernel" |
al@19595 | 8 MAINTAINER="devel@slitaz.org" |
al@19595 | 9 LICENSE="GPL2" |
al@19595 | 10 WEB_SITE="https://www.kernel.org/" |
al@20436 | 11 LFS="http://www.linuxfromscratch.org/lfs/view/stable/chapter06/linux-headers.html" |
al@19595 | 12 |
al@19595 | 13 TARBALL="linux-$KBASEVER.tar.xz" |
al@19595 | 14 WGET_URL="https://www.kernel.org/pub/linux/kernel/v4.x/$TARBALL" |
al@19595 | 15 |
al@20442 | 16 BUILD_DEPENDS="perl patch ncurses-dev" |
al@20442 | 17 SPLIT="linux-dev linux-api-headers" # linux-uml |
pascal@20322 | 18 SIBLINGS="linux" |
al@20436 | 19 COOKOPTS="!pngz !svgz !uiz !strip" |
al@19595 | 20 |
al@19595 | 21 if [ "$KBASEVER" != "${VERSION%.0}" ]; then |
al@19595 | 22 PATCH="$(dirname $WGET_URL)/patch-$VERSION.xz" |
al@19595 | 23 EXTRA_SOURCE_FILES="$(basename $PATCH)" |
al@19595 | 24 fi |
al@19595 | 25 |
al@20436 | 26 compile_rules() { |
al@20436 | 27 # Update sources to the $VERSION using base sources ($KBASEVER) and patches |
al@19595 | 28 if [ "$KBASEVER" != "${VERSION%.0}" ]; then |
al@19595 | 29 [ -s $SRC/$(basename $PATCH) ] || wget $PATCH -O $SRC/$(basename $PATCH) |
al@19595 | 30 # don't patch twice for `cook $PACKAGE --continue` |
al@19595 | 31 if [ ! -f "done.patch-$VERSION" ]; then |
al@19595 | 32 xzcat $SRC/$(basename $PATCH) | patch -Np1 |
al@19595 | 33 touch done.patch-$VERSION |
al@19595 | 34 fi |
al@19595 | 35 fi |
al@19595 | 36 |
al@20442 | 37 case $ARCH in |
al@20442 | 38 i?86) Arch='i386';; # i486 for system -> i386 for kernel |
al@20442 | 39 *) Arch="$ARCH";; |
al@20442 | 40 esac |
al@20442 | 41 |
pascal@20323 | 42 make mrproper && |
pascal@20323 | 43 make headers_check && |
pascal@20323 | 44 make INSTALL_HDR_PATH=$DESTDIR/usr headers_install |
pascal@20323 | 45 |
pascal@20323 | 46 find $install \( -name .install -o -name ..install.cmd \) -delete |
pascal@20323 | 47 |
al@19595 | 48 # Get and apply Aufs patches |
al@19595 | 49 . $WOK/linux/stuff/tools/aufs-patches |
al@19595 | 50 |
al@20442 | 51 make ARCH=$Arch defconfig |
al@20436 | 52 sed -i 's/^menuconfig:.*/z&\n\t@echo menuconfig is ready\n\n&/' \ |
pascal@20322 | 53 scripts/kconfig/Makefile |
al@20442 | 54 make ARCH=$Arch zmenuconfig |
al@19595 | 55 |
al@19595 | 56 p="$install/usr/src/linux-$VERSION-slitaz" |
al@19595 | 57 mkdir -p $p |
al@19595 | 58 cp -a $src/* $src/.config $p |
al@19595 | 59 |
al@19595 | 60 mkdir -p $install/usr/bin |
al@19595 | 61 mv $p/scripts/kconfig/mconf $install/usr/bin |
al@20441 | 62 |
al@20441 | 63 sed "s|@VERSION@|$VERSION|; s|@ARCH@|$Arch|" $stuff/menuconfig.in \ |
al@20436 | 64 > $install/usr/bin/menuconfig |
al@19595 | 65 chmod a+x $install/usr/bin/menuconfig |
pascal@20322 | 66 |
pascal@20322 | 67 |
al@20441 | 68 case "$ARCH" in |
al@20442 | 69 i?86-refuse-too) |
al@20441 | 70 sed -i 's|uname -m|echo i386|; s|/bin/bash|/bin/ash|g' Makefile |
al@20441 | 71 make ARCH=um mrproper |
al@20441 | 72 cp $stuff/mini.config . |
al@20441 | 73 make ARCH=um allnoconfig KCONFIG_ALLCONFIG=mini.config && |
al@20441 | 74 make ARCH=um || return 1 |
pascal@20334 | 75 |
al@20441 | 76 mkdir -p $install/boot |
al@20441 | 77 cp $src/linux $install/boot/linux-uml-$VERSION |
al@20441 | 78 sed "s|@VERSION@|$VERSION|" $stuff/vm-uml.in > $install/boot/vm-uml |
al@20441 | 79 chmod 755 $install/boot/vm-uml |
al@20441 | 80 ;; |
al@20441 | 81 esac |
al@19595 | 82 } |
al@19595 | 83 |
pascal@20322 | 84 |
al@20436 | 85 genpkg_rules() { |
pascal@20322 | 86 case $PACKAGE in |
al@20436 | 87 linux-dev) |
al@20436 | 88 copy Kconfig* mconf menuconfig .config |
al@20436 | 89 CAT="development|menu based configuration tool" |
al@20436 | 90 DEPENDS="ncurses" |
al@20436 | 91 TAGS="LFS" |
al@20436 | 92 ;; |
al@20436 | 93 linux-api-headers) |
al@20436 | 94 copy @dev |
al@20436 | 95 DEPENDS=" " |
al@20436 | 96 CAT="development|headers sanitized for use in userspace" |
al@20436 | 97 PROVIDE="linux-headers linux64-api-headers linux64-headers" |
al@20436 | 98 ;; |
al@20436 | 99 linux-uml) |
al@20436 | 100 copy boot/ |
al@20436 | 101 CAT="development|UML" |
al@20436 | 102 DEPENDS=" " |
al@20436 | 103 ;; |
pascal@20322 | 104 esac |
al@19595 | 105 } |