wok-6.x view wiringpi/receipt @ rev 16541
openbox-imlib2: tiny typo
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Tue Apr 29 09:06:33 2014 +0000 (2014-04-29) |
parents | 84d4534a5de3 |
children | ebe935a13106 |
line source
1 # SliTaz package receipt.
3 PACKAGE="wiringpi"
4 GITHASH="f18c8f7204d6354220fd6754578b3daa43734e1b"
5 VERSION="${GITHASH:0:7}"
6 CATEGORY="system-tools"
7 SHORT_DESC="GPIO access library written in C for the Raspberry Pi/BCM2835."
8 MAINTAINER="pankso@slitaz.org"
9 LICENSE="LGPL"
10 TARBALL="$PACKAGE-$VERSION.tar.bz2"
11 WEB_SITE="http://wiringpi.com/"
12 WGET_URL="git|git://git.drogon.net/wiringPi"
13 TAGS="raspberrypi rpi"
14 HOST_ARCH="arm"
16 RELATED="wiringpi-dev wiringpi-piglow"
18 # Rules to configure and make the package.
19 compile_rules()
20 {
21 # Fixes: fancy paths in Makefile and do sym link manually
22 sed -i \
23 -e s"#CC = gcc#CC = ${HOST_SYSTEM}-gcc#" \
24 -e s"#DESTDIR=.*#DESTDIR=$DESTDIR#" \
25 -e s"#PREFIX=.*#PREFIX=/usr#" */Makefile
27 # First: WiringPi Library
28 cd ${src}/wiringPi
29 make || return 1
30 sed -i '/libwiringPi.so$/'d Makefile
31 make install && cd ${DESTDIR}/usr/lib
32 ln -s libwiringPi.so.2.0 libwiringPi.so
34 # Second: Devices Library
35 cd ${src}/devLib
36 sed -i \
37 -e s'#^INCLUDE.*#INCLUDE = -I. -I${DESTDIR}/usr/include#' \
38 -e '/libwiringPiDev.so$/'d Makefile
39 make || return 1
40 make install && cd ${DESTDIR}/usr/lib
41 ln -s libwiringPiDev.so.2.0 libwiringPiDev.so
43 # Last: GPIO Utility
44 cd ${src}/gpio
45 patch -p0 < ${stuff}/gpio-decodePin.patch
46 mkdir -p ${DESTDIR}/usr/bin
47 make && make install
49 # Extra: PiGlow --> wiringpi-piglow
50 cd ${src}/examples/PiGlow
51 sed -i \
52 -e s'#^INCLUDE.*#INCLUDE = -I. -I${DESTDIR}/usr/include#' \
53 -e s'#^LDFLAGS.*#LDFLAGS= -L${DESTDIR}/usr/lib#' \
54 -e s"#^CC.*#CC = ${HOST_SYSTEM}-gcc#" Makefile
55 make
56 }
58 # SliTaz package testsuite
59 testsuite() {
60 readelf -Ah ${install}/usr/bin/gpio || return 1
61 }
63 # Rules to gen a SliTaz package suitable for Tazpkg.
64 genpkg_rules()
65 {
66 mkdir -p $fs/usr/lib
67 cp -a ${install}/usr/lib/*.so* $fs/usr/lib
68 cp -a ${install}/usr/bin $fs/usr
69 }