wok-4.x annotate linux/receipt @ rev 5245

Up linux (2.6.33.2) With more modules and less patch
author Christophe Lincoln <pankso@slitaz.org>
date Sun Apr 11 19:23:48 2010 +0200 (2010-04-11)
parents 08b3c59fff77
children 33dfd49cdf84
rev   line source
pankso@3 1 # SliTaz package receipt.
pankso@3 2
pankso@3 3 PACKAGE="linux"
pankso@5245 4 VERSION="2.6.33.2"
pankso@3 5 CATEGORY="base-system"
pankso@3 6 SHORT_DESC="The Linux kernel and modules."
pascal@2926 7 DEPENDS="depmod"
pankso@4251 8 BUILD_DEPENDS="slitaz-toolchain perl git"
pankso@3864 9 MAINTAINER="devel@slitaz.org"
pankso@3 10 TARBALL="$PACKAGE-$VERSION.tar.bz2"
pankso@3 11 WEB_SITE="http://www.kernel.org/"
pascal@2990 12 WGET_URL="http://www.eu.kernel.org/pub/linux/kernel/v${VERSION:0:3}/$TARBALL"
pascal@1909 13 CONFIG_FILES="/lib/modules/$VERSION-slitaz/modules.dep"
pankso@3 14
pankso@3 15 # Rules to configure and make the package.
pankso@3 16 compile_rules()
pankso@3 17 {
pankso@4251 18 # Aufs2 from git repository
pankso@4251 19 if [ ! -d aufs2 ]; then
pankso@4251 20 git clone http://git.c3sl.ufpr.br/pub/scm/aufs/aufs2-standalone.git aufs2
pankso@5245 21 cd aufs2 && git checkout origin/aufs2-33
pascal@5061 22 #Use a well known version rather than the last one...
pankso@5245 23 #cd aufs2 && git checkout ee5557abdf9bb6fda673c19d239bb85869418045
pankso@4251 24 fi
pascal@5061 25 cd aufs2
pascal@5061 26 cp -a Documentation fs include $src
pascal@5061 27 cp -a *.patch ../stuff
pascal@5061 28 [ -L /usr/bin/patch ] && tazpkg get-install patch --forced
erjo@253 29 cd $src
pankso@4251 30 # SliTaz db
pascal@2158 31 rm -rf slitaz 2> /dev/null
pascal@1093 32 mkdir slitaz
pascal@1093 33 echo "$WGET_URL" > slitaz/url
pascal@1093 34 cp ../stuff/gztazmod.sh ../stuff/list_modules.sh slitaz
pascal@4504 35 cp ../stuff/bootloader.sh slitaz
pankso@4251 36 # Misc patches from pascal
pascal@521 37 while read patch_file; do
pascal@4003 38 echo "$patch_file" >> slitaz/patches
jozee@4472 39 #cp ../stuff/$patch_file slitaz/$patch_file
jozee@4472 40 cp ../stuff/$patch_file slitaz
pascal@1442 41 if [ -f done.$patch_file ]; then
pascal@1442 42 echo "Skipping $patch_file"
pascal@1442 43 continue
pascal@1442 44 fi
pascal@521 45 echo "Apply $patch_file"
jozee@4472 46 patch -p1 < slitaz/$patch_file || exit 1
pascal@1442 47 touch done.$patch_file
pankso@5245 48 #$PACKAGE-freeinitrd-$VERSION.u
pankso@5245 49 #$PACKAGE-squashfs-lzma-$VERSION.u
pascal@521 50 done <<EOT
jozee@4472 51 $PACKAGE-diff-$VERSION.u
jozee@4472 52 $PACKAGE-unlzma-$VERSION.u
pankso@5245 53 $PACKAGE-header-$VERSION.u
jozee@4472 54 aufs2-base.patch
jozee@4472 55 aufs2-kbuild.patch
jozee@4472 56 aufs2-standalone.patch
pascal@521 57 EOT
pankso@3864 58 make mrproper
pascal@4507 59 cd Documentation/lguest
pascal@4507 60 make lguest || return 1
pascal@4507 61 cd ../..
erjo@253 62 cp ../stuff/$PACKAGE-$VERSION-slitaz.config .config
erjo@253 63 make oldconfig
pascal@1093 64 ln .config slitaz/config
pascal@3919 65 make bzImage &&
pascal@3919 66 make modules &&
pascal@3919 67 make INSTALL_MOD_PATH=$PWD/_pkg modules_install &&
pascal@3919 68 make INSTALL_HDR_PATH=$PWD/_pkg/usr headers_install &&
pascal@3919 69 [ -s arch/x86/boot/bzImage ]
pankso@3864 70 }
erjo@253 71
pankso@3 72 # Rules to gen a SliTaz package suitable for Tazpkg.
pankso@3 73 genpkg_rules()
pankso@3 74 {
pascal@521 75 local path
pankso@3 76 mkdir $fs/boot
pascal@214 77 cp -a $src/arch/x86/boot/bzImage $fs/boot/vmlinuz-$VERSION-slitaz
pankso@3 78 # Compress all modules.
pankso@3 79 # Package module-init-tools is compiled with zlib support.
pankso@3 80 #
pascal@521 81 ./stuff/gztazmod.sh $_pkg/lib/modules/$VERSION-slitaz
pascal@521 82 path=$fs/lib/modules/$VERSION-slitaz/kernel
pascal@521 83 mkdir -p $path
pascal@521 84 cp -a $_pkg/lib/modules/$VERSION-slitaz/mo* $fs/lib/modules/$VERSION-slitaz
pascal@886 85 export src
pascal@886 86 export _pkg
pascal@3920 87 $src/slitaz/list_modules.sh \
pascal@3920 88 $(cat stuff/modules-$VERSION.list) > $src/modules.list
pankso@3864 89 while read module; do
pascal@521 90 dir=$(dirname $module)
pankso@535 91 [ -d $path/$dir ] || mkdir -p $path/$dir
pankso@535 92 cp -a $_pkg/lib/modules/$VERSION-slitaz/kernel/$module $path/$dir
pascal@886 93 done < $src/modules.list
pascal@397 94 # Remove unresolved links
pascal@397 95 rm -f $fs/lib/modules/$VERSION-slitaz/build
pascal@397 96 rm -f $fs/lib/modules/$VERSION-slitaz/source
pascal@886 97 # Package all linux pkgs
pascal@886 98 for i in $(cd $WOK; ls -d linux-*)
pankso@871 99 do
pascal@886 100 tazwok genpkg $i
pascal@886 101 done
pascal@886 102 # Cook all packages with a kernel module
pascal@886 103 for i in $(cd $WOK; grep -l 'tazwok cook linux$' */receipt)
pascal@886 104 do
pascal@886 105 echo tazwok cook ${i%/receipt}
pankso@871 106 done
jozee@4472 107 # check and echo any module in kernel .config that's not added to one of linux-* pkgs
jozee@4472 108 ./stuff/check_modules.sh
pankso@3 109 }
pankso@3 110
pankso@3 111 # Pre and post install commands for Tazpkg.
pankso@3 112 # GRUB stuf.
pankso@3 113 post_install()
pankso@3 114 {
pascal@521 115 echo "Processing post-install commands..."
pascal@2926 116 chroot "$1/" depmod -a $VERSION-slitaz
pankso@1154 117 if [ -f "$1/boot/grub/menu.lst" ]; then
pankso@4056 118 root_dev=`cat $1/boot/grub/menu.lst | grep root= | sed 's/.*root=\([^ ]*\).*/\1/' | head -n 1`
pankso@4056 119 grub_dev=`cat $1/boot/grub/menu.lst | grep "root (" | head -n 1`
pankso@3864 120 # Add new kernel entry in case of upgrade for installed system.
pankso@4056 121 if ! grep -q $PACKAGE-$VERSION-slitaz $1/boot/grub/menu.lst; then
pankso@4056 122 cat >> $1/boot/grub/menu.lst << EOT
pankso@4056 123
pankso@4056 124 title SliTaz GNU/Linux (Kernel $VERSION-slitaz)
pankso@4056 125 $grub_dev
pankso@4056 126 kernel /boot/vmlinuz-$VERSION-slitaz root=$root_dev
pankso@4056 127 EOT
pankso@4056 128 fi
pankso@4056 129 # Display information message.
pankso@4056 130 cat <<EOT
pankso@4056 131 ----
pankso@4056 132 GRUB is installed, these tree lines must be in your /boot/grub/menu.lst:
pankso@1154 133
pankso@1154 134 title SliTaz GNU/Linux (Kernel $VERSION-slitaz)
pankso@1154 135 $grub_dev
pankso@4056 136 kernel /boot/vmlinuz-$VERSION-slitaz root=$root_dev
pascal@886 137 ----
pascal@886 138 EOT
pankso@1154 139 fi
pankso@3 140 }
pankso@4251 141
pankso@4251 142 clean_wok()
pankso@4251 143 {
pankso@4251 144 rm -rf aufs2
pankso@4251 145 }