wok-next annotate runcom/receipt @ rev 20888
Check Repology info from q* to x* packages
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Sat Jul 14 17:43:03 2018 +0300 (2018-07-14) |
parents | ed8073aa8cf0 |
children | d5aab818505e |
rev | line source |
---|---|
pascal@11674 | 1 # SliTaz package receipt. |
pascal@11674 | 2 |
pascal@11674 | 3 PACKAGE="runcom" |
pascal@11674 | 4 VERSION="1.0" |
pascal@11674 | 5 CATEGORY="system-tools" |
pascal@11674 | 6 SHORT_DESC="DOS .com binary format support" |
pascal@13025 | 7 MAINTAINER="devel@slitaz.org" |
pascal@14781 | 8 LICENSE="GPL" |
pascal@11674 | 9 WEB_SITE="http://bellard.org/jslinux" |
al@20888 | 10 REPOLOGY="-" |
al@20888 | 11 |
pascal@16678 | 12 TAGS="virtual 8086 vm86" |
pascal@11674 | 13 |
pascal@11674 | 14 # Rules to configure and make the package. |
pascal@11674 | 15 compile_rules() |
pascal@11674 | 16 { |
pascal@11674 | 17 mkdir -p $src |
pascal@11674 | 18 cd $src |
pascal@11674 | 19 #tarball=$(wget -O - $WEB_SITE/tech.html | \ |
pascal@11674 | 20 # sed '/linuxstart/!d;s/.*href="\([^"]*\)".*/\1/') |
pascal@11674 | 21 #wget $WEB_SITE/$tarball |
pascal@11674 | 22 #tar xzf $tarball |
pascal@11674 | 23 mkdir -p $DESTDIR/usr/bin |
pascal@11674 | 24 cc -o $DESTDIR/usr/bin/runcom $stuff/runcom.c |
pascal@11674 | 25 cc -o $src/debug.o -Wa,-a=$src/debug.lst -c $stuff/debug.S |
pascal@11674 | 26 objcopy -O binary $src/debug.o $DESTDIR/usr/bin/debug.bin |
pascal@11674 | 27 cp $stuff/debug.com $DESTDIR/usr/bin |
pascal@11674 | 28 chmod +x $DESTDIR/usr/bin/debug.* |
pascal@11674 | 29 } |
pascal@11674 | 30 |
pascal@11674 | 31 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@11674 | 32 genpkg_rules() |
pascal@11674 | 33 { |
pascal@15603 | 34 cp -a $install/* $fs |
pascal@11674 | 35 } |
pascal@11674 | 36 |
pascal@11674 | 37 # Post install command for Tazpkg. |
pascal@11674 | 38 post_install() |
pascal@11674 | 39 { |
pascal@11674 | 40 fmt="binfmt_misc" |
pascal@11674 | 41 proc="/proc/sys/fs/binfmt_misc" |
pascal@11674 | 42 bin=":BOOTBIN:E::bin::/usr/bin/runcom:" |
pascal@11674 | 43 com=":DOSCOM:E::com::/usr/bin/runcom:" |
pascal@11685 | 44 cat > /tmp/runcom$$ <<EOT |
pascal@11674 | 45 [ ! -e $proc/register ] && modprobe $fmt && mount -t $fmt $fmt $proc |
pascal@11674 | 46 echo "$bin" >$proc/register |
pascal@11674 | 47 echo "$com" >$proc/register |
pascal@11674 | 48 EOT |
pascal@11685 | 49 rc="$1/etc/init.d/local.sh" |
pascal@11685 | 50 grep -q "$com" $rc || cat /tmp/runcom$$ >> $rc |
pascal@11685 | 51 [ -n "$1" ] || . /tmp/runcom$$ |
pascal@11685 | 52 rm -f /tmp/runcom$$ |
pascal@11674 | 53 } |
pascal@11674 | 54 |
pascal@11674 | 55 # Pre remove command for Tazpkg. |
pascal@11674 | 56 pre_remove() |
pascal@11674 | 57 { |
pascal@18732 | 58 echo -1 > /proc/sys/fs/binfmt_misc/BOOTBIN |
pascal@18732 | 59 echo -1 > /proc/sys/fs/binfmt_misc/DOSCOM |
pascal@18730 | 60 sed -i '/binfmt_misc/{NN;/DOSCOM:E::com/d}' "$1/etc/init.d/local.sh" |
pascal@11674 | 61 } |