wok view libmcp23s17/receipt @ rev 24643

updated hg-git (0.8.13 -> 0.10.4)
author Hans-G?nter Theisgen
date Wed Mar 09 17:41:22 2022 +0100 (2022-03-09)
parents 737e56a641f7
children 59547e97954f
line source
1 # SliTaz package receipt.
3 PACKAGE="libmcp23s17"
4 VERSION="0.3.0"
5 CATEGORY="system-tools"
6 SHORT_DESC="A simple C library for accessing an MCP23S17 port expander."
7 MAINTAINER="pankso@slitaz.org"
8 LICENSE="GPL"
9 TARBALL="$PACKAGE-$VERSION.tar.gz"
10 WEB_SITE="https://github.com/piface/libmcp23s17"
11 WGET_URL="https://github.com/piface/libmcp23s17/archive/v${VERSION}.tar.gz"
12 HOST_ARCH="arm"
14 DEPENDS="i2c-tools"
15 TAGS="raspberrypi rpi"
17 current_version()
18 {
19 wget -O - ${WGET_URL%/arch*}/releases 2>/dev/null | \
20 sed '/archive.*tar/!d;s|.*/v\(.*\).tar.*|\1|;q'
21 }
23 # Rules to configure and make the package.
24 compile_rules()
25 {
26 sed -i \
27 -e s"/^CC=gcc/CC=${HOST_SYSTEM}-gcc/" \
28 -e s"/^CFLAGS=.*/CFLAGS=-c -Wall $CFLAGS/" Makefile
29 make &&
30 ${HOST_SYSTEM}-gcc -o mcp23s17-example example.c -Isrc/ -L. -lmcp23s17
31 }
33 # Rules to gen a SliTaz package suitable for Tazpkg.
34 genpkg_rules()
35 {
36 mkdir -p $fs/usr/bin $fs/usr/lib $fs/usr/include
37 cp -a ${src}/*-example $fs/usr/bin
38 cp -a ${src}/${PACKAGE}.a ${fs}/usr/lib
39 cp -a ${src}/src/mcp23s17.h ${fs}/usr/include
40 }