wok-next view dev86/receipt @ rev 20529
Up libblockdev (2.16), nspr (4.18), openssh (7.6p1), udisks2 (2.7.6).
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Sat Mar 24 15:55:55 2018 +0200 (2018-03-24) |
parents | 3a6b97ad0a64 |
children | 917cbaa57ad2 |
line source
1 # SliTaz package receipt v2.
3 PACKAGE="dev86"
4 VERSION="0.16.21"
5 CATEGORY="development"
6 SHORT_DESC="Linux 8086 development environment"
7 MAINTAINER="pascal.bellard@slitaz.org"
8 LICENSE="GPL2"
9 WEB_SITE="http://www.debath.co.uk/"
11 TARBALL="$PACKAGE-$VERSION.tar.gz"
12 WGET_URL="$GITHUB/lkundrak/dev86/tarball/v$VERSION"
14 BUILD_DEPENDS="coreutils-file-output-full" # for `cat -v`
15 SPLIT="elksemu"
17 compile_rules() {
18 sed -i 's|/usr/man|/usr/share/man|' man/Makefile
19 sed -i 's|REFIX)/man|REFIX)/share/man|' Makefile */Makefile
20 make -j 1 PREFIX=/usr &&
21 make -j 1 DIST=$DESTDIR install
22 }
24 genpkg_rules() {
25 case $PACKAGE in
26 dev86)
27 mkdir -p $fs/usr
28 cp -a $install/usr/bin $fs/usr
29 cp -a $install/usr/lib $fs/usr
30 cp -a $stuff/com2exe $fs/usr/bin
31 TAGS="compiler C assembler 8086"
32 ;;
33 elksemu)
34 mkdir -p $fs/usr/bin
35 cp -a $install/usr/bin/elksemu $fs/usr/bin
36 CAT="system-tools|ELKS binary format support"
37 TAGS="virtual 8086 vm86"
38 ;;
39 esac
40 }
42 post_install_dev86() {
43 [ "$1" ] && return
44 register=/proc/sys/fs/binfmt_misc/register
45 [ -f $register ] || modprobe binfmt_misc 2>/dev/null || true
46 [ -f $register ] && cat > $register <<EOT
47 :i86-elks:M::\x01\x03\x20\x00:\xff\xff\xff\x83:/usr/bin/elksemu:
48 EOT
49 true
50 }
52 post_install_elksemu() {
53 fmt="binfmt_misc"
54 proc="/proc/sys/fs/binfmt_misc"
55 cat > /tmp/runelks$$ <<EOT
56 [ ! -e $proc/register ] && modprobe $fmt && mount -t $fmt $fmt $proc
57 echo ':i86-elks:M::\x01\x03\x20\x00:\xff\xff\xff\x83:/usr/bin/elksemu:' >$proc/register
58 EOT
59 rc="$1/etc/init.d/local.sh"
60 grep -q ':i86-elks:M:' $rc || cat /tmp/runelks$$ >> $rc
61 [ -n "$1" ] || . /tmp/runelks$$
62 rm -f /tmp/runelks$$
63 }
65 pre_remove_elksemu() {
66 echo -1 > /proc/sys/fs/binfmt_misc/i86-elks
67 sed -i '/binfmt_misc/{N;/:i86-elks:M:/d}' "$1/etc/init.d/local.sh"
68 }