wok-6.x annotate runcom/receipt @ rev 17914
Add fontforge and its depends (libspiro, libuninameslist).
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Thu Apr 09 03:26:48 2015 +0300 (2015-04-09) |
parents | 051931e905b0 |
children | 9e01bc6321ea |
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" |
pascal@16678 | 10 TAGS="virtual 8086 vm86" |
pascal@11674 | 11 |
pascal@11674 | 12 # Rules to configure and make the package. |
pascal@11674 | 13 compile_rules() |
pascal@11674 | 14 { |
pascal@11674 | 15 mkdir -p $src |
pascal@11674 | 16 cd $src |
pascal@11674 | 17 #tarball=$(wget -O - $WEB_SITE/tech.html | \ |
pascal@11674 | 18 # sed '/linuxstart/!d;s/.*href="\([^"]*\)".*/\1/') |
pascal@11674 | 19 #wget $WEB_SITE/$tarball |
pascal@11674 | 20 #tar xzf $tarball |
pascal@11674 | 21 mkdir -p $DESTDIR/usr/bin |
pascal@11674 | 22 cc -o $DESTDIR/usr/bin/runcom $stuff/runcom.c |
pascal@11674 | 23 cc -o $src/debug.o -Wa,-a=$src/debug.lst -c $stuff/debug.S |
pascal@11674 | 24 objcopy -O binary $src/debug.o $DESTDIR/usr/bin/debug.bin |
pascal@11674 | 25 cp $stuff/debug.com $DESTDIR/usr/bin |
pascal@11674 | 26 chmod +x $DESTDIR/usr/bin/debug.* |
pascal@11674 | 27 } |
pascal@11674 | 28 |
pascal@11674 | 29 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@11674 | 30 genpkg_rules() |
pascal@11674 | 31 { |
pascal@15603 | 32 cp -a $install/* $fs |
pascal@11674 | 33 } |
pascal@11674 | 34 |
pascal@11674 | 35 # Post install command for Tazpkg. |
pascal@11674 | 36 post_install() |
pascal@11674 | 37 { |
pascal@11674 | 38 fmt="binfmt_misc" |
pascal@11674 | 39 proc="/proc/sys/fs/binfmt_misc" |
pascal@11674 | 40 bin=":BOOTBIN:E::bin::/usr/bin/runcom:" |
pascal@11674 | 41 com=":DOSCOM:E::com::/usr/bin/runcom:" |
pascal@11685 | 42 cat > /tmp/runcom$$ <<EOT |
pascal@11674 | 43 [ ! -e $proc/register ] && modprobe $fmt && mount -t $fmt $fmt $proc |
pascal@11674 | 44 echo "$bin" >$proc/register |
pascal@11674 | 45 echo "$com" >$proc/register |
pascal@11674 | 46 EOT |
pascal@11685 | 47 rc="$1/etc/init.d/local.sh" |
pascal@11685 | 48 grep -q "$com" $rc || cat /tmp/runcom$$ >> $rc |
pascal@11685 | 49 [ -n "$1" ] || . /tmp/runcom$$ |
pascal@11685 | 50 rm -f /tmp/runcom$$ |
pascal@11674 | 51 } |
pascal@11674 | 52 |
pascal@11674 | 53 # Pre remove command for Tazpkg. |
pascal@11674 | 54 pre_remove() |
pascal@11674 | 55 { |
pascal@11674 | 56 echo -1 > $1/proc/sys/fs/binfmt_misc/BOOTBIN |
pascal@11674 | 57 echo -1 > $1/proc/sys/fs/binfmt_misc/DOSCOM |
pascal@11674 | 58 sed -i '/binfmt_misc/{NN;/DOSCOM:E::com/d}' $1/etc/init.d/local.sh |
pascal@11674 | 59 } |