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

Up TeXmacs (1.0.7.18), linux-dev (4.9.30)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat Nov 11 18:54:50 2017 +0100 (2017-11-11)
parents f463de72afe3
children 2580cc4152a5
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 # Get and apply Aufs patches
41 . $WOK/linux/stuff/tools/aufs-patches
43 make defconfig
44 sed -i 's/^menuconfig:.*/z&\n\techo menuconfig is ready\n\n&/' \
45 scripts/kconfig/Makefile
46 make zmenuconfig
48 p="$install/usr/src/linux-$VERSION-slitaz"
49 mkdir -p $p
50 cp -a $src/* $src/.config $p
52 mkdir -p $install/usr/bin
53 mv $p/scripts/kconfig/mconf $install/usr/bin
54 cat > $install/usr/bin/menuconfig <<EOT
55 #!/bin/sh
56 p=\$PWD
57 cd ../src/linux-$VERSION-slitaz
58 SRCARCH=x86 ARCH=i386 KERNELVERSION=$VERSION \$p/mconf Kconfig
59 EOT
60 chmod a+x $install/usr/bin/menuconfig
62 patch -p1 -i $stuff/installmandocs.patch
64 make mandocs && make installmandocs
66 make mrproper &&
67 make headers_check &&
68 make INSTALL_HDR_PATH=$DESTDIR/usr headers_install
70 find $install \( -name .install -o -name ..install.cmd \) -delete
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 }