wok-next annotate wiringpi/receipt @ rev 20663
Fix web site for the Shimmer Project themes
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Thu May 10 22:58:32 2018 +0300 (2018-05-10) |
parents | 819e017f397d |
children |
rev | line source |
---|---|
pascal@20156 | 1 # SliTaz package receipt v2. |
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 |
pascal@20156 | 16 SPLIT="wiringpi wiringpi-dev wiringpi-piglow wiringpi-piface" |
pankso@16512 | 17 |
pankso@16466 | 18 # Rules to configure and make the package. |
pankso@16466 | 19 compile_rules() |
pankso@16466 | 20 { |
pankso@16466 | 21 # Fixes: fancy paths in Makefile and do sym link manually |
pankso@16466 | 22 sed -i \ |
pankso@16466 | 23 -e s"#CC = gcc#CC = ${HOST_SYSTEM}-gcc#" \ |
pankso@16466 | 24 -e s"#DESTDIR=.*#DESTDIR=$DESTDIR#" \ |
pankso@16466 | 25 -e s"#PREFIX=.*#PREFIX=/usr#" */Makefile |
pankso@16466 | 26 |
pankso@16466 | 27 # First: WiringPi Library |
pankso@16466 | 28 cd ${src}/wiringPi |
pankso@16466 | 29 make || return 1 |
pankso@16466 | 30 sed -i '/libwiringPi.so$/'d Makefile |
pankso@16466 | 31 make install && cd ${DESTDIR}/usr/lib |
pankso@16466 | 32 ln -s libwiringPi.so.2.0 libwiringPi.so |
pankso@16466 | 33 |
pankso@16466 | 34 # Second: Devices Library |
pankso@16466 | 35 cd ${src}/devLib |
pankso@16466 | 36 sed -i \ |
pankso@16466 | 37 -e s'#^INCLUDE.*#INCLUDE = -I. -I${DESTDIR}/usr/include#' \ |
pankso@16466 | 38 -e '/libwiringPiDev.so$/'d Makefile |
pankso@16466 | 39 make || return 1 |
pankso@16466 | 40 make install && cd ${DESTDIR}/usr/lib |
pankso@16466 | 41 ln -s libwiringPiDev.so.2.0 libwiringPiDev.so |
pankso@16466 | 42 |
pankso@16466 | 43 # Last: GPIO Utility |
pankso@16466 | 44 cd ${src}/gpio |
pankso@16466 | 45 patch -p0 < ${stuff}/gpio-decodePin.patch |
pankso@16466 | 46 mkdir -p ${DESTDIR}/usr/bin |
pankso@16466 | 47 make && make install |
pankso@16512 | 48 |
pankso@16512 | 49 # Extra: PiGlow --> wiringpi-piglow |
pankso@16631 | 50 echo "Compiling PiGlow example..." |
pankso@16512 | 51 cd ${src}/examples/PiGlow |
pankso@16512 | 52 sed -i \ |
pankso@16512 | 53 -e s'#^INCLUDE.*#INCLUDE = -I. -I${DESTDIR}/usr/include#' \ |
pankso@16512 | 54 -e s'#^LDFLAGS.*#LDFLAGS= -L${DESTDIR}/usr/lib#' \ |
pankso@16512 | 55 -e s"#^CC.*#CC = ${HOST_SYSTEM}-gcc#" Makefile |
pankso@16512 | 56 make |
pankso@16631 | 57 |
pankso@16631 | 58 # Extra: PiFace --> wiringpi-piface |
pankso@16631 | 59 cd ${src}/examples/PiFace |
pankso@16631 | 60 sed -i \ |
pankso@16631 | 61 -e s'#^INCLUDE.*#INCLUDE = -I. -I${DESTDIR}/usr/include#' \ |
pankso@16631 | 62 -e s'#^LDFLAGS.*#LDFLAGS= -L${DESTDIR}/usr/lib#' \ |
pankso@16631 | 63 -e s"#^CC.*#CC = ${HOST_SYSTEM}-gcc#" Makefile |
pankso@16631 | 64 make |
pankso@16466 | 65 } |
pankso@16466 | 66 |
pankso@16466 | 67 # SliTaz package testsuite |
pankso@16466 | 68 testsuite() { |
pankso@16466 | 69 readelf -Ah ${install}/usr/bin/gpio || return 1 |
pankso@16466 | 70 } |
pankso@16466 | 71 |
pankso@16466 | 72 # Rules to gen a SliTaz package suitable for Tazpkg. |
pankso@16466 | 73 genpkg_rules() |
pankso@16466 | 74 { |
pascal@20156 | 75 case $PACKAGE in |
pascal@20156 | 76 wiringpi) |
pascal@20156 | 77 mkdir -p $fs/usr/lib |
pascal@20156 | 78 cp -a ${install}/usr/lib/*.so* $fs/usr/lib |
pascal@20156 | 79 cp -a ${install}/usr/bin $fs/usr |
pascal@20156 | 80 ;; |
pascal@20156 | 81 wiringpi-dev) |
pascal@20156 | 82 CAT="system-tools|The WiringPi headers files." |
pascal@20156 | 83 TAGS="raspberrypi rpi" |
pascal@20156 | 84 HOST_ARCH="arm" |
pascal@20156 | 85 mkdir -p $fs/usr |
pascal@20156 | 86 cp -a ${install}/usr/include $fs/usr |
pascal@20156 | 87 ;; |
pascal@20156 | 88 wiringpi-piface) |
pascal@20156 | 89 CAT="system-tools|The WiringPi PiFace examples." |
pascal@20156 | 90 TAGS="raspberrypi rpi" |
pascal@20156 | 91 HOST_ARCH="arm" |
pascal@20156 | 92 mkdir -p $fs/usr/lib/wiringpi/piface |
pascal@20156 | 93 cd ${src}/examples/PiFace |
pascal@20156 | 94 for ex in $(ls *.c) |
pascal@20156 | 95 do |
pascal@20156 | 96 cp -a ${ex%.c} $fs/usr/lib/wiringpi/piface/${ex%.c} |
pascal@20156 | 97 done |
pascal@20156 | 98 ;; |
pascal@20156 | 99 wiringpi-piglow) |
pascal@20156 | 100 CAT="system-tools|The WiringPi Piglow utility (useful for SHell scripts)." |
pascal@20156 | 101 WEB_SITE="http://wiringpi.com/" |
pascal@20156 | 102 TAGS="raspberrypi rpi" |
pascal@20156 | 103 HOST_ARCH="arm" |
pascal@20156 | 104 mkdir -p $fs/usr/bin |
pascal@20156 | 105 cp -a ${src}/examples/PiGlow/piglow $fs/usr/bin |
pascal@20156 | 106 ;; |
pascal@20156 | 107 esac |
pankso@16466 | 108 } |