# SliTaz package receipt. PACKED_SIZE="60.0K" UNPACKED_SIZE="64.0K" PACKAGE="memtest" VERSION="5.01" CATEGORY="base-system" SHORT_DESC="Memory failures detection tool." MAINTAINER="pascal.bellard@slitaz.org" LICENSE="GPL2" WEB_SITE="http://www.memtest.org/" TARBALL="memtest86+-$VERSION.tar.gz" WGET_URL="http://www.memtest.org/download/$VERSION/$TARBALL" TARGET="i486" BUILD_DEPENDS="xz" tune_lzma() { cp $stuff/*.S $stuff/pack . sed "s/VERSION/$VERSION/;s|lzma1=|&nice=$1,|" -i pack while [ -n "$2" ]; do sed "s|^#define PROP_$2 .*|#define PROP_$2 $3|" -i unlzma.S shift 2 done for i in bootloader unpack ; do cc -o $i.o -Wa,-a=$i.lst -c $i.S objcopy -O binary $i.o $i.bin done ./pack --build bootloader.bin unpack.bin } # Rules to configure and make the package. compile_rules() { ls $stuff/memtest*-$VERSION-*.patch 2> /dev/null && for i in $stuff/memtest*-$VERSION-*.patch ; do patch -p1 < $i done make tune_lzma 127,mf=bt2 PB 3 ./pack memtest.bin memtest.packed mv memtest.bin memtest.bin.console sed -i -e 's/SERIAL_CONSOLE_DEFAULT 0/SERIAL_CONSOLE_DEFAULT 1/' \ -e 's/SERIAL_BAUD_RATE 9600/SERIAL_BAUD_RATE 115200/' config.h make clean make tune_lzma 172,mf=bt2 PB 3 ./pack memtest.bin memtest.packed-115200 mv memtest.bin memtest.bin.serial } # Rules to gen a SliTaz package suitable for Tazpkg. genpkg_rules() { mkdir -p $fs/boot cp $src/memtest.packed $fs/boot/$PACKAGE } # Post install/remove commands for Tazpkg. post_install() { grep -qs ^memtest $1/boot/bootmenu || echo "memtest Memtest,test,mem Check memory (may run under DOS, in real mode or with emm386, if renamed to memtest.exe)" >> $1/boot/bootmenu }