wok-next view linux-dev/receipt @ rev 20323

fix vice
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat Nov 11 23:40:00 2017 +0100 (2017-11-11)
parents e93a94f7f25b
children deed89212f83
line source
1 # SliTaz package receipt v2.
3 PACKAGE="linux-dev"
4 VERSION="4.9.30"
5 KBASEVER="4.9"
6 CATEGORY="development"
7 SHORT_DESC="Menu based tool to configure the Linux Kernel"
8 MAINTAINER="devel@slitaz.org"
9 LICENSE="GPL2"
10 WEB_SITE="https://www.kernel.org/"
12 TARBALL="linux-$KBASEVER.tar.xz"
13 WGET_URL="https://www.kernel.org/pub/linux/kernel/v4.x/$TARBALL"
15 DEPENDS="ncurses"
16 BUILD_DEPENDS="python-sphinx perl xmlto util-linux-getopt docbook-xsl \
17 coreutils-operations findutils ncurses-dev patch bash"
18 SPLIT="linux-dev linux-man linux-api-headers"
19 SIBLINGS="linux"
20 COOKOPTS="!pngz !svgz !uiz"
22 if [ "$KBASEVER" != "${VERSION%.0}" ]; then
23 PATCH="$(dirname $WGET_URL)/patch-$VERSION.xz"
24 EXTRA_SOURCE_FILES="$(basename $PATCH)"
25 fi
27 # Rules to configure and make the package.
28 compile_rules()
29 {
30 # Update sources to the $VERSION using base sources ($KBASEVER) and patch
31 if [ "$KBASEVER" != "${VERSION%.0}" ]; then
32 [ -s $SRC/$(basename $PATCH) ] || wget $PATCH -O $SRC/$(basename $PATCH)
33 # don't patch twice for `cook $PACKAGE --continue`
34 if [ ! -f "done.patch-$VERSION" ]; then
35 xzcat $SRC/$(basename $PATCH) | patch -Np1
36 touch done.patch-$VERSION
37 fi
38 fi
40 make mrproper &&
41 make headers_check &&
42 make INSTALL_HDR_PATH=$DESTDIR/usr headers_install
44 find $install \( -name .install -o -name ..install.cmd \) -delete
46 # Get and apply Aufs patches
47 . $WOK/linux/stuff/tools/aufs-patches
49 make defconfig
50 sed -i 's/^menuconfig:.*/z&\n\techo menuconfig is ready\n\n&/' \
51 scripts/kconfig/Makefile
52 make zmenuconfig
54 p="$install/usr/src/linux-$VERSION-slitaz"
55 mkdir -p $p
56 cp -a $src/* $src/.config $p
58 mkdir -p $install/usr/bin
59 mv $p/scripts/kconfig/mconf $install/usr/bin
60 cat > $install/usr/bin/menuconfig <<EOT
61 #!/bin/sh
62 p=\$PWD
63 cd ../src/linux-$VERSION-slitaz
64 SRCARCH=x86 ARCH=i386 KERNELVERSION=$VERSION \$p/mconf Kconfig
65 EOT
66 chmod a+x $install/usr/bin/menuconfig
68 patch -p1 -i $stuff/installmandocs.patch
70 make mandocs && make installmandocs
71 }
74 # Rules to gen a SliTaz package suitable for Tazpkg.
75 genpkg_rules()
76 {
77 case $PACKAGE in
78 linux-dev)
79 copy Kconfig* mconf menuconfig .config
80 ;;
81 linux-man)
82 mkdir -p $fs/usr/share
83 cp -a $install/usr/share/man $fs/usr/share
84 ;;
85 linux-api-headers)
86 CAT="development|Kernel headers sanitized for use in userspace"
87 PROVIDE="linux-headers linux64-api-headers linux64-headers"
88 copy @dev
89 ;;
90 esac
91 }