# Maintainer: Kevin Mihelich # Contributor: Mike Brown buildarch=20 pkgname=wiringpi _pkgname=wiringPi pkgver=107.8d188fa pkgrel=1 pkgdesc='GPIO Interface library for the Raspberry Pi' arch=('armv6h' 'armv7h') makedepends=('git') license=('LGPL3') url='http://wiringpi.com/' source=("git://git.drogon.net/wiringPi") md5sums=('SKIP') pkgver() { cd ${_pkgname} echo $(git rev-list --count master).$(git rev-parse --short master) } prepare() { cd ${_pkgname} sed -i 's|/usr/local/bin/gpio|/usr/bin/gpio|' wiringPi/wiringPi.c VERSION=$(cat VERSION) } build() { cd ${_pkgname} make -C wiringPi all make -C devLib all INCLUDE+="-I${srcdir}/${_pkgname}/wiringPi" ln -s "${srcdir}/${_pkgname}/wiringPi/libwiringPi.so.${VERSION}" wiringPi/libwiringPi.so ln -s "${srcdir}/${_pkgname}/devLib/libwiringPiDev.so.${VERSION}" devLib/libwiringPiDev.so make -C gpio INCLUDE+="-I${srcdir}/${_pkgname}/wiringPi -I${srcdir}/${_pkgname}/devLib" LDFLAGS+="-L${srcdir}/${_pkgname}/wiringPi -L${srcdir}/${_pkgname}/devLib" make -C wiringPiD INCLUDE+="-I${srcdir}/${_pkgname}/wiringPi -I${srcdir}/${_pkgname}/devLib" LDFLAGS+="-L${srcdir}/${_pkgname}/wiringPi -L${srcdir}/${_pkgname}/devLib" } package(){ cd ${_pkgname} make LDCONFIG= PREFIX= DESTDIR="${pkgdir}/usr" -C wiringPi install make LDCONFIG= PREFIX= DESTDIR="${pkgdir}/usr" -C devLib install install -d "${pkgdir}/usr/bin" make PREFIX= DESTDIR="${pkgdir}/usr" WIRINGPI_SUID=0 -C gpio install install -m0755 wiringPiD/wiringpid "${pkgdir}/usr/bin" install -Dm644 COPYING.LESSER "$pkgdir/usr/share/licenses/$pkgname/COPYING.LESSER" }