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