wok view linux-lxc/receipt @ rev 15695

Fix missing mkdir command
author Stanislas Leduc <shann@slitaz.org>
date Sat Dec 21 11:13:51 2013 +0100 (2013-12-21)
parents 9305265ac151
children
line source
1 # SliTaz package receipt
3 PACKAGE="linux-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="$PACKAGE-$VERSION.tar.gz"
9 WEB_SITE="http://linuxcontainers.org/"
10 WGET_URL="http://people.slitaz.org/~shann/packages/$PACKAGE/$TARBALL"
11 PROVIDE="linux"
13 DEPENDS="lxc"
15 # Rules to gen a SliTaz package suitable for Tazpkg.
16 genpkg_rules()
17 {
18 mkdir -p $fs/lib/firmware $fs/lib/modules
19 cp -a $src/boot $fs
20 cp -a $src/lib/modules/* $fs/lib/modules
21 cp -a $src/lib/firmware/* $fs/lib/firmware
22 chown -R root.root $fs
23 }
25 # Pre and post install commands for Tazpkg.
26 post_install()
27 {
28 echo "Update /etc/fstab for use cgroup..."
29 echo "none /cgroup cgroup defaults 0 0" >> /etc/fstab
31 echo "Processing post-install commands..."
32 chroot "$1/" depmod -a $VERSION-lxc-slitaz
33 # GRUB stuff.
34 if [ -f "$1/boot/grub/menu.lst" ]; then
35 root_dev=`cat $1/boot/grub/menu.lst | grep root= | sed 's/.*root=\([^ ]*\).*/\1/' | head -n 1`
36 grub_dev=`cat $1/boot/grub/menu.lst | grep "root (" | head -n 1`
37 # Add new kernel entry in case of upgrade for installed system.
38 if ! grep -q $PACKAGE-$VERSION-lxc-slitaz $1/boot/grub/menu.lst; then
39 cat >> $1/boot/grub/menu.lst << EOT
41 title SliTaz GNU/Linux (Kernel $VERSION-lxc-slitaz)
42 $grub_dev
43 kernel /boot/vmlinuz-$VERSION-lxc-slitaz root=$root_dev
44 EOT
45 fi
46 # Display information message.
47 cat <<EOT
48 ----
49 GRUB is installed, these tree lines must be in your /boot/grub/menu.lst:
51 title SliTaz GNU/Linux (Kernel $VERSION-lxc-slitaz)
52 $grub_dev
53 kernel /boot/vmlinuz-$VERSION-lxc-slitaz root=$root_dev
54 ----
55 EOT
56 fi
57 }