wok-current annotate elksemu/receipt @ rev 18099
Up elksemu (0.16.21)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Fri May 29 17:10:24 2015 +0200 (2015-05-29) |
parents | 59fad0483733 |
children | 9e01bc6321ea |
rev | line source |
---|---|
pascal@16989 | 1 # SliTaz package receipt. |
pascal@16989 | 2 |
pascal@16989 | 3 PACKAGE="elksemu" |
pascal@18099 | 4 VERSION="0.16.21" |
pascal@16989 | 5 CATEGORY="system-tools" |
pascal@16989 | 6 SHORT_DESC="ELKS (linux-8086) binary format support" |
pascal@16989 | 7 MAINTAINER="devel@slitaz.org" |
pascal@16989 | 8 LICENSE="GPL2" |
pascal@16989 | 9 WEB_SITE="http://www.debath.co.uk/" |
pascal@16989 | 10 WANTED="dev86" |
pascal@16989 | 11 TAGS="virtual 8086 vm86" |
pascal@16989 | 12 |
pascal@16989 | 13 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@16989 | 14 genpkg_rules() |
pascal@16989 | 15 { |
pascal@16989 | 16 mkdir -p $fs/usr/bin |
pascal@16989 | 17 cp -a $install/usr/bin/elksemu $fs/usr/bin |
pascal@16989 | 18 } |
pascal@16989 | 19 |
pascal@16989 | 20 # Post install command for Tazpkg. |
pascal@16989 | 21 post_install() |
pascal@16989 | 22 { |
pascal@16989 | 23 fmt="binfmt_misc" |
pascal@16989 | 24 proc="/proc/sys/fs/binfmt_misc" |
pascal@16989 | 25 cat > /tmp/runelks$$ <<EOT |
pascal@16989 | 26 [ ! -e $proc/register ] && modprobe $fmt && mount -t $fmt $fmt $proc |
pascal@16989 | 27 echo ':i86-elks:M::\x01\x03\x20\x00:\xff\xff\xff\x83:/usr/bin/elksemu:' >$proc/register |
pascal@16989 | 28 EOT |
pascal@16989 | 29 rc="$1/etc/init.d/local.sh" |
pascal@16989 | 30 grep -q ':i86-elks:M:' $rc || cat /tmp/runelks$$ >> $rc |
pascal@16989 | 31 [ -n "$1" ] || . /tmp/runelks$$ |
pascal@16989 | 32 rm -f /tmp/runelks$$ |
pascal@16989 | 33 } |
pascal@16989 | 34 |
pascal@16989 | 35 # Pre remove command for Tazpkg. |
pascal@16989 | 36 pre_remove() |
pascal@16989 | 37 { |
pascal@16989 | 38 echo -1 > $1/proc/sys/fs/binfmt_misc/i86-elks |
pascal@16989 | 39 sed -i '/binfmt_misc/{N;/:i86-elks:M:/d}' $1/etc/init.d/local.sh |
pascal@16989 | 40 } |