PKGBUILDs/alarm/wiringpi/PKGBUILD

52 lines
1.9 KiB
Bash
Raw Normal View History

2012-07-26 15:09:49 +00:00
# Maintainer: Mike Brown <mbrown@archlinuxarm.org>
# Maintainer: Kevin Mihelich <kevin@archlinuxarm.org>
buildarch=2
_pkgname='wiringPi'
pkgname=wiringpi
2012-07-26 15:09:49 +00:00
pkgver=20120726
pkgrel=1
pkgdesc="WiringPi: An implementation of most of the Arduino Wiring functions for the Raspberry Pi"
arch=('arm')
license=('LGPL')
url="https://projects.drogon.net/raspberry-pi/wiringpi/"
install=${pkgname}.install
2012-07-26 15:09:49 +00:00
source=(http://project-downloads.drogon.net/files/${_pkgname}.tgz)
md5sums=('b3c6b79c525e0d1db436445f7aabe716')
build() {
2012-07-26 15:09:49 +00:00
cd "${srcdir}/${_pkgname}/wiringPi"
make
2012-07-26 03:46:38 +00:00
2012-07-26 15:09:49 +00:00
cd "${srcdir}/${_pkgname}/gpio"
make INCLUDE+="-I${srcdir}/${_pkgname}/wiringPi" LDFLAGS+="-L${srcdir}/${_pkgname}/wiringPi"
2012-07-26 15:09:49 +00:00
cd "${srcdir}/${_pkgname}/examples"
make INCLUDE+="-I${srcdir}/${_pkgname}/wiringPi" LDFLAGS+="-L${srcdir}/${_pkgname}/wiringPi"
}
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"
install -m 0644 *.h "${pkgdir}/usr/include"
install -m 0644 libwiringPi.a "${pkgdir}/usr/lib"
cd "${srcdir}/${_pkgname}/gpio"
install -m 0755 -d "${pkgdir}/usr/bin"
install -m 4755 gpio "${pkgdir}/usr/bin"
mkdir -p "${pkgdir}/usr/share/man/man1"
install -m 0644 gpio.1 "${pkgdir}/usr/share/man/man1/"
cd "${srcdir}/${_pkgname}/examples"
install -m 0755 -d "${pkgdir}/usr/share/wiringpi/examples"
install -Dm750 "${srcdir}/wiringPi/examples/test1" "${pkgdir}/usr/share/wiringpi/examples/test1"
install -Dm750 "${srcdir}/wiringPi/examples/test2" "${pkgdir}/usr/share/wiringpi/examples/test2"
install -Dm750 "${srcdir}/wiringPi/examples/speed" "${pkgdir}/usr/share/wiringpi/examples/speed"
install -Dm750 "${srcdir}/wiringPi/examples/lcd" "${pkgdir}/usr/share/wiringpi/examples/lcd"
install -Dm750 "${srcdir}/wiringPi/examples/wfi" "${pkgdir}/usr/share/wiringpi/examples/wfi"
install -Dm750 "${srcdir}/wiringPi/examples/piface" "${pkgdir}/usr/share/wiringpi/examples/piface"
}