wok view elksemu/receipt @ rev 17282
Up youtube-dl (2014.10.27)
author | Richard Dunbar <mojo@slitaz.org> |
---|---|
date | Mon Oct 27 01:26:15 2014 -0400 (2014-10-27) |
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 }