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

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