wok-next annotate memtest/receipt @ rev 21020
Cleaning is almost finished... I should proceed to upgrades.
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Fri Nov 02 14:15:08 2018 +0200 (2018-11-02) |
parents | 4e6503d7a19f |
children |
rev | line source |
---|---|
pascal@20219 | 1 # SliTaz package receipt v2. |
pascal@524 | 2 |
pascal@524 | 3 PACKAGE="memtest" |
pascal@15468 | 4 VERSION="5.01" |
pascal@524 | 5 CATEGORY="base-system" |
al@20222 | 6 SHORT_DESC="Memory failures detection tool" |
pascal@524 | 7 MAINTAINER="pascal.bellard@slitaz.org" |
pascal@17225 | 8 LICENSE="GPL2" |
al@19601 | 9 WEB_SITE="http://www.memtest.org/" |
al@20884 | 10 REPOLOGY="memtest86+" |
al@20760 | 11 HOST_ARCH="i486" |
al@19601 | 12 |
al@20760 | 13 TARBALL="memtest86+-$VERSION.tar.gz" |
pascal@1734 | 14 WGET_URL="${WEB_SITE}download/$VERSION/$TARBALL" |
pascal@524 | 15 |
al@20222 | 16 BUILD_DEPENDS="xz gcc3" |
al@21020 | 17 SPLIT="$PACKAGE-serial:serial" |
pascal@13269 | 18 |
al@20760 | 19 compile_rules() { |
al@20760 | 20 sed -i '/scp memtest.bin/d; s/gcc/gcc-3/; s/-fno-stack-protector//' Makefile |
pascal@20219 | 21 sed -i 's/0b10/2/' init.c |
al@20661 | 22 |
al@20760 | 23 case $SET in |
al@20760 | 24 '') |
al@20760 | 25 make || return 1 |
al@20760 | 26 cp $stuff/*.S $stuff/pack . |
al@20760 | 27 for i in bootloader unpack; do |
al@20760 | 28 cc -o $i.o -Wa,-a=$i.lst -c $i.S |
al@20760 | 29 objcopy -O binary $i.o $i.bin |
al@20760 | 30 done |
al@20760 | 31 sed -i "s/VERSION/$VERSION/" pack |
al@20760 | 32 ./pack --build bootloader.bin unpack.bin |
al@20760 | 33 ./pack memtest.bin memtest.packed |
al@20760 | 34 mv memtest.bin memtest.bin.console |
pascal@524 | 35 |
al@20760 | 36 install -Dm644 memtest.packed $install/boot/memtest |
al@20760 | 37 ;; |
al@20760 | 38 serial) |
al@20760 | 39 sed -i \ |
al@20760 | 40 -e 's/SERIAL_CONSOLE_DEFAULT 0/SERIAL_CONSOLE_DEFAULT 1/' \ |
al@20760 | 41 -e 's/SERIAL_BAUD_RATE 9600/SERIAL_BAUD_RATE 115200/' config.h |
al@20760 | 42 make clean |
al@20760 | 43 make || return 1 |
al@20760 | 44 ./pack memtest.bin memtest.packed-115200 |
al@20760 | 45 mv memtest.bin memtest.bin.serial |
pascal@524 | 46 |
al@20760 | 47 install -Dm644 memtest.packed-115200 $install/boot/memtest |
al@20760 | 48 ;; |
pascal@20219 | 49 esac |
pascal@524 | 50 } |
pascal@20219 | 51 |
al@20760 | 52 genpkg_rules() { |
al@20760 | 53 case $PACKAGE in |
al@20760 | 54 memtest) |
al@20760 | 55 copy @std |
al@20760 | 56 ;; |
al@20760 | 57 memtest-serial) |
al@20760 | 58 copy @std |
al@20760 | 59 CAT="base-system|using serial port" |
al@20760 | 60 ;; |
al@20760 | 61 esac |
al@20760 | 62 } |
al@20760 | 63 |
al@20760 | 64 post_install_memtest_serial() { |
al@20760 | 65 [ -n "$quiet" ] || cat <<EOT |
al@20760 | 66 |
al@20760 | 67 .------------------------------------------------. |
al@20760 | 68 | Output to vga and serial port. | |
al@20760 | 69 | Default kernel cmdline: console=ttyS0,115200e8 | |
al@20760 | 70 '------------------------------------------------' |
pascal@20219 | 71 EOT |
pascal@20219 | 72 } |