wok annotate i2c-tools/receipt @ rev 24336

Add some current_version
author Pascal Bellard <pascal.bellard@slitaz.org>
date Fri Jan 28 18:19:21 2022 +0000 (2022-01-28)
parents aa5746f046ec
children 609e2d2bfc98
rev   line source
pankso@16391 1 # SliTaz package receipt.
pankso@16391 2
pankso@16391 3 PACKAGE="i2c-tools"
Hans-G?nter@21038 4 VERSION="4.1"
pankso@16391 5 CATEGORY="system-tools"
Hans-G?nter@21038 6 SHORT_DESC="The i2c-tools provide a heterogeneous set of I2C tools for Linux."
pankso@16391 7 MAINTAINER="pankso@slitaz.org"
pankso@16391 8 LICENSE="GPL2"
pascal@20673 9 WEB_SITE="https://i2c.wiki.kernel.org/index.php/I2C_Tools"
Hans-G?nter@21038 10
Hans-G?nter@21038 11 TARBALL="$PACKAGE-$VERSION.tar.xz"
Hans-G?nter@21038 12 WGET_URL="https://mirrors.edge.kernel.org/pub/software/utils/$PACKAGE/$TARBALL"
Hans-G?nter@21038 13
pankso@16391 14 HOST_ARCH="i486 arm"
pankso@16391 15
pascal@24336 16 # What is the latest version available today?
pascal@24336 17 current_version()
pascal@24336 18 {
pascal@24336 19 wget -O - ${WGET_URL%/*} 2>/dev/null | \
pascal@24336 20 sed "/latest/d;/$PACKAGE-[0-9]/!d;/tar/!d;s|.*$PACKAGE-\\(.*\\).tar.*\".*|\\1|" | sort -Vr | sed q
pascal@24336 21 }
pascal@24336 22
pankso@16391 23 # Rules to configure and make the package.
pankso@16391 24 compile_rules()
pankso@16391 25 {
pankso@16391 26 sed -i s"#^prefix =.*#prefix = /usr#" Makefile &&
Hans-G?nter@21038 27
Hans-G?nter@21038 28 make -j 1 &&
Hans-G?nter@21038 29 make PREFIX=/usr DESTDIR=$DESTDIR install
pankso@16391 30 }
pankso@16391 31
pankso@16391 32 # Rules to gen a SliTaz package suitable for Tazpkg.
pankso@16391 33 genpkg_rules()
pankso@16391 34 {
pankso@16391 35 mkdir -p $fs/usr
Hans-G?nter@21038 36
Hans-G?nter@21038 37 cp -a $install/usr/bin $fs/usr
Hans-G?nter@21038 38 cp -a $install/usr/sbin $fs/usr
pankso@16391 39 }