# HG changeset patch # User Stanislas Leduc # Date 1387634460 -3600 # Node ID cc08b218b93c1c430d7fe15d454085a9855c04d7 # Parent e07bbb8448544cc17c7c7d40f2f8848ed9ded992 Rename linux-lxc on linux-2.6.37-lxc diff -r e07bbb844854 -r cc08b218b93c linux-2.6.37-lxc/receipt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/linux-2.6.37-lxc/receipt Sat Dec 21 15:01:00 2013 +0100 @@ -0,0 +1,57 @@ +# SliTaz package receipt + +PACKAGE="linux-2.6.37-lxc" +VERSION="2.6.37" +CATEGORY="misc" +SHORT_DESC="The Linux kernel and modules with LXC support." +MAINTAINER="shann@slitaz.org" +TARBALL="$PACKAGE-$VERSION.tar.gz" +WEB_SITE="http://linuxcontainers.org/" +WGET_URL="http://people.slitaz.org/~shann/packages/$PACKAGE/$TARBALL" +PROVIDE="linux" + +DEPENDS="lxc" + +# Rules to gen a SliTaz package suitable for Tazpkg. +genpkg_rules() +{ + mkdir -p $fs/lib/firmware $fs/lib/modules + cp -a $src/boot $fs + cp -a $src/lib/modules/* $fs/lib/modules + cp -a $src/lib/firmware/* $fs/lib/firmware + chown -R root.root $fs +} + +# Pre and post install commands for Tazpkg. +post_install() +{ + echo "Update /etc/fstab for use cgroup..." + echo "none /cgroup cgroup defaults 0 0" >> /etc/fstab + + echo "Processing post-install commands..." + chroot "$1/" depmod -a $VERSION-lxc-slitaz + # GRUB stuff. + if [ -f "$1/boot/grub/menu.lst" ]; then + root_dev=`cat $1/boot/grub/menu.lst | grep root= | sed 's/.*root=\([^ ]*\).*/\1/' | head -n 1` + grub_dev=`cat $1/boot/grub/menu.lst | grep "root (" | head -n 1` + # Add new kernel entry in case of upgrade for installed system. + if ! grep -q $PACKAGE-$VERSION-lxc-slitaz $1/boot/grub/menu.lst; then + cat >> $1/boot/grub/menu.lst << EOT + +title SliTaz GNU/Linux (Kernel $VERSION-lxc-slitaz) +$grub_dev +kernel /boot/vmlinuz-$VERSION-lxc-slitaz root=$root_dev +EOT + fi + # Display information message. + cat <> /etc/fstab - - echo "Processing post-install commands..." - chroot "$1/" depmod -a $VERSION-lxc-slitaz - # GRUB stuff. - if [ -f "$1/boot/grub/menu.lst" ]; then - root_dev=`cat $1/boot/grub/menu.lst | grep root= | sed 's/.*root=\([^ ]*\).*/\1/' | head -n 1` - grub_dev=`cat $1/boot/grub/menu.lst | grep "root (" | head -n 1` - # Add new kernel entry in case of upgrade for installed system. - if ! grep -q $PACKAGE-$VERSION-lxc-slitaz $1/boot/grub/menu.lst; then - cat >> $1/boot/grub/menu.lst << EOT - -title SliTaz GNU/Linux (Kernel $VERSION-lxc-slitaz) -$grub_dev -kernel /boot/vmlinuz-$VERSION-lxc-slitaz root=$root_dev -EOT - fi - # Display information message. - cat <