# SliTaz package receipt. PACKAGE="flashrom" VERSION="1.2" CATEGORY="misc" SHORT_DESC="Utility for reading, writing, erasing and verifying flash ROM chips." MAINTAINER="pascal.bellard@slitaz.org" LICENSE="GPL2" WEB_SITE="https://flashrom.org/Flashrom" TARBALL="$PACKAGE-v$VERSION.tar.bz2" WGET_URL="https://download.flashrom.org/releases/$TARBALL" DEPENDS="libftdi libusb pciutils" BUILD_DEPENDS="libftdi-dev libusb-dev pciutils-dev zlib-dev" HOST_ARCH="i486" # What is the latest version available today? current_version() { wget -O - ${WGET_URL%/*} 2>/dev/null | \ sed "/latest/d;/$PACKAGE-[v0-9]/!d;/tar/!d;s|.*$PACKAGE-v*\\(.*\\).tar.*|\\1|" | sort -Vr | sed q } # Rules to configure and make the package. compile_rules() { sed -i 's|.*libusb_set_debug.*\( 3.*\)|#if LIBUSB_API_VERSION >= 0x01000106\ libusb_set_option(NULL, LIBUSB_OPTION_LOG_LEVEL,\1\n#else\n&\n#endif|' \ ch341a_spi.c sed -i 's|uname -m|echo i486|' \ Makefile make PREFIX=/usr && make install PREFIX=/usr DESTDIR=$DESTDIR } # Rules to gen a SliTaz package suitable for Tazpkg. genpkg_rules() { cook_copy_folders sbin }