wok view libpifacedigital/receipt @ rev 24447

Add some current_version
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon Feb 14 17:51:14 2022 +0000 (2022-02-14)
parents 2f2f071b10df
children 59547e97954f
line source
1 # SliTaz package receipt.
3 PACKAGE="libpifacedigital"
4 VERSION="0.2.0"
5 CATEGORY="system-tools"
6 SHORT_DESC="A simple library for controlling PiFace Digital."
7 MAINTAINER="pankso@slitaz.org"
8 LICENSE="GPL"
9 TARBALL="$PACKAGE-$VERSION.tar.gz"
10 WEB_SITE="http://www.piface.org.uk"
11 WGET_URL="https://github.com/piface/libpifacedigital/archive/v${VERSION}.tar.gz"
12 HOST_ARCH="arm"
14 TAGS="raspberrypi rpi"
15 DEPENDS="i2c-tools libmcp23s17"
16 BUILD_DEPENDS="libmcp23s17"
18 current_version()
19 {
20 wget -O - ${WGET_URL%/arch*}/releases 2>/dev/null | \
21 sed '/archive.*tar/!d;s|.*/v\(.*\).tar.*|\1|;q'
22 }
24 # Rules to configure and make the package.
25 compile_rules()
26 {
27 sed -i \
28 -e s"/^CC=gcc/CC=${HOST_SYSTEM}-gcc/" \
29 -e s"/gcc -o/${HOST_SYSTEM}-gcc -o/" \
30 -e s"/^CFLAGS=.*/CFLAGS=-c -Wall $CFLAGS/" \
31 -e s"#INCPATHS=.*#INCPATHS=/usr/include#" \
32 -e s"#LIBPATHS=.*#LIBPATHS=/usr/lib#" Makefile
33 make && make example &&
34 make pifacedigital
35 }
37 # Rules to gen a SliTaz package suitable for Tazpkg.
38 genpkg_rules()
39 {
40 mkdir -p $fs/usr/lib $fs/usr/bin $fs/usr/include
41 cp -a ${src}/${PACKAGE}.a ${fs}/usr/lib
42 cp -a ${src}/pifacedigital ${fs}/usr/bin
43 cp -a ${src}/example ${fs}/usr/bin/pifacedigital-test
44 cp -a ${src}/src/pifacedigital.h ${fs}/usr/include
45 }