wok annotate linux-lxc/receipt @ rev 15713
Up util-linux (2.24)
author | Richard Dunbar <mojo@slitaz.org> |
---|---|
date | Tue Dec 24 21:11:57 2013 +0000 (2013-12-24) |
parents | 9305265ac151 |
children |
rev | line source |
---|---|
shann@15679 | 1 # SliTaz package receipt |
shann@15679 | 2 |
shann@15679 | 3 PACKAGE="linux-lxc" |
shann@15679 | 4 VERSION="2.6.37" |
shann@15680 | 5 CATEGORY="misc" |
shann@15679 | 6 SHORT_DESC="The Linux kernel and modules with LXC support." |
shann@15679 | 7 MAINTAINER="shann@slitaz.org" |
shann@15679 | 8 TARBALL="$PACKAGE-$VERSION.tar.gz" |
shann@15682 | 9 WEB_SITE="http://linuxcontainers.org/" |
shann@15684 | 10 WGET_URL="http://people.slitaz.org/~shann/packages/$PACKAGE/$TARBALL" |
shann@15679 | 11 PROVIDE="linux" |
shann@15679 | 12 |
shann@15679 | 13 DEPENDS="lxc" |
shann@15679 | 14 |
shann@15679 | 15 # Rules to gen a SliTaz package suitable for Tazpkg. |
shann@15679 | 16 genpkg_rules() |
shann@15679 | 17 { |
shann@15695 | 18 mkdir -p $fs/lib/firmware $fs/lib/modules |
shann@15683 | 19 cp -a $src/boot $fs |
shann@15695 | 20 cp -a $src/lib/modules/* $fs/lib/modules |
shann@15695 | 21 cp -a $src/lib/firmware/* $fs/lib/firmware |
shann@15679 | 22 chown -R root.root $fs |
shann@15679 | 23 } |
shann@15685 | 24 |
shann@15685 | 25 # Pre and post install commands for Tazpkg. |
shann@15685 | 26 post_install() |
shann@15685 | 27 { |
shann@15693 | 28 echo "Update /etc/fstab for use cgroup..." |
shann@15693 | 29 echo "none /cgroup cgroup defaults 0 0" >> /etc/fstab |
shann@15693 | 30 |
shann@15685 | 31 echo "Processing post-install commands..." |
shann@15685 | 32 chroot "$1/" depmod -a $VERSION-lxc-slitaz |
shann@15685 | 33 # GRUB stuff. |
shann@15685 | 34 if [ -f "$1/boot/grub/menu.lst" ]; then |
shann@15694 | 35 root_dev=`cat $1/boot/grub/menu.lst | grep root= | sed 's/.*root=\([^ ]*\).*/\1/' | head -n 1` |
shann@15694 | 36 grub_dev=`cat $1/boot/grub/menu.lst | grep "root (" | head -n 1` |
shann@15685 | 37 # Add new kernel entry in case of upgrade for installed system. |
shann@15694 | 38 if ! grep -q $PACKAGE-$VERSION-lxc-slitaz $1/boot/grub/menu.lst; then |
shann@15685 | 39 cat >> $1/boot/grub/menu.lst << EOT |
shann@15685 | 40 |
shann@15685 | 41 title SliTaz GNU/Linux (Kernel $VERSION-lxc-slitaz) |
shann@15685 | 42 $grub_dev |
shann@15685 | 43 kernel /boot/vmlinuz-$VERSION-lxc-slitaz root=$root_dev |
shann@15685 | 44 EOT |
shann@15685 | 45 fi |
shann@15685 | 46 # Display information message. |
shann@15685 | 47 cat <<EOT |
shann@15685 | 48 ---- |
shann@15685 | 49 GRUB is installed, these tree lines must be in your /boot/grub/menu.lst: |
shann@15685 | 50 |
shann@15685 | 51 title SliTaz GNU/Linux (Kernel $VERSION-lxc-slitaz) |
shann@15685 | 52 $grub_dev |
shann@15685 | 53 kernel /boot/vmlinuz-$VERSION-lxc-slitaz root=$root_dev |
shann@15685 | 54 ---- |
shann@15685 | 55 EOT |
shann@15685 | 56 fi |
shann@15685 | 57 } |