wok-6.x annotate memtest/receipt @ rev 21254
Up hg-git (0.8.12), shaarli (0.10.3)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Fri Apr 12 11:04:49 2019 +0200 (2019-04-12) |
parents | beda06c66d60 |
children | d44f69067aca |
rev | line source |
---|---|
pascal@524 | 1 # SliTaz package receipt. |
pascal@524 | 2 |
pascal@524 | 3 PACKAGE="memtest" |
pascal@15468 | 4 VERSION="5.01" |
pascal@524 | 5 CATEGORY="base-system" |
pascal@524 | 6 SHORT_DESC="Memory failures detection tool." |
pascal@524 | 7 MAINTAINER="pascal.bellard@slitaz.org" |
pascal@17225 | 8 LICENSE="GPL2" |
pascal@1734 | 9 SOURCE="memtest86+" |
pascal@1734 | 10 TARBALL="$SOURCE-$VERSION.tar.gz" |
pascal@524 | 11 WEB_SITE="http://www.memtest.org/" |
pascal@1734 | 12 WGET_URL="${WEB_SITE}download/$VERSION/$TARBALL" |
pascal@524 | 13 |
pascal@14798 | 14 BUILD_DEPENDS="xz" |
pascal@13269 | 15 |
pascal@524 | 16 # Rules to configure and make the package. |
pascal@524 | 17 compile_rules() |
pascal@524 | 18 { |
pascal@15468 | 19 sed -i '/scp memtest.bin/d' Makefile |
pascal@19171 | 20 for i in array-size io setup ; do |
pascal@17225 | 21 patch -p1 < $stuff/$SOURCE-$VERSION-$i.patch |
pascal@17225 | 22 done |
pascal@1734 | 23 make |
pascal@13269 | 24 cp $stuff/*.S $stuff/pack . |
pascal@15188 | 25 for i in bootloader unpack ; do |
pascal@15188 | 26 cc -o $i.o -Wa,-a=$i.lst -c $i.S |
pascal@15188 | 27 objcopy -O binary $i.o $i.bin |
pascal@15188 | 28 done |
pascal@17223 | 29 sed -i "s/VERSION/$VERSION/" pack |
pascal@15188 | 30 ./pack --build bootloader.bin unpack.bin |
pascal@13269 | 31 ./pack memtest.bin memtest.packed |
pascal@17227 | 32 mv memtest.bin memtest.bin.console |
pascal@14796 | 33 sed -i -e 's/SERIAL_CONSOLE_DEFAULT 0/SERIAL_CONSOLE_DEFAULT 1/' \ |
pascal@14796 | 34 -e 's/SERIAL_BAUD_RATE 9600/SERIAL_BAUD_RATE 115200/' config.h |
pascal@14796 | 35 make clean |
pascal@14796 | 36 make |
pascal@14796 | 37 ./pack memtest.bin memtest.packed-115200 |
pascal@17227 | 38 mv memtest.bin memtest.bin.serial |
pascal@524 | 39 } |
pascal@524 | 40 |
pascal@524 | 41 |
pascal@524 | 42 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@524 | 43 genpkg_rules() |
pascal@524 | 44 { |
pascal@20042 | 45 mkdir -p $fs/boot $install/usr/share/doc |
pascal@20042 | 46 cp $src/README* $install/usr/share/doc |
pascal@20042 | 47 cp $src/FAQ $install/usr/share/doc |
pascal@20210 | 48 cp $src/memtest.packed $fs/boot/memtest.exe |
pascal@524 | 49 } |
pascal@20210 | 50 |
pascal@20210 | 51 # Pre and post install commands for Tazpkg. |
pascal@20210 | 52 post_install() |
pascal@20210 | 53 { |
pascal@20210 | 54 [ -s $1/boot/isolinux/isolinux.cfg ] && |
pascal@20210 | 55 ! grep -qs 'Check memory' $1/boot/isolinux/isolinux.cfg && sed -i \ |
pascal@20210 | 56 's|LABEL md5|LABEL memtest mem ram\ |
pascal@20210 | 57 MENU LABEL Check memory\ |
pascal@20210 | 58 KERNEL /boot/memtest.exe\ |
pascal@20210 | 59 \n&|' $1/boot/isolinux/isolinux.cfg |
pascal@20219 | 60 true |
pascal@20210 | 61 } |