PKGBUILDs/alarm/wiringpi/PKGBUILD

52 lines
1.6 KiB
Bash
Raw Normal View History

2012-07-26 15:09:49 +00:00
# Maintainer: Kevin Mihelich <kevin@archlinuxarm.org>
2018-03-15 00:52:40 +00:00
# Contributor: Mike Brown <mbrown@archlinuxarm.org>
2012-07-26 15:09:49 +00:00
2015-02-05 00:23:46 +00:00
buildarch=20
2012-07-26 15:09:49 +00:00
pkgname=wiringpi
2018-03-15 00:52:40 +00:00
_pkgname=wiringPi
pkgver=107.8d188fa
2013-06-13 18:30:23 +00:00
pkgrel=1
2018-03-15 00:52:40 +00:00
pkgdesc='GPIO Interface library for the Raspberry Pi'
2017-03-08 02:01:38 +00:00
arch=('armv6h' 'armv7h')
2013-06-13 18:30:23 +00:00
makedepends=('git')
2018-03-15 00:52:40 +00:00
license=('LGPL3')
url='http://wiringpi.com/'
2013-06-13 18:30:23 +00:00
source=("git://git.drogon.net/wiringPi")
md5sums=('SKIP')
2015-01-03 19:30:30 +00:00
pkgver() {
2018-03-15 00:52:40 +00:00
cd ${_pkgname}
2015-01-03 19:30:30 +00:00
echo $(git rev-list --count master).$(git rev-parse --short master)
}
prepare() {
2018-03-15 00:52:40 +00:00
cd ${_pkgname}
sed -i 's|/usr/local/bin/gpio|/usr/bin/gpio|' wiringPi/wiringPi.c
2018-03-15 00:52:40 +00:00
VERSION=$(cat VERSION)
}
build() {
2018-03-15 00:52:40 +00:00
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
2013-06-13 18:30:23 +00:00
make -C gpio INCLUDE+="-I${srcdir}/${_pkgname}/wiringPi -I${srcdir}/${_pkgname}/devLib" LDFLAGS+="-L${srcdir}/${_pkgname}/wiringPi -L${srcdir}/${_pkgname}/devLib"
2018-03-15 00:52:40 +00:00
make -C wiringPiD INCLUDE+="-I${srcdir}/${_pkgname}/wiringPi -I${srcdir}/${_pkgname}/devLib" LDFLAGS+="-L${srcdir}/${_pkgname}/wiringPi -L${srcdir}/${_pkgname}/devLib"
}
package(){
2018-03-15 00:52:40 +00:00
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"
}