wok-backports view linux-2.6.37-lxc/receipt @ rev 52

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