wok annotate python-smbus/receipt @ rev 24459
Add some current_version
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Wed Feb 16 11:53:30 2022 +0000 (2022-02-16) |
parents | 814362194a8d |
children | 1c88796e4a70 |
rev | line source |
---|---|
pankso@16495 | 1 # SliTaz package receipt. |
pankso@16495 | 2 |
pankso@16495 | 3 PACKAGE="python-smbus" |
pankso@16495 | 4 VERSION="3.1.1" |
pankso@16495 | 5 CATEGORY="system-tools" |
pankso@16495 | 6 SHORT_DESC="SMBus access through the I2C /dev interface (from i2c-tools)" |
pankso@16495 | 7 MAINTAINER="pankso@slitaz.org" |
pankso@16495 | 8 LICENSE="GPL2" |
pankso@16495 | 9 SOURCE="i2c-tools" |
pankso@16495 | 10 TARBALL="$SOURCE-$VERSION.tar.bz2" |
pascal@20679 | 11 WEB_SITE="https://git.kernel.org/pub/scm/utils/i2c-tools/i2c-tools.git/about/" |
pankso@16495 | 12 WGET_URL="http://dl.lm-sensors.org/$SOURCE/releases/$TARBALL" |
pankso@16495 | 13 TAGS="python" |
pankso@16495 | 14 HOST_ARCH="i486 arm" |
pankso@16495 | 15 |
pankso@16495 | 16 DEPENDS="python" |
pascal@21582 | 17 BUILD_DEPENDS="python-dev python-setuptools" |
pankso@16495 | 18 |
pascal@24459 | 19 # What is the latest version available today? |
pascal@24459 | 20 current_version() |
pascal@24459 | 21 { |
pascal@24459 | 22 wget -O - https://git.kernel.org/pub/scm/utils/i2c-tools/i2c-tools.git/ 2>/dev/null | \ |
pascal@24459 | 23 sed '/i2c-tools-/!d;/tar/!d;s|.*i2c-tools-||;s|.tar.*||;q' |
pascal@24459 | 24 } |
pascal@24459 | 25 |
pankso@16495 | 26 # Rules to configure and make the package. |
pankso@16495 | 27 compile_rules() |
pankso@16495 | 28 { |
pankso@16495 | 29 # Cross compilation hack |
pankso@16495 | 30 case "$ARCH" in |
pankso@16495 | 31 arm*) |
pankso@16495 | 32 mv /usr/bin/i486-slitaz-linux-gcc /tmp && |
pankso@16495 | 33 ln -s /cross/${ARCH}/tools/bin/arm-slitaz-linux-gnueabi-gcc \ |
pankso@16495 | 34 /usr/bin/i486-slitaz-linux-gcc ;; |
pankso@16495 | 35 esac && |
pankso@16495 | 36 make EXTRA=py-smbus && cd py-smbus && |
pankso@16495 | 37 python setup.py install --root=$DESTDIR |
pankso@16495 | 38 case "$ARCH" in |
pankso@16495 | 39 arm*) |
pankso@16495 | 40 rm /usr/bin/i486-slitaz-linux-gcc && |
pankso@16495 | 41 mv /tmp/i486-slitaz-linux-gcc /usr/bin ;; |
pankso@16495 | 42 esac |
pankso@16495 | 43 } |
pankso@16495 | 44 |
pankso@16495 | 45 # Rules to gen a SliTaz package suitable for Tazpkg. |
pankso@16495 | 46 genpkg_rules() |
pankso@16495 | 47 { |
pankso@16495 | 48 cp -a $install/usr $fs |
pankso@16495 | 49 } |