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