wok-current annotate linux/receipt @ rev 7089

Changed libunique TARBALL to .tar.bz2.
author Christopher Rogers <slaxemulator@gmail.com>
date Wed Nov 03 01:13:57 2010 +0000 (2010-11-03)
parents 473886fe148a
children 5355ffc461cf
rev   line source
pankso@3 1 # SliTaz package receipt.
pankso@3 2
pankso@3 3 PACKAGE="linux"
pankso@5640 4 VERSION="2.6.34"
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 {
slaxemulator@6721 18 local _AUFSVER="20101015"
slaxemulator@6721 19 local AUFSDIR="aufs2-${_AUFSVER}-${VERSION}"
slaxemulator@6721 20 [ -d "AUFSDIR" ] && rm -rf $AUFSDIR
slaxemulator@6721 21 TARBALL=$SOURCES_REPOSITORY/$AUFSDIR.tar.gz
slaxemulator@6719 22 if [ -f $TARBALL ]; then
slaxemulator@6719 23 tar xzf $TARBALL
slaxemulator@6721 24 cd $AUFSDIR && git checkout origin/aufs2-34
slaxemulator@6719 25 else
slaxemulator@6719 26 # Aufs2 from git repository
slaxemulator@6721 27 git clone http://git.c3sl.ufpr.br/pub/scm/aufs/aufs2-standalone.git $AUFSDIR
slaxemulator@6721 28 tar czf $TARBALL $AUFSDIR
slaxemulator@6721 29 cd $AUFSDIR && git checkout origin/aufs2-34
pankso@4251 30 fi
slaxemulator@6721 31 #cd $AUFSDIR
pascal@5061 32 cp -a Documentation fs include $src
pascal@5061 33 cp -a *.patch ../stuff
pankso@5640 34 # We need the real GNU patch
pascal@5061 35 [ -L /usr/bin/patch ] && tazpkg get-install patch --forced
erjo@253 36 cd $src
pankso@4251 37 # SliTaz db
pascal@2158 38 rm -rf slitaz 2> /dev/null
pascal@1093 39 mkdir slitaz
pascal@1093 40 echo "$WGET_URL" > slitaz/url
pascal@1093 41 cp ../stuff/gztazmod.sh ../stuff/list_modules.sh slitaz
pascal@4504 42 cp ../stuff/bootloader.sh slitaz
pankso@5640 43 # Apply patches
pascal@521 44 while read patch_file; do
pascal@4003 45 echo "$patch_file" >> slitaz/patches
jozee@4472 46 cp ../stuff/$patch_file slitaz
pascal@1442 47 if [ -f done.$patch_file ]; then
pascal@1442 48 echo "Skipping $patch_file"
pascal@1442 49 continue
pascal@1442 50 fi
pascal@521 51 echo "Apply $patch_file"
jozee@4472 52 patch -p1 < slitaz/$patch_file || exit 1
pascal@1442 53 touch done.$patch_file
pascal@521 54 done <<EOT
jozee@4472 55 $PACKAGE-diff-$VERSION.u
jozee@4472 56 $PACKAGE-unlzma-$VERSION.u
pankso@5245 57 $PACKAGE-header-$VERSION.u
jozee@4472 58 aufs2-base.patch
jozee@4472 59 aufs2-kbuild.patch
jozee@4472 60 aufs2-standalone.patch
pascal@5691 61 $PACKAGE-freeinitrd-$VERSION.u
pascal@5691 62 $PACKAGE-squashfs-lzma-$VERSION.u
pascal@521 63 EOT
pankso@3864 64 make mrproper
pascal@4507 65 cd Documentation/lguest
pascal@4507 66 make lguest || return 1
pascal@4507 67 cd ../..
erjo@253 68 cp ../stuff/$PACKAGE-$VERSION-slitaz.config .config
erjo@253 69 make oldconfig
pascal@1093 70 ln .config slitaz/config
pascal@5690 71 make -j 4 bzImage &&
pascal@5690 72 make -j 4 modules &&
pascal@3919 73 make INSTALL_MOD_PATH=$PWD/_pkg modules_install &&
pascal@3919 74 make INSTALL_HDR_PATH=$PWD/_pkg/usr headers_install &&
pascal@3919 75 [ -s arch/x86/boot/bzImage ]
slaxemulator@6719 76 # Compress all modules.
slaxemulator@6719 77 $WOK/$PACKAGE/stuff/gztazmod.sh $PWD/_pkg/lib/modules/$VERSION-slitaz
pankso@3864 78 }
erjo@253 79
pankso@3 80 # Rules to gen a SliTaz package suitable for Tazpkg.
pankso@3 81 genpkg_rules()
pankso@3 82 {
pascal@521 83 local path
pankso@3 84 mkdir $fs/boot
pankso@5640 85 cp -a $src/arch/x86/boot/bzImage \
pankso@5640 86 $fs/boot/vmlinuz-$VERSION-slitaz
pankso@3 87 # Compress all modules.
slaxemulator@6719 88 #./stuff/gztazmod.sh $_pkg/lib/modules/$VERSION-slitaz
pascal@521 89 path=$fs/lib/modules/$VERSION-slitaz/kernel
pascal@521 90 mkdir -p $path
pankso@5640 91 cp -a $_pkg/lib/modules/$VERSION-slitaz/mo* \
pankso@5640 92 $fs/lib/modules/$VERSION-slitaz
pankso@5640 93 # Get the base modules
pascal@886 94 export src
pascal@886 95 export _pkg
pascal@3920 96 $src/slitaz/list_modules.sh \
pascal@3920 97 $(cat stuff/modules-$VERSION.list) > $src/modules.list
pankso@3864 98 while read module; do
pascal@521 99 dir=$(dirname $module)
pankso@535 100 [ -d $path/$dir ] || mkdir -p $path/$dir
pankso@535 101 cp -a $_pkg/lib/modules/$VERSION-slitaz/kernel/$module $path/$dir
pascal@886 102 done < $src/modules.list
pascal@397 103 # Remove unresolved links
pascal@397 104 rm -f $fs/lib/modules/$VERSION-slitaz/build
pascal@397 105 rm -f $fs/lib/modules/$VERSION-slitaz/source
pascal@886 106 # Cook all packages with a kernel module
pascal@886 107 for i in $(cd $WOK; grep -l 'tazwok cook linux$' */receipt)
pascal@886 108 do
pascal@886 109 echo tazwok cook ${i%/receipt}
pankso@871 110 done
pankso@5640 111 # Check and echo any module in kernel .config that's not added to
pankso@5640 112 # one of linux-* pkgs
jozee@4472 113 ./stuff/check_modules.sh
pankso@3 114 }
pankso@3 115
pankso@3 116 # Pre and post install commands for Tazpkg.
pankso@3 117 post_install()
pankso@3 118 {
pascal@521 119 echo "Processing post-install commands..."
pascal@2926 120 chroot "$1/" depmod -a $VERSION-slitaz
pankso@5640 121 # GRUB stuff.
pankso@1154 122 if [ -f "$1/boot/grub/menu.lst" ]; then
pankso@4056 123 root_dev=`cat $1/boot/grub/menu.lst | grep root= | sed 's/.*root=\([^ ]*\).*/\1/' | head -n 1`
pankso@4056 124 grub_dev=`cat $1/boot/grub/menu.lst | grep "root (" | head -n 1`
pankso@3864 125 # Add new kernel entry in case of upgrade for installed system.
pankso@4056 126 if ! grep -q $PACKAGE-$VERSION-slitaz $1/boot/grub/menu.lst; then
pankso@4056 127 cat >> $1/boot/grub/menu.lst << EOT
pankso@4056 128
pankso@4056 129 title SliTaz GNU/Linux (Kernel $VERSION-slitaz)
pankso@4056 130 $grub_dev
pankso@4056 131 kernel /boot/vmlinuz-$VERSION-slitaz root=$root_dev
pankso@4056 132 EOT
pankso@4056 133 fi
pankso@4056 134 # Display information message.
pankso@4056 135 cat <<EOT
pankso@4056 136 ----
pankso@4056 137 GRUB is installed, these tree lines must be in your /boot/grub/menu.lst:
pankso@1154 138
pankso@1154 139 title SliTaz GNU/Linux (Kernel $VERSION-slitaz)
pankso@1154 140 $grub_dev
pankso@4056 141 kernel /boot/vmlinuz-$VERSION-slitaz root=$root_dev
pascal@886 142 ----
pascal@886 143 EOT
pankso@1154 144 fi
pankso@3 145 }
pankso@4251 146
pankso@4251 147 clean_wok()
pankso@4251 148 {
pankso@4251 149 rm -rf aufs2
pankso@5640 150 rm stuff/aufs2-*
pankso@5640 151 rm -rf stuff/tmp
pankso@4251 152 }