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
|
|
|
|
2021-03-28 15:35:35 +00:00
|
|
|
buildarch=28
|
2012-07-26 15:09:49 +00:00
|
|
|
|
2012-07-26 03:28:54 +00:00
|
|
|
pkgname=wiringpi
|
2020-04-26 23:01:58 +00:00
|
|
|
_pkgname=WiringPi
|
|
|
|
pkgver=149.50b7c5e
|
2019-03-15 00:11:55 +00:00
|
|
|
pkgrel=1
|
2018-03-15 00:52:40 +00:00
|
|
|
pkgdesc='GPIO Interface library for the Raspberry Pi'
|
2021-03-28 15:35:35 +00:00
|
|
|
arch=('armv6h' 'armv7h' 'aarch64')
|
2013-06-13 18:30:23 +00:00
|
|
|
makedepends=('git')
|
2018-03-15 00:52:40 +00:00
|
|
|
license=('LGPL3')
|
2020-04-26 23:01:58 +00:00
|
|
|
url='https://github.com/WiringPi/WiringPi.git'
|
|
|
|
source=("git+https://github.com/WiringPi/WiringPi.git")
|
2013-06-13 18:30:23 +00:00
|
|
|
md5sums=('SKIP')
|
2012-07-26 03:28:54 +00:00
|
|
|
|
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)
|
|
|
|
}
|
|
|
|
|
2014-04-10 04:09:42 +00:00
|
|
|
prepare() {
|
2018-03-15 00:52:40 +00:00
|
|
|
cd ${_pkgname}
|
2014-04-10 04:09:42 +00:00
|
|
|
sed -i 's|/usr/local/bin/gpio|/usr/bin/gpio|' wiringPi/wiringPi.c
|
2018-03-15 00:52:40 +00:00
|
|
|
VERSION=$(cat VERSION)
|
2014-04-10 04:09:42 +00:00
|
|
|
}
|
|
|
|
|
2012-07-26 03:28:54 +00:00
|
|
|
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
|
2012-07-26 03:28:54 +00:00
|
|
|
|
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"
|
2012-07-26 03:28:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
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"
|
2018-05-05 22:36:06 +00:00
|
|
|
make PREFIX= DESTDIR="${pkgdir}/usr" WIRINGPI_SUID=1 -C gpio install
|
2018-03-15 00:52:40 +00:00
|
|
|
install -m0755 wiringPiD/wiringpid "${pkgdir}/usr/bin"
|
|
|
|
install -Dm644 COPYING.LESSER "$pkgdir/usr/share/licenses/$pkgname/COPYING.LESSER"
|
2012-07-26 03:28:54 +00:00
|
|
|
}
|