Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 1 | DESCRIPTION = "Package that provides access to GPIO and other IO\ |
| 2 | functions on the Broadcom BCM 2835 chip, allowing access to the\ |
| 3 | GPIO pins on the 26 pin IDE plug on the RPi board" |
| 4 | SECTION = "base" |
| 5 | HOMEPAGE = "http://www.open.com.au/mikem/bcm2835" |
| 6 | AUTHOR = "Mike McCauley (mikem@open.com.au)" |
| 7 | |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame^] | 8 | LICENSE = "GPL-2.0-only" |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 9 | LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" |
| 10 | |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 11 | COMPATIBLE_MACHINE = "^rpi$" |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 12 | |
| 13 | SRC_URI = "http://www.airspayce.com/mikem/bcm2835/bcm2835-${PV}.tar.gz" |
| 14 | |
| 15 | SRC_URI[md5sum] = "b5dc426b4ff258bb1397442f98e40236" |
| 16 | SRC_URI[sha256sum] = "b9fd10f7a80aadaed28a77168709b7c519568a63b6e98d0a50e9c5fe31bea6bb" |
| 17 | |
| 18 | inherit autotools |
| 19 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 20 | do_compile:append() { |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 21 | # Now compiling the examples provided by the package |
| 22 | mkdir -p ${B}/examples |
| 23 | for file in `ls ${S}/examples`; do |
| 24 | ${CC} ${LDFLAGS} ${S}/examples/${file}/${file}.c -o ${B}/examples/${file} -Bstatic -L${B}/src -lbcm2835 -I${S}/src |
| 25 | done |
| 26 | } |
| 27 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 28 | do_install:append() { |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 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 | |
| 36 | PACKAGES += "${PN}-tests" |
| 37 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 38 | RDEPENDS:${PN}-dev = "" |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 39 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 40 | FILES:${PN} = "" |
| 41 | FILES:${PN}-tests = "${libdir}/${BPN}" |
| 42 | FILES:${PN}-dbg += "${libdir}/${BPN}/.debug" |