wok-6.x view runcom/receipt @ rev 24380
blender: added implicite build dependency libboost-locale
author | Hans-G?nter Theisgen |
---|---|
date | Sun Feb 06 10:08:38 2022 +0100 (2022-02-06) |
parents | 9e01bc6321ea |
children | 66a052ff61b1 |
line source
1 # SliTaz package receipt.
3 PACKAGE="runcom"
4 VERSION="1.0"
5 CATEGORY="system-tools"
6 SHORT_DESC="DOS .com binary format support"
7 MAINTAINER="devel@slitaz.org"
8 LICENSE="GPL"
9 WEB_SITE="http://bellard.org/jslinux"
10 TAGS="virtual 8086 vm86"
12 # Rules to configure and make the package.
13 compile_rules()
14 {
15 mkdir -p $src
16 cd $src
17 #tarball=$(wget -O - $WEB_SITE/tech.html | \
18 # sed '/linuxstart/!d;s/.*href="\([^"]*\)".*/\1/')
19 #wget $WEB_SITE/$tarball
20 #tar xzf $tarball
21 mkdir -p $DESTDIR/usr/bin
22 cc -o $DESTDIR/usr/bin/runcom $stuff/runcom.c
23 cc -o $src/debug.o -Wa,-a=$src/debug.lst -c $stuff/debug.S
24 objcopy -O binary $src/debug.o $DESTDIR/usr/bin/debug.bin
25 cp $stuff/debug.com $DESTDIR/usr/bin
26 chmod +x $DESTDIR/usr/bin/debug.*
27 }
29 # Rules to gen a SliTaz package suitable for Tazpkg.
30 genpkg_rules()
31 {
32 cp -a $install/* $fs
33 }
35 # Post install command for Tazpkg.
36 post_install()
37 {
38 fmt="binfmt_misc"
39 proc="/proc/sys/fs/binfmt_misc"
40 bin=":BOOTBIN:E::bin::/usr/bin/runcom:"
41 com=":DOSCOM:E::com::/usr/bin/runcom:"
42 cat > /tmp/runcom$$ <<EOT
43 [ ! -e $proc/register ] && modprobe $fmt && mount -t $fmt $fmt $proc
44 echo "$bin" >$proc/register
45 echo "$com" >$proc/register
46 EOT
47 rc="$1/etc/init.d/local.sh"
48 grep -q "$com" $rc || cat /tmp/runcom$$ >> $rc
49 [ -n "$1" ] || . /tmp/runcom$$
50 rm -f /tmp/runcom$$
51 }
53 # Pre remove command for Tazpkg.
54 pre_remove()
55 {
56 echo -1 > /proc/sys/fs/binfmt_misc/BOOTBIN
57 echo -1 > /proc/sys/fs/binfmt_misc/DOSCOM
58 sed -i '/binfmt_misc/{NN;/DOSCOM:E::com/d}' "$1/etc/init.d/local.sh"
59 }