2012-07-26 15:09:49 +00:00
|
|
|
# Maintainer: Mike Brown <mbrown@archlinuxarm.org>
|
|
|
|
# Maintainer: Kevin Mihelich <kevin@archlinuxarm.org>
|
|
|
|
|
2015-02-05 00:23:46 +00:00
|
|
|
buildarch=20
|
2012-07-26 15:09:49 +00:00
|
|
|
|
|
|
|
_pkgname='wiringPi'
|
2012-07-26 03:28:54 +00:00
|
|
|
pkgname=wiringpi
|
2017-02-10 01:29:56 +00:00
|
|
|
pkgver=103.e687f3f
|
2013-06-13 18:30:23 +00:00
|
|
|
pkgrel=1
|
2012-07-26 03:28:54 +00:00
|
|
|
pkgdesc="WiringPi: An implementation of most of the Arduino Wiring functions for the Raspberry Pi"
|
2016-10-11 00:53:44 +00:00
|
|
|
arch=('arm' 'armv6h' 'armv7h')
|
2013-06-13 18:30:23 +00:00
|
|
|
makedepends=('git')
|
2012-07-26 03:28:54 +00:00
|
|
|
license=('LGPL')
|
2013-06-13 18:30:23 +00:00
|
|
|
url="http://wiringpi.com/"
|
|
|
|
source=("git://git.drogon.net/wiringPi")
|
|
|
|
md5sums=('SKIP')
|
2012-07-26 03:28:54 +00:00
|
|
|
|
2015-01-03 19:30:30 +00:00
|
|
|
pkgver() {
|
|
|
|
cd "${_pkgname}"
|
|
|
|
echo $(git rev-list --count master).$(git rev-parse --short master)
|
|
|
|
}
|
|
|
|
|
2014-04-10 04:09:42 +00:00
|
|
|
prepare() {
|
|
|
|
cd "${_pkgname}"
|
|
|
|
sed -i 's|/usr/local/bin/gpio|/usr/bin/gpio|' wiringPi/wiringPi.c
|
|
|
|
}
|
|
|
|
|
2012-07-26 03:28:54 +00:00
|
|
|
build() {
|
2013-06-13 18:30:23 +00:00
|
|
|
cd "${_pkgname}"
|
2012-07-26 03:28:54 +00:00
|
|
|
|
2013-06-13 18:30:23 +00:00
|
|
|
make -C wiringPi all static
|
|
|
|
make -C devLib all static INCLUDE+="-I${srcdir}/${_pkgname}/wiringPi" LDFLAGS+="-L${srcdir}/${_pkgname}/wiringPi"
|
|
|
|
make -C gpio 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(){
|
2012-07-26 15:09:49 +00:00
|
|
|
cd "${srcdir}/${_pkgname}/wiringPi"
|
|
|
|
install -m 0755 -d "${pkgdir}/usr/lib"
|
|
|
|
install -m 0755 -d "${pkgdir}/usr/include"
|
2013-06-13 18:30:23 +00:00
|
|
|
install -m 0644 *.h "${pkgdir}/usr/include"
|
|
|
|
install -m 0644 libwiringPi.{a,so*} "${pkgdir}/usr/lib"
|
2015-02-05 00:23:46 +00:00
|
|
|
ln -s /usr/lib/libwiringPi.so.2.25 "${pkgdir}/usr/lib/libwiringPi.so"
|
2013-06-13 18:30:23 +00:00
|
|
|
|
|
|
|
cd "${srcdir}/${_pkgname}/devLib"
|
|
|
|
install -m 0644 *.h "${pkgdir}/usr/include"
|
|
|
|
install -m 0644 libwiringPiDev.{a,so*} "${pkgdir}/usr/lib"
|
2015-02-05 00:23:46 +00:00
|
|
|
ln -s /usr/lib/libwiringPiDev.so.2.25 "${pkgdir}/usr/lib/libwiringPiDev.so"
|
2012-07-26 15:09:49 +00:00
|
|
|
|
|
|
|
cd "${srcdir}/${_pkgname}/gpio"
|
|
|
|
install -m 0755 -d "${pkgdir}/usr/bin"
|
2013-06-13 18:30:23 +00:00
|
|
|
install -m 4755 gpio "${pkgdir}/usr/bin"
|
2012-07-26 15:09:49 +00:00
|
|
|
mkdir -p "${pkgdir}/usr/share/man/man1"
|
|
|
|
install -m 0644 gpio.1 "${pkgdir}/usr/share/man/man1/"
|
2012-07-26 03:28:54 +00:00
|
|
|
}
|