wok view linux-uml/receipt @ rev 14540

firefox-langpack-es_ES: Up to 17.0.6esr
author Dominique Corbex <domcox@slitaz.org>
date Wed May 22 21:56:56 2013 +0200 (2013-05-22)
parents a62a3bf42fb0
children ad59999b3fce
line source
1 # SliTaz package receipt.
3 PACKAGE="linux-uml"
4 SOURCE="linux"
5 VERSION="3.2.40"
6 KBASEVER="3.2"
7 CATEGORY="base-system"
8 SHORT_DESC="The User Mode Linux kernel."
9 BUILD_DEPENDS="bash perl"
10 MAINTAINER="pascal.bellard@slitaz.org"
11 TARBALL="$SOURCE-$KBASEVER.tar.xz"
12 WEB_SITE="http://www.kernel.org/"
13 WGET_URL="ftp://ftp.kernel.org/pub/linux/kernel/v3.0/$TARBALL"
14 [ "$KBASEVER" != "$VERSION" ] &&
15 PATCH="$(dirname $WGET_URL)/patch-$VERSION.xz" &&
16 EXTRA_SOURCE_FILES="$(basename $PATCH)"
18 # Rules to configure and make the package.
19 compile_rules()
20 {
21 cd $src
22 if [ "$KBASEVER" != "$VERSION" ]; then
23 [ -s $SRC/$(basename $PATCH) ] ||
24 wget $PATCH -O $SRC/$(basename $PATCH)
25 xzcat $SRC/$(basename $PATCH) | patch -Np1
26 touch done.patch-$VERSION
27 fi
28 sed -i 's/uname -m/echo i386/;s|/bin/bash|/bin/ash|g' Makefile
29 make ARCH=um mrproper
30 cat > mini.config << EOF &&
31 CONFIG_BINFMT_ELF=y
32 CONFIG_LBD=y
33 CONFIG_BLK_DEV=y
34 CONFIG_BLK_DEV_LOOP=y
35 CONFIG_STDERR_CONSOLE=y
36 CONFIG_SSL=y
37 CONFIG_UNIX98_PTYS=y
38 CONFIG_PROC_FS=y
39 CONFIG_SYSFS_FS=y
40 CONFIG_IKCONFIG=y
41 CONFIG_IKCONFIG_PROC=y
42 CONFIG_UML_NET=y
43 CONFIG_UML_NET_TUNTAP=y
44 CONFIG_STATIC_LINK=y
45 CONFIG_BLK_DEV_INITRD=y
46 CONFIG_PTY_CHAN=y
47 CONFIG_TTY_CHAN=y
48 CONFIG_NET=y
49 CONFIG_INET=y
50 CONFIG_UML_NET=y
51 CONFIG_UML_NET_TUNTAP=y
52 CONFIG_BLK_DEV_UBD=y
53 CONFIG_EXT4_FS=y
54 CONFIG_EXT4_USE_FOR_EXT23=y
55 CONFIG_EXT4_FS_XATTR=y
56 CONFIG_EXT4_FS_POSIX_ACL=y
57 CONFIG_FUSE_FS=y
58 CONFIG_ISO9660_FS=y
59 CONFIG_VFAT_FS=y
60 CONFIG_TMPFS=y
61 CONFIG_SWAP=y
62 CONFIG_SYSVIPC=y
63 CONFIG_SYSVIPC_SYSCTL=y
64 CONFIG_SYSVIPC_COMPAT=y
65 CONFIG_PACKET=y
66 CONFIG_UNIX=y
67 CONFIG_NETFILTER=y
68 CONFIG_NETFILTER_ADVANCED=y
69 CONFIG_NF_CONNTRACK=y
70 CONFIG_NETFILTER_XTABLES=y
71 CONFIG_NF_DEFRAG_IPV4=y
72 CONFIG_NF_CONNTRACK_IPV4=y
73 CONFIG_NF_CONNTRACK_PROC_COMPAT=y
74 CONFIG_IP_NF_IPTABLES=y
75 CONFIG_IP_NF_FILTER=y
76 CONFIG_IP_NF_TARGET_REJECT=y
77 CONFIG_NF_NAT=y
78 CONFIG_NF_NAT_NEEDED=y
79 CONFIG_IP_NF_TARGET_MASQUERADE=y
80 CONFIG_IP_NF_TARGET_REDIRECT=y
81 CONFIG_NETDEVICES=y
82 CONFIG_TUN=y
83 EOF
84 make ARCH=um allnoconfig KCONFIG_ALLCONFIG=mini.config &&
85 make ARCH=um
86 }
88 # Rules to gen a SliTaz package suitable for Tazpkg.
89 genpkg_rules()
90 {
91 mkdir -p $fs/boot
92 cp $src/linux $fs/boot/linux-uml-$VERSION
93 cat > $fs/boot/vm-uml <<EOT
94 #!/bin/sh
96 # /etc/inittab: "tty21::respawn:/bin/su -c '/boot/vm-uml 1 /boot/guests/slitaz.img 2 512m' nobody"
97 n=\${1:-0}
98 tap=tap\$n
99 args="rw root=/dev/null"
100 dev="initrd=\$(ls -r /boot/rootfs*.gz | sed q)"
101 if [ -n "\$2" ]; then
102 args="ro root=620\${3:-1} screen=text sound=noconf"
103 dev="ubd0=\$2"
104 fi
106 cd \$(dirname \$0)
107 ifconfig \$tap 192.168.\$n.1
108 ./linux-uml-$VERSION \$dev mem=\${4:-512m} fakehd fake_ide ubd=3 con0=fd:0,fd:1 \\
109 con=pts ssl=pts eth0=tuntap,\$tap,fe:f0:00:00:00:0\$n,192.168.\$n.1 \\
110 \$args cpuinfo=\$(sed '/model name/!d;s/.*: //;s/ /_/g;q' /proc/cpuinfo)
111 EOT
112 chmod 755 $fs/boot/vm-uml
113 }