wok diff emu2/receipt @ rev 25770
dool,fake-hwclock,gtkam,xfce4-*-plugin,xlogo: add current_version
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Fri Sep 06 11:29:23 2024 +0000 (2 months ago) |
parents | 8ac6f7029d68 |
children |
line diff
1.1 --- a/emu2/receipt Wed Nov 08 16:45:57 2023 +0000 1.2 +++ b/emu2/receipt Fri Sep 06 11:29:23 2024 +0000 1.3 @@ -24,6 +24,7 @@ 1.4 compile_rules() 1.5 { 1.6 cp $stuff/* src 1.7 + sed -i '/HALT instruction/{N;s|.*|/*& */|}' src/cpu.c 1.8 mkdir obj 1.9 make CC=gcc-83 DESTDIR=$DESTDIR install 1.10 } 1.11 @@ -35,3 +36,28 @@ 1.12 cp $src/README.md $install/usr/doc 1.13 cp -a $install/usr/bin $fs/usr 1.14 } 1.15 + 1.16 +# Post install command for Tazpkg. 1.17 +post_install() 1.18 +{ 1.19 + fmt="binfmt_misc" 1.20 + proc="/proc/sys/fs/binfmt_misc" 1.21 + exe=":EMU2:E::exe::/usr/bin/emu2:" 1.22 + com=":EMU2:E::com::/usr/bin/emu2:" 1.23 + cat > /tmp/runcom$$ <<EOT 1.24 +[ ! -e $proc/register ] && modprobe $fmt && mount -t $fmt $fmt $proc 1.25 +echo "$exe" >$proc/register 1.26 +echo "$com" >$proc/register 1.27 +EOT 1.28 + rc="$1/etc/init.d/local.sh" 1.29 + grep -q "$com" $rc || cat /tmp/runcom$$ >> $rc 1.30 + [ -n "$1" ] || . /tmp/runcom$$ 1.31 + rm -f /tmp/runcom$$ 1.32 +} 1.33 + 1.34 +# Pre remove command for Tazpkg. 1.35 +pre_remove() 1.36 +{ 1.37 + echo -1 > /proc/sys/fs/binfmt_misc/EMU2 1.38 + sed -i '/binfmt_misc/{NN;/EMU2:E::com/d}' "$1/etc/init.d/local.sh" 1.39 +}