wok-6.x view wiringpi/receipt @ rev 16511
Improve pyglow support
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Thu Apr 24 20:43:02 2014 +0200 (2014-04-24) |
parents | |
children | fe06085e7586 |
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 HOST_ARCH="arm"
15 # Rules to configure and make the package.
16 compile_rules()
17 {
18 # Fixes: fancy paths in Makefile and do sym link manually
19 sed -i \
20 -e s"#CC = gcc#CC = ${HOST_SYSTEM}-gcc#" \
21 -e s"#DESTDIR=.*#DESTDIR=$DESTDIR#" \
22 -e s"#PREFIX=.*#PREFIX=/usr#" */Makefile
24 # First: WiringPi Library
25 cd ${src}/wiringPi
26 make || return 1
27 sed -i '/libwiringPi.so$/'d Makefile
28 make install && cd ${DESTDIR}/usr/lib
29 ln -s libwiringPi.so.2.0 libwiringPi.so
31 # Second: Devices Library
32 cd ${src}/devLib
33 sed -i \
34 -e s'#^INCLUDE.*#INCLUDE = -I. -I${DESTDIR}/usr/include#' \
35 -e '/libwiringPiDev.so$/'d Makefile
36 make || return 1
37 make install && cd ${DESTDIR}/usr/lib
38 ln -s libwiringPiDev.so.2.0 libwiringPiDev.so
40 # Last: GPIO Utility
41 cd ${src}/gpio
42 patch -p0 < ${stuff}/gpio-decodePin.patch
43 mkdir -p ${DESTDIR}/usr/bin
44 make && make install
45 }
47 # SliTaz package testsuite
48 testsuite() {
49 readelf -Ah ${install}/usr/bin/gpio || return 1
50 }
52 # Rules to gen a SliTaz package suitable for Tazpkg.
53 genpkg_rules()
54 {
55 mkdir -p $fs/usr/lib
56 cp -a ${install}/usr/lib/*.so* $fs/usr/lib
57 cp -a ${install}/usr/bin $fs/usr
58 }