Patrick Williams | 8b8bc41 | 2016-08-17 15:02:23 -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 | |
| 8 | LICENSE = "GPLv2" |
| 9 | LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" |
| 10 | |
| 11 | COMPATIBLE_MACHINE = "raspberrypi" |
| 12 | |
| 13 | SRC_URI = "http://www.airspayce.com/mikem/bcm2835/bcm2835-${PV}.tar.gz" |
| 14 | |
| 15 | SRC_URI[md5sum] = "3a40c01ee7d81fbff80c54fbe1a351b5" |
| 16 | SRC_URI[sha256sum] = "fc6b0412525e6b7e85aeffec67e2d01a99fb906346620041e6684d59ea5517a7" |
| 17 | |
| 18 | inherit autotools |
| 19 | |
| 20 | do_compile_append() { |
| 21 | # Now compiling the examples provided by the package |
| 22 | mkdir -p ${B}/examples |
| 23 | for file in `ls ${S}/examples`; do |
| 24 | ${CC} ${S}/examples/${file}/${file}.c -o ${B}/examples/${file} -Bstatic -L${B}/src -lbcm2835 -I${S}/src |
| 25 | done |
| 26 | } |
| 27 | |
| 28 | do_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 | |
| 36 | PACKAGES += "${PN}-tests" |
| 37 | |
| 38 | FILES_${PN} = "" |
| 39 | FILES_${PN}-tests = "${libdir}/${BPN}" |
| 40 | FILES_${PN}-dbg += "${libdir}/${BPN}/.debug" |