wok-current annotate wiringpi/receipt @ rev 24557
updated fltk packages (1.3.5 -> 1.3.8)
author | Hans-G?nter Theisgen |
---|---|
date | Fri Feb 25 15:09:26 2022 +0100 (2022-02-25) |
parents | 819e017f397d |
children |
rev | line source |
---|---|
pankso@16466 | 1 # SliTaz package receipt. |
pankso@16466 | 2 |
pankso@16466 | 3 PACKAGE="wiringpi" |
pankso@16466 | 4 GITHASH="f18c8f7204d6354220fd6754578b3daa43734e1b" |
pankso@16466 | 5 VERSION="${GITHASH:0:7}" |
pankso@16466 | 6 CATEGORY="system-tools" |
pankso@16466 | 7 SHORT_DESC="GPIO access library written in C for the Raspberry Pi/BCM2835." |
pankso@16466 | 8 MAINTAINER="pankso@slitaz.org" |
pankso@16466 | 9 LICENSE="LGPL" |
pascal@16632 | 10 TARBALL="$PACKAGE-$VERSION.tar.gz" |
pankso@16466 | 11 WEB_SITE="http://wiringpi.com/" |
pankso@16631 | 12 WGET_URL="https://git.drogon.net/?p=wiringPi;a=snapshot;h=${GITHASH};sf=tgz" |
pankso@16512 | 13 TAGS="raspberrypi rpi" |
pankso@16466 | 14 HOST_ARCH="arm" |
pankso@16466 | 15 |
pankso@16631 | 16 RELATED="wiringpi-dev wiringpi-piglow wiringpi-piface" |
pankso@16512 | 17 |
pascal@24465 | 18 # What is the latest version available today? |
pascal@24465 | 19 current_version() |
pascal@24465 | 20 { |
pascal@24465 | 21 wget -O - $WEB_SITE 2>/dev/null | \ |
pascal@24465 | 22 sed '/updated/!d;s|.* to ||;s|[ <].*||;q' |
pascal@24465 | 23 } |
pascal@24465 | 24 |
pankso@16466 | 25 # Rules to configure and make the package. |
pankso@16466 | 26 compile_rules() |
pankso@16466 | 27 { |
pankso@16466 | 28 # Fixes: fancy paths in Makefile and do sym link manually |
pankso@16466 | 29 sed -i \ |
pankso@16466 | 30 -e s"#CC = gcc#CC = ${HOST_SYSTEM}-gcc#" \ |
pankso@16466 | 31 -e s"#DESTDIR=.*#DESTDIR=$DESTDIR#" \ |
pankso@16466 | 32 -e s"#PREFIX=.*#PREFIX=/usr#" */Makefile |
pankso@16466 | 33 |
pankso@16466 | 34 # First: WiringPi Library |
pankso@16466 | 35 cd ${src}/wiringPi |
pankso@16466 | 36 make || return 1 |
pankso@16466 | 37 sed -i '/libwiringPi.so$/'d Makefile |
pankso@16466 | 38 make install && cd ${DESTDIR}/usr/lib |
pankso@16466 | 39 ln -s libwiringPi.so.2.0 libwiringPi.so |
pankso@16466 | 40 |
pankso@16466 | 41 # Second: Devices Library |
pankso@16466 | 42 cd ${src}/devLib |
pankso@16466 | 43 sed -i \ |
pankso@16466 | 44 -e s'#^INCLUDE.*#INCLUDE = -I. -I${DESTDIR}/usr/include#' \ |
pankso@16466 | 45 -e '/libwiringPiDev.so$/'d Makefile |
pankso@16466 | 46 make || return 1 |
pankso@16466 | 47 make install && cd ${DESTDIR}/usr/lib |
pankso@16466 | 48 ln -s libwiringPiDev.so.2.0 libwiringPiDev.so |
pankso@16466 | 49 |
pankso@16466 | 50 # Last: GPIO Utility |
pankso@16466 | 51 cd ${src}/gpio |
pankso@16466 | 52 patch -p0 < ${stuff}/gpio-decodePin.patch |
pankso@16466 | 53 mkdir -p ${DESTDIR}/usr/bin |
pankso@16466 | 54 make && make install |
pankso@16512 | 55 |
pankso@16512 | 56 # Extra: PiGlow --> wiringpi-piglow |
pankso@16631 | 57 echo "Compiling PiGlow example..." |
pankso@16512 | 58 cd ${src}/examples/PiGlow |
pankso@16512 | 59 sed -i \ |
pankso@16512 | 60 -e s'#^INCLUDE.*#INCLUDE = -I. -I${DESTDIR}/usr/include#' \ |
pankso@16512 | 61 -e s'#^LDFLAGS.*#LDFLAGS= -L${DESTDIR}/usr/lib#' \ |
pankso@16512 | 62 -e s"#^CC.*#CC = ${HOST_SYSTEM}-gcc#" Makefile |
pankso@16512 | 63 make |
pankso@16631 | 64 |
pankso@16631 | 65 # Extra: PiFace --> wiringpi-piface |
pankso@16631 | 66 cd ${src}/examples/PiFace |
pankso@16631 | 67 sed -i \ |
pankso@16631 | 68 -e s'#^INCLUDE.*#INCLUDE = -I. -I${DESTDIR}/usr/include#' \ |
pankso@16631 | 69 -e s'#^LDFLAGS.*#LDFLAGS= -L${DESTDIR}/usr/lib#' \ |
pankso@16631 | 70 -e s"#^CC.*#CC = ${HOST_SYSTEM}-gcc#" Makefile |
pankso@16631 | 71 make |
pankso@16466 | 72 } |
pankso@16466 | 73 |
pankso@16466 | 74 # SliTaz package testsuite |
pankso@16466 | 75 testsuite() { |
pankso@16466 | 76 readelf -Ah ${install}/usr/bin/gpio || return 1 |
pankso@16466 | 77 } |
pankso@16466 | 78 |
pankso@16466 | 79 # Rules to gen a SliTaz package suitable for Tazpkg. |
pankso@16466 | 80 genpkg_rules() |
pankso@16466 | 81 { |
pankso@16466 | 82 mkdir -p $fs/usr/lib |
pankso@16466 | 83 cp -a ${install}/usr/lib/*.so* $fs/usr/lib |
pankso@16466 | 84 cp -a ${install}/usr/bin $fs/usr |
pankso@16466 | 85 } |