wok-6.x view busybox-boot/receipt @ rev 13769
Add: vice emulator (2.2)
author | Alexander Medvedev <devl547@gmail.com> |
---|---|
date | Thu Jan 03 15:34:06 2013 +0300 (2013-01-03) |
parents | |
children | 4fd8473c8682 |
line source
1 # SliTaz package receipt.
3 PACKAGE="busybox-boot"
4 VERSION="1.20.2"
5 CATEGORY="base-system"
6 SHORT_DESC="Many common UNIX utilities for core-5in1/boot flavor."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 DEPENDS="linux syslinux"
9 WANTED="busybox"
10 WEB_SITE="http://www.busybox.net/"
11 CONFIG_FILES=""
13 # Rules to gen a SliTaz package suitable for Tazpkg.
14 genpkg_rules()
15 {
16 jslinux=false
17 mkdir -p $fs/bin $fs/sbin $fs/dev/pts $fs/proc $fs/sys $fs/tmp
18 cp -a $src/busybox-static $fs/bin/busybox
19 mknod -m 660 $fs/dev/console c 5 1
20 mknod -m 771 $fs/dev/null c 1 3
21 mknod -m 660 $fs/dev/tty c 5 0
22 if $jslinux; then
23 mknod -m 644 $fs/dev/clipboard c 10 231
24 mknod -m 660 $fs/dev/ttyS0 c 4 64
25 fi
26 mknod -m 660 $fs/dev/tty1 c 4 1
27 cat > $fs/init <<EOT
28 #!/bin/busybox sh
30 for i in \$(busybox --list) ; do busybox ln /bin/busybox /bin/\$i; done
32 export PATH=/bin
33 export HOME=/
34 export TERM=vt100
36 mount -t proc none /proc
37 [ -d /proc/bus/usb ] && mount -t usbfs usbfs /proc/bus/usb
38 mount -t sysfs none /sys
39 mount -t devpts none /dev/pts
41 TTY=\$(tty 2>/dev/null)
42 TTY=\${TTY:-/dev/tty1}
43 EOT
44 $jslinux && cat >> $fs/init <<EOT
45 stty -F \$TTY rows 30 2>/dev/null
46 EOT
47 cat >> $fs/init <<EOT
49 busybox | sed '/Current/,\$!d'
50 while true; do
51 if [ -x /bin/setsid ]; then
52 setsid sh -c "exec sh <\$TTY >\$TTY 2>&1"
53 else
54 sh <\$TTY >\$TTY 2>&1
55 fi
56 done
57 EOT
58 chmod +x $fs/init
59 ln $fs/init $fs/sbin/init
60 }
62 pre_install()
63 {
64 rm -rf $1/bin $1/sbin
65 }
67 post_install()
68 {
69 rm -rf $1/lib $1/var $1/sbin $1/home $1/root $1/media
70 }