wok annotate linux/receipt @ rev 8088

Bumped linux.
author Christopher Rogers <slaxemulator@gmail.com>
date Sat Jan 22 04:27:31 2011 +0000 (2011-01-22)
parents 03d4663c81fa
children 3aed8aae4b77
rev   line source
pankso@3 1 # SliTaz package receipt.
pankso@3 2
pankso@3 3 PACKAGE="linux"
slaxemulator@8085 4 VERSION="2.6.37"
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
slaxemulator@8088 15
pankso@3 16 # Rules to configure and make the package.
pankso@3 17 compile_rules()
pankso@3 18 {
slaxemulator@7131 19
slaxemulator@7131 20 # this is code to help update the kernel version faster
slaxemulator@7131 21 #for i in $(grep -l 'WANTED="linux"' $WOK/*/receipt)
slaxemulator@7131 22 #do
slaxemulator@7131 23 # sed -i 's|VERSION="OLDVERSION"|VERSION="NEWVERSION"|g' $i
slaxemulator@7131 24 #done
slaxemulator@7297 25 local _AUFSVER=`grep ^VERSION= $WOK/aufs/receipt | cut -d "=" -f2 | sed -e 's/"//g'`
slaxemulator@7297 26 local AUFSDIR="aufs-${_AUFSVER}"
slaxemulator@8085 27 TARBALL=$SOURCES_REPOSITORY/$AUFSDIR.tar.lzma
slaxemulator@7299 28 if [ -f $TARBALL ]; then
slaxemulator@8085 29 tar -x -f $TARBALL
slaxemulator@8085 30 cd $AUFSDIR && git checkout origin/aufs2.1-37
slaxemulator@7297 31 cd $WOK/$PACKAGE
slaxemulator@6719 32 else
slaxemulator@6719 33 # Aufs2 from git repository
slaxemulator@8085 34 git clone git://aufs.git.sourceforge.net/gitroot/aufs/aufs2-standalone.git $AUFSDIR
slaxemulator@8085 35 tar -c --lzma -f $TARBALL $AUFSDIR
slaxemulator@8085 36 cd $AUFSDIR && git checkout origin/aufs2.1-37
slaxemulator@7297 37 cd $WOK/$PACKAGE
pankso@4251 38 fi
slaxemulator@7297 39 cp -a $AUFSDIR/Documentation $AUFSDIR/fs $AUFSDIR/include $src
slaxemulator@7297 40 cp -a $AUFSDIR/*.patch $WOK/$PACKAGE/stuff
pankso@5640 41 # We need the real GNU patch
pascal@5061 42 [ -L /usr/bin/patch ] && tazpkg get-install patch --forced
erjo@253 43 cd $src
pankso@4251 44 # SliTaz db
slaxemulator@7297 45 [ -d slitaz ] && rm -rf slitaz 2> /dev/null
pascal@1093 46 mkdir slitaz
pascal@1093 47 echo "$WGET_URL" > slitaz/url
pascal@1093 48 cp ../stuff/gztazmod.sh ../stuff/list_modules.sh slitaz
pascal@4504 49 cp ../stuff/bootloader.sh slitaz
pankso@5640 50 # Apply patches
pascal@521 51 while read patch_file; do
pascal@4003 52 echo "$patch_file" >> slitaz/patches
jozee@4472 53 cp ../stuff/$patch_file slitaz
pascal@1442 54 if [ -f done.$patch_file ]; then
pascal@1442 55 echo "Skipping $patch_file"
pascal@1442 56 continue
pascal@1442 57 fi
pascal@521 58 echo "Apply $patch_file"
jozee@4472 59 patch -p1 < slitaz/$patch_file || exit 1
pascal@1442 60 touch done.$patch_file
pascal@521 61 done <<EOT
jozee@4472 62 $PACKAGE-diff-$VERSION.u
jozee@4472 63 $PACKAGE-unlzma-$VERSION.u
pankso@5245 64 $PACKAGE-header-$VERSION.u
slaxemulator@7131 65 $PACKAGE-freeinitrd-$VERSION.u
jozee@4472 66 aufs2-base.patch
slaxemulator@7131 67 aufs2-standalone.patch
slaxemulator@7650 68 001-squashfs-decompressors-add-xz-decompressor-module.patch
slaxemulator@7650 69 002-squashfs-decompressors-add-boot-time-xz-support.patch
slaxemulator@7650 70 003-squashfs-x86-support-xz-compressed-kernel.patch
slaxemulator@7650 71 004-squashfs-add-xz-compression-support.patch
slaxemulator@7650 72 005-squashfs-add-xz-compression-configuration-option.patch
pascal@521 73 EOT
pankso@3864 74 make mrproper
pascal@4507 75 cd Documentation/lguest
pascal@4507 76 make lguest || return 1
pascal@4507 77 cd ../..
pascal@7667 78
pascal@7667 79 # Build bzImage without modules first
slaxemulator@7674 80 cp -f ../stuff/$PACKAGE-$VERSION-slitaz.config .config
pascal@7667 81 sed -i 's/CONFIG_MODULES=y/# CONFIG_MODULES is not set/' .config
pascal@7667 82 # We can't keep every driver in staging
pascal@7667 83 sed -i -e 's/^CONFIG_RTL8192/#&/' \
pascal@7667 84 -e 's/^CONFIG_R8187SE/#&/' \
pascal@7667 85 -e 's/^CONFIG_RT2870/#&/' .config
pascal@7667 86 yes '' | make oldconfig
pascal@7667 87 make -j 4 bzImage || return 1
slaxemulator@7690 88 [ -d $PWD/_pkg ] || mkdir -p $PWD/_pkg
pascal@7667 89 mv arch/x86/boot/bzImage $PWD/_pkg
pascal@7667 90 mv System.map System.map-without-modules
pascal@7667 91
pascal@7667 92 # Build bzImage with modules
slaxemulator@7674 93 cp -f ../stuff/$PACKAGE-$VERSION-slitaz.config .config
erjo@253 94 make oldconfig
pascal@1093 95 ln .config slitaz/config
pascal@5690 96 make -j 4 bzImage &&
pascal@5690 97 make -j 4 modules &&
pascal@3919 98 make INSTALL_MOD_PATH=$PWD/_pkg modules_install &&
pascal@3919 99 make INSTALL_HDR_PATH=$PWD/_pkg/usr headers_install &&
pascal@7655 100 [ -s arch/x86/boot/bzImage ] || return 1
pascal@7656 101 mkdir -p $PWD/_pkg/boot 2> /dev/null
pascal@7656 102 mv arch/x86/boot/bzImage $PWD/_pkg/boot/vmlinuz-$VERSION-slitaz
slaxemulator@6719 103 # Compress all modules.
slaxemulator@6719 104 $WOK/$PACKAGE/stuff/gztazmod.sh $PWD/_pkg/lib/modules/$VERSION-slitaz
pascal@7667 105 ln System.map System.map-modules
pascal@7667 106 ln Module.symvers Module.symvers-modules
pankso@3864 107 }
erjo@253 108
pankso@3 109 # Rules to gen a SliTaz package suitable for Tazpkg.
pankso@3 110 genpkg_rules()
pankso@3 111 {
pascal@521 112 local path
pascal@7656 113 cp -a $_pkg/boot $fs
pankso@3 114 # Compress all modules.
slaxemulator@6719 115 #./stuff/gztazmod.sh $_pkg/lib/modules/$VERSION-slitaz
pascal@521 116 path=$fs/lib/modules/$VERSION-slitaz/kernel
pascal@521 117 mkdir -p $path
pankso@5640 118 cp -a $_pkg/lib/modules/$VERSION-slitaz/mo* \
pankso@5640 119 $fs/lib/modules/$VERSION-slitaz
pankso@5640 120 # Get the base modules
pascal@886 121 export src
pascal@886 122 export _pkg
pascal@3920 123 $src/slitaz/list_modules.sh \
pascal@3920 124 $(cat stuff/modules-$VERSION.list) > $src/modules.list
pankso@3864 125 while read module; do
pascal@521 126 dir=$(dirname $module)
pankso@535 127 [ -d $path/$dir ] || mkdir -p $path/$dir
pankso@535 128 cp -a $_pkg/lib/modules/$VERSION-slitaz/kernel/$module $path/$dir
pascal@886 129 done < $src/modules.list
pascal@397 130 # Remove unresolved links
pascal@397 131 rm -f $fs/lib/modules/$VERSION-slitaz/build
pascal@397 132 rm -f $fs/lib/modules/$VERSION-slitaz/source
pascal@886 133 # Cook all packages with a kernel module
pascal@886 134 for i in $(cd $WOK; grep -l 'tazwok cook linux$' */receipt)
pascal@886 135 do
pascal@886 136 echo tazwok cook ${i%/receipt}
pankso@871 137 done
pankso@5640 138 # Check and echo any module in kernel .config that's not added to
pankso@5640 139 # one of linux-* pkgs
jozee@4472 140 ./stuff/check_modules.sh
pankso@3 141 }
pankso@3 142
pankso@3 143 # Pre and post install commands for Tazpkg.
pankso@3 144 post_install()
pankso@3 145 {
pascal@521 146 echo "Processing post-install commands..."
pascal@2926 147 chroot "$1/" depmod -a $VERSION-slitaz
pankso@5640 148 # GRUB stuff.
pankso@1154 149 if [ -f "$1/boot/grub/menu.lst" ]; then
pankso@4056 150 root_dev=`cat $1/boot/grub/menu.lst | grep root= | sed 's/.*root=\([^ ]*\).*/\1/' | head -n 1`
pankso@4056 151 grub_dev=`cat $1/boot/grub/menu.lst | grep "root (" | head -n 1`
pankso@3864 152 # Add new kernel entry in case of upgrade for installed system.
pankso@4056 153 if ! grep -q $PACKAGE-$VERSION-slitaz $1/boot/grub/menu.lst; then
pankso@4056 154 cat >> $1/boot/grub/menu.lst << EOT
pankso@4056 155
pankso@4056 156 title SliTaz GNU/Linux (Kernel $VERSION-slitaz)
pankso@4056 157 $grub_dev
pankso@4056 158 kernel /boot/vmlinuz-$VERSION-slitaz root=$root_dev
pankso@4056 159 EOT
pankso@4056 160 fi
pankso@4056 161 # Display information message.
pankso@4056 162 cat <<EOT
pankso@4056 163 ----
pankso@4056 164 GRUB is installed, these tree lines must be in your /boot/grub/menu.lst:
pankso@1154 165
pankso@1154 166 title SliTaz GNU/Linux (Kernel $VERSION-slitaz)
pankso@1154 167 $grub_dev
pankso@4056 168 kernel /boot/vmlinuz-$VERSION-slitaz root=$root_dev
pascal@886 169 ----
pascal@886 170 EOT
pankso@1154 171 fi
pankso@3 172 }
pankso@4251 173
pankso@4251 174 clean_wok()
pankso@4251 175 {
slaxemulator@7131 176 #rm -rf aufs2
slaxemulator@7131 177 rm stuff/aufs2-base*
slaxemulator@7131 178 rm stuff/aufs2-standalone*
slaxemulator@7347 179 rm stuff/aufs2-kbuild*
pankso@5640 180 rm -rf stuff/tmp
pankso@4251 181 }