wok-current annotate libmcp23s17/receipt @ rev 24145

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