blob: 9cf6f484f3c27099bd84795a13f7dbc15b0d8f00 [file] [log] [blame]
Patrick Williams8b8bc412016-08-17 15:02:23 -05001DESCRIPTION = "Package that provides access to GPIO and other IO\
2functions on the Broadcom BCM 2835 chip, allowing access to the\
3GPIO pins on the 26 pin IDE plug on the RPi board"
4SECTION = "base"
5HOMEPAGE = "http://www.open.com.au/mikem/bcm2835"
6AUTHOR = "Mike McCauley (mikem@open.com.au)"
7
8LICENSE = "GPLv2"
9LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
10
11COMPATIBLE_MACHINE = "raspberrypi"
12
13SRC_URI = "http://www.airspayce.com/mikem/bcm2835/bcm2835-${PV}.tar.gz"
14
Patrick Williamsb2e6a9b2017-02-23 20:31:26 -060015SRC_URI[md5sum] = "258caf3437012d09a651e1852d0bd60c"
16SRC_URI[sha256sum] = "52180b8a61b6546c1df4aed259d0a4d2fa56e50605e0d4d967a76bf2b23dafb8"
Patrick Williams8b8bc412016-08-17 15:02:23 -050017
18inherit autotools
19
20do_compile_append() {
21 # Now compiling the examples provided by the package
22 mkdir -p ${B}/examples
23 for file in `ls ${S}/examples`; do
Patrick Williamsb2e6a9b2017-02-23 20:31:26 -060024 ${CC} ${LDFLAGS} ${S}/examples/${file}/${file}.c -o ${B}/examples/${file} -Bstatic -L${B}/src -lbcm2835 -I${S}/src
Patrick Williams8b8bc412016-08-17 15:02:23 -050025 done
26}
27
28do_install_append() {
29 install -d ${D}/${libdir}/${BPN}
30 for file in ${B}/examples/*
31 do
32 install -m 0755 ${file} ${D}/${libdir}/${BPN}
33 done
34}
35
36PACKAGES += "${PN}-tests"
37
38FILES_${PN} = ""
39FILES_${PN}-tests = "${libdir}/${BPN}"
40FILES_${PN}-dbg += "${libdir}/${BPN}/.debug"