wok view elksemu/receipt @ rev 17522

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