wok view linux-uml/receipt @ rev 24768

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