PKGBUILDs/alarm/wiringpi/PKGBUILD
2012-07-26 11:09:49 -04:00

51 lines
1.9 KiB
Bash

# Maintainer: Mike Brown <mbrown@archlinuxarm.org>
# Maintainer: Kevin Mihelich <kevin@archlinuxarm.org>
buildarch=2
_pkgname='wiringPi'
pkgname=wiringpi
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
source=(http://project-downloads.drogon.net/files/${_pkgname}.tgz)
md5sums=('b3c6b79c525e0d1db436445f7aabe716')
build() {
cd "${srcdir}/${_pkgname}/wiringPi"
make
cd "${srcdir}/${_pkgname}/gpio"
make INCLUDE+="-I${srcdir}/${_pkgname}/wiringPi" LDFLAGS+="-L${srcdir}/${_pkgname}/wiringPi"
cd "${srcdir}/${_pkgname}/examples"
make INCLUDE+="-I${srcdir}/${_pkgname}/wiringPi" LDFLAGS+="-L${srcdir}/${_pkgname}/wiringPi"
}
package(){
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"
}