wok annotate flashrom/receipt @ rev 24439

Add some current_version
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Feb 13 18:01:32 2022 +0000 (2022-02-13)
parents a4f6d204741c
children e7a02c4f801d
rev   line source
pascal@13591 1 # SliTaz package receipt.
pascal@13591 2
pascal@13591 3 PACKAGE="flashrom"
Hans-G?nter@22761 4 VERSION="1.1"
pascal@13591 5 CATEGORY="misc"
Hans-G?nter@20924 6 SHORT_DESC="Utility for reading, writing, erasing and verifying flash ROM chips."
pascal@13591 7 MAINTAINER="pascal.bellard@slitaz.org"
pascal@15001 8 LICENSE="GPL2"
Hans-G?nter@22761 9 WEB_SITE="https://flashrom.org/Flashrom"
Hans-G?nter@20924 10
Hans-G?nter@22762 11 TARBALL="$PACKAGE-v$VERSION.tar.bz2"
Hans-G?nter@20924 12 WGET_URL="https://download.flashrom.org/releases/$TARBALL"
pascal@13591 13
pascal@13591 14 DEPENDS="pciutils"
Hans-G?nter@20924 15 BUILD_DEPENDS="libftdi-dev libusb-dev pciutils-dev zlib-dev"
Hans-G?nter@22761 16
Hans-G?nter@20924 17 HOST_ARCH="i486"
pascal@13591 18
pascal@24439 19 # What is the latest version available today?
pascal@24439 20 current_version()
pascal@24439 21 {
pascal@24439 22 wget -O - ${WGET_URL%/*} 2>/dev/null | \
pascal@24439 23 sed "/latest/d;/$PACKAGE-[v0-9]/!d;/tar/!d;s|.*$PACKAGE-v*\\(.*\\).tar.*|\\1|" | sort -Vr | sed q
pascal@24439 24 }
pascal@24439 25
pascal@13591 26 # Rules to configure and make the package.
pascal@13591 27 compile_rules()
pascal@13591 28 {
pascal@21421 29 sed -i 's|.*libusb_set_debug.*\( 3.*\)|#if LIBUSB_API_VERSION >= 0x01000106\
pascal@21419 30 libusb_set_option(NULL, LIBUSB_OPTION_LOG_LEVEL,\1\n#else\n&\n#endif|' \
pascal@21413 31 ch341a_spi.c
Hans-G?nter@22761 32 sed -i 's|uname -m|echo i486|' \
Hans-G?nter@22761 33 Makefile
Hans-G?nter@22761 34
Hans-G?nter@20924 35 make -j 1 PREFIX=/usr &&
Hans-G?nter@20924 36 make PREFIX=/usr DESTDIR=$DESTDIR install
pascal@13591 37 }
pascal@13591 38
pascal@13591 39 # Rules to gen a SliTaz package suitable for Tazpkg.
pascal@13591 40 genpkg_rules()
pascal@13591 41 {
pascal@13591 42 mkdir -p $fs/usr
Hans-G?nter@22761 43 cp -a $install/usr/sbin $fs/usr
pascal@13591 44 }