wok-6.x annotate linux/receipt @ rev 1423

Fix CATEGORY in receipts
author Pascal Bellard <pascal.bellard@slitaz.org>
date Fri Sep 26 09:21:16 2008 +0000 (2008-09-26)
parents 34e504bf5887
children e64f8e87ea6d
rev   line source
pankso@3 1 # SliTaz package receipt.
pankso@3 2
pankso@3 3 PACKAGE="linux"
pascal@886 4 VERSION="2.6.25.5"
pankso@3 5 CATEGORY="base-system"
pankso@3 6 SHORT_DESC="The Linux kernel and modules."
pankso@1154 7 BUILD_DEPENDS="slitaz-toolchain perl"
pankso@289 8 MAINTAINER="pascal.bellard@slitaz.org"
pankso@3 9 TARBALL="$PACKAGE-$VERSION.tar.bz2"
pankso@3 10 WEB_SITE="http://www.kernel.org/"
pankso@3 11 WGET_URL="http://www.eu.kernel.org/pub/linux/kernel/v2.6/$TARBALL"
pankso@3 12
pankso@3 13 # Rules to configure and make the package.
pankso@3 14 compile_rules()
pankso@3 15 {
erjo@253 16 cd $src
pascal@1093 17 mkdir slitaz
pascal@1093 18 echo "$WGET_URL" > slitaz/url
pascal@1093 19 cp ../stuff/gztazmod.sh ../stuff/list_modules.sh slitaz
pascal@886 20 # lzma and misc patches from pascal
pascal@521 21 while read patch_file; do
pascal@521 22 echo "Apply $patch_file"
pascal@881 23 patch -p1 < ../stuff/$patch_file || return 1
pascal@1093 24 echo "$patch_file" >> slitaz/patches
pascal@1093 25 cp ../stuff/$patch_file slitaz/$patch_file
pascal@521 26 done <<EOT
pascal@521 27 $PACKAGE-lzma-$VERSION.u
pascal@886 28 $PACKAGE-utf8-$VERSION.u
pascal@886 29 $PACKAGE-diff-$VERSION.u
pascal@905 30 $PACKAGE-rootdev.u
pascal@521 31 EOT
erjo@253 32 make mrproper
erjo@253 33 cp ../stuff/$PACKAGE-$VERSION-slitaz.config .config
erjo@253 34 make oldconfig
pascal@1093 35 ln .config slitaz/config
erjo@253 36 make bzImage
erjo@253 37 make modules
erjo@253 38 make INSTALL_MOD_PATH=$PWD/_pkg modules_install
pascal@886 39 make INSTALL_HDR_PATH=$PWD/_pkg/usr headers_install
erjo@253 40 }
erjo@253 41
pankso@3 42 # Rules to gen a SliTaz package suitable for Tazpkg.
pankso@3 43 genpkg_rules()
pankso@3 44 {
pascal@521 45 local path
pankso@3 46 mkdir $fs/boot
pascal@214 47 cp -a $src/arch/x86/boot/bzImage $fs/boot/vmlinuz-$VERSION-slitaz
pankso@3 48 # Compress all modules.
pankso@3 49 # Package module-init-tools is compiled with zlib support.
pankso@3 50 #
pascal@521 51 ./stuff/gztazmod.sh $_pkg/lib/modules/$VERSION-slitaz
pascal@521 52 path=$fs/lib/modules/$VERSION-slitaz/kernel
pascal@521 53 mkdir -p $path
pascal@521 54 cp -a $_pkg/lib/modules/$VERSION-slitaz/mo* $fs/lib/modules/$VERSION-slitaz
pascal@886 55 cp ./stuff/list_modules.sh $src
pascal@886 56 export src
pascal@886 57 export _pkg
pascal@886 58 $src/list_modules.sh $(cat stuff/modules-$VERSION.list) > $src/modules.list
pascal@521 59 while read module; do
pascal@521 60 dir=$(dirname $module)
pankso@535 61 [ -d $path/$dir ] || mkdir -p $path/$dir
pankso@535 62 cp -a $_pkg/lib/modules/$VERSION-slitaz/kernel/$module $path/$dir
pascal@886 63 done < $src/modules.list
pascal@397 64 # Remove unresolved links
pascal@397 65 rm -f $fs/lib/modules/$VERSION-slitaz/build
pascal@397 66 rm -f $fs/lib/modules/$VERSION-slitaz/source
pascal@886 67 # Package all linux pkgs
pascal@886 68 for i in $(cd $WOK; ls -d linux-*)
pankso@871 69 do
pascal@886 70 tazwok genpkg $i
pascal@886 71 done
pascal@886 72 # Cook all packages with a kernel module
pascal@886 73 for i in $(cd $WOK; grep -l 'tazwok cook linux$' */receipt)
pascal@886 74 do
pascal@886 75 echo tazwok cook ${i%/receipt}
pankso@871 76 done
pankso@3 77 }
pankso@3 78
pankso@3 79 # Pre and post install commands for Tazpkg.
pankso@3 80 # GRUB stuf.
pankso@3 81 post_install()
pankso@3 82 {
pascal@521 83 echo "Processing post-install commands..."
pascal@886 84 depmod -a -b "$1/" $VERSION-slitaz
pankso@1154 85 if [ -f "$1/boot/grub/menu.lst" ]; then
pankso@1154 86 root_dev=`cat $1/boot/grub/menu.lst | grep root= | sed 's/.*root=\([^ ]*\).*/\1/'`
pankso@1154 87 grub_dev=`cat $1/boot/grub/menu.lst | grep "root ("`
pankso@1154 88 # Add new kernel entry in case of upgrade for installed system.
pankso@1154 89 cat >> $1/boot/grub/menu.lst << EOT
pankso@1154 90
pankso@1154 91 title SliTaz GNU/Linux (Kernel $VERSION-slitaz)
pankso@1154 92 $grub_dev
pankso@1154 93 kernel /boot/vmlinuz-$VERSION-slitaz root=$root_dev
pankso@1154 94 EOT
pankso@1154 95 # Display information message.
pankso@1154 96 cat <<EOT
pascal@886 97 ----
pankso@1154 98 GRUB is installed, these tree lines has been added to the menu.lst:
pascal@886 99
pankso@3 100 title SliTaz GNU/Linux (Kernel $VERSION-slitaz)
pankso@1154 101 $grub_dev
pankso@1154 102 kernel /boot/vmlinuz-$VERSION-slitaz root=$root_dev
pascal@886 103 ----
pascal@886 104 EOT
pankso@1154 105 fi
pankso@3 106 }