wok-tiny view x86test/receipt @ rev 173

Fix ctorrent-dnh & tfttest
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Jul 14 09:04:04 2021 +0000 (2021-07-14)
parents 8da769e5f6c3
children 2a1ec9d88ac0
line source
1 # SliTaz package receipt.
3 PACKAGE="x86test"
4 VERSION="0.10a"
5 CATEGORY="base-system"
6 SHORT_DESC="CPU failures detection tool."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 LICENSE="GPL2"
9 WEB_SITE="http://www.slitaz.org/"
10 TARGET="i486"
12 BUILD_DEPENDS="xz"
14 tune_lzma()
15 {
16 cp $stuff/*.S $stuff/pack .
17 sed "s/VERSION/$VERSION/;s|lzma1=|&nice=$1,|" -i pack
18 sed -i '/#define ONLY8086/d' unpack.S
19 while [ -n "$2" ]; do
20 sed "s|^#define PROP_$2 .*|#define PROP_$2 $3|" -i unlzma.S
21 shift 2
22 done
23 for i in bootloader unpack ; do
24 cc -o $i.o -Wa,-a=$i.lst -c $i.S
25 objcopy -O binary $i.o $i.bin
26 done
27 ./pack --build bootloader.bin unpack.bin
28 }
30 # Rules to configure and make the package.
31 compile_rules()
32 {
33 mkdir -p $src && cd $src
34 tune_lzma 36,mf=bt2 PB 0
35 ./pack x86test x86test.packed
36 dd if=bootloader.bin of=x86test conv=notrunc 2> /dev/null
37 }
39 # Rules to gen a SliTaz package suitable for Tazpkg.
40 genpkg_rules()
41 {
42 mkdir -p $fs/boot
43 cp $src/x86test.packed $fs/boot/$PACKAGE
44 }
46 # Post install/remove commands for Tazpkg.
47 post_install()
48 {
49 grep -qs ^x86test $1/boot/bootmenu ||
50 echo "x86test X86test,cpu,x86 Check X86 CPU (may run under DOS if renamed to x86test.exe)" >> $1/boot/bootmenu
51 }