wok-next annotate runcom/receipt @ rev 12919
evas: update bdeps
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Tue May 29 21:54:10 2012 +0200 (2012-05-29) |
parents | 289a2f495cd6 |
children | 8387b6915400 |
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@11674 | 7 MAINTAINER="dev@slitaz.org" |
pascal@11674 | 8 WEB_SITE="http://bellard.org/jslinux" |
pascal@11674 | 9 |
pascal@11674 | 10 # Rules to configure and make the package. |
pascal@11674 | 11 compile_rules() |
pascal@11674 | 12 { |
pascal@11674 | 13 mkdir -p $src |
pascal@11674 | 14 cd $src |
pascal@11674 | 15 #tarball=$(wget -O - $WEB_SITE/tech.html | \ |
pascal@11674 | 16 # sed '/linuxstart/!d;s/.*href="\([^"]*\)".*/\1/') |
pascal@11674 | 17 #wget $WEB_SITE/$tarball |
pascal@11674 | 18 #tar xzf $tarball |
pascal@11674 | 19 mkdir -p $DESTDIR/usr/bin |
pascal@11674 | 20 cc -o $DESTDIR/usr/bin/runcom $stuff/runcom.c |
pascal@11674 | 21 cc -o $src/debug.o -Wa,-a=$src/debug.lst -c $stuff/debug.S |
pascal@11674 | 22 objcopy -O binary $src/debug.o $DESTDIR/usr/bin/debug.bin |
pascal@11674 | 23 cp $stuff/debug.com $DESTDIR/usr/bin |
pascal@11674 | 24 chmod +x $DESTDIR/usr/bin/debug.* |
pascal@11674 | 25 } |
pascal@11674 | 26 |
pascal@11674 | 27 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@11674 | 28 genpkg_rules() |
pascal@11674 | 29 { |
pascal@11674 | 30 cp -a $_pkg/* $fs |
pascal@11674 | 31 } |
pascal@11674 | 32 |
pascal@11674 | 33 # Post install command for Tazpkg. |
pascal@11674 | 34 post_install() |
pascal@11674 | 35 { |
pascal@11674 | 36 fmt="binfmt_misc" |
pascal@11674 | 37 proc="/proc/sys/fs/binfmt_misc" |
pascal@11674 | 38 bin=":BOOTBIN:E::bin::/usr/bin/runcom:" |
pascal@11674 | 39 com=":DOSCOM:E::com::/usr/bin/runcom:" |
pascal@11685 | 40 cat > /tmp/runcom$$ <<EOT |
pascal@11674 | 41 [ ! -e $proc/register ] && modprobe $fmt && mount -t $fmt $fmt $proc |
pascal@11674 | 42 echo "$bin" >$proc/register |
pascal@11674 | 43 echo "$com" >$proc/register |
pascal@11674 | 44 EOT |
pascal@11685 | 45 rc="$1/etc/init.d/local.sh" |
pascal@11685 | 46 grep -q "$com" $rc || cat /tmp/runcom$$ >> $rc |
pascal@11685 | 47 [ -n "$1" ] || . /tmp/runcom$$ |
pascal@11685 | 48 rm -f /tmp/runcom$$ |
pascal@11674 | 49 } |
pascal@11674 | 50 |
pascal@11674 | 51 # Pre remove command for Tazpkg. |
pascal@11674 | 52 pre_remove() |
pascal@11674 | 53 { |
pascal@11674 | 54 echo -1 > $1/proc/sys/fs/binfmt_misc/BOOTBIN |
pascal@11674 | 55 echo -1 > $1/proc/sys/fs/binfmt_misc/DOSCOM |
pascal@11674 | 56 sed -i '/binfmt_misc/{NN;/DOSCOM:E::com/d}' $1/etc/init.d/local.sh |
pascal@11674 | 57 } |