wok-next view linux-source/receipt @ rev 19640

Up xcb-util
author Aleksej Bobylev <al.bobylev@gmail.com>
date Mon Feb 13 11:27:42 2017 +0200 (2017-02-13)
parents 960a052d15d3
children
line source
1 # SliTaz package receipt.
3 PACKAGE="linux-source"
4 VERSION="4.9.4"
5 CATEGORY="development"
6 SHORT_DESC="The Linux Kernel source files"
7 MAINTAINER="devel@slitaz.org"
8 LICENSE="GPL2"
9 WEB_SITE="https://www.kernel.org/"
11 WANTED="linux"
12 DEPENDS="linux slitaz-toolchain ncurses-dev perl xz lzma patch busybox-boot"
14 # Rules to gen a SliTaz package suitable for Tazpkg.
15 genpkg_rules()
16 {
17 local _AUFSVER=$(. $WOK/aufs/receipt; echo $VERSION)
18 local AUFSDIR="aufs-${_AUFSVER}"
19 kps=$fs/usr/src/kernel-patches/slitaz
20 mkdir -p $kps \
21 $fs/lib/modules/$VERSION-slitaz \
22 $fs/usr/bin $fs/usr/sbin
24 # URL
25 echo $(. $WOK/linux/receipt; echo $WGET_URL) > $kps/url
26 # stuff
27 cp $wanted_stuff/tools/* $wanted_stuff/bootloader.sh $kps
28 # Kernel patch
29 xzcat $SRC/patch-$VERSION.xz > $kps/linux-$VERSION.patch
30 echo "linux-$VERSION.patch" > $kps/patches
31 # Aufs patches
32 sed '/^aufs4.*patch$/!d' $wanted_stuff/tools/aufs-patches | \
33 tee -a $kps/patches | \
34 while read i; do
35 cp $WOK/aufs/source/*/$i $kps
36 done
37 # misc. patches
38 cat $wanted_stuff/patches/patch.order >> $kps/patches
39 cp $wanted_stuff/patches/* $kps
40 rm $kps/patch.order
41 # config
42 cp $WOK/linux/source/linux-$VERSION/.config $kps/config
44 cp -a $stuff/buildtaz $kps
45 cp -a $stuff/make-tazpkg.u $kps
46 cp -a $stuff/get-linux-source $fs/usr/bin
47 cp -a $stuff/list_modules.sh $kps
48 cp -a $stuff/rdev $fs/usr/sbin
49 ln -s rdev $fs/usr/sbin/rootflags
50 ln -s rdev $fs/usr/sbin/ramsize
51 ln -s rdev $fs/usr/sbin/vidmode
52 sed -i "s|=XXX|=$VERSION|g" $fs/usr/bin/get-linux-source
54 # Copy Aufs4 source files
55 if [ -d $WOK/$WANTED/$AUFSDIR ]; then
56 mkdir $fs/usr/src/kernel-patches/slitaz/aufs4
57 cp -a $WOK/$WANTED/$AUFSDIR/Documentation \
58 $WOK/$WANTED/$AUFSDIR/fs $WOK/$WANTED/$AUFSDIR/include \
59 $fs/usr/src/kernel-patches/slitaz/aufs4
60 fi
62 ln -s ../../../usr/src/linux-$VERSION $fs/lib/modules/$VERSION-slitaz/source
64 chown -R root:root $fs
65 }