PKGBUILDs/alarm/wiringpi/PKGBUILD

62 lines
3 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>
2012-10-13 22:13:50 +00:00
buildarch=18
2012-07-26 15:09:49 +00:00
_pkgname='wiringPi'
pkgname=wiringpi
2012-07-26 15:09:49 +00:00
pkgver=20120726
pkgrel=2
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"
install -m 0755 -d "${pkgdir}/usr/share/wiringpi/examples/source_code"
install -Dm644 "${srcdir}/wiringPi/examples/test1.c" "${pkgdir}/usr/share/wiringpi/examples/source_code/test1.c"
install -Dm644 "${srcdir}/wiringPi/examples/test2.c" "${pkgdir}/usr/share/wiringpi/examples/source_code/test2.c"
install -Dm644 "${srcdir}/wiringPi/examples/speed.c" "${pkgdir}/usr/share/wiringpi/examples/source_code/speed.c"
install -Dm644 "${srcdir}/wiringPi/examples/lcd.c" "${pkgdir}/usr/share/wiringpi/examples/source_code/lcd.c"
install -Dm644 "${srcdir}/wiringPi/examples/wfi.c" "${pkgdir}/usr/share/wiringpi/examples/source_code/wfi.c"
install -Dm644 "${srcdir}/wiringPi/examples/piface.c" "${pkgdir}/usr/share/wiringpi/examples/source_code/piface.c"
install -Dm644 "${srcdir}/wiringPi/examples/Makefile" "${pkgdir}/usr/share/wiringpi/examples/source_code/Makefile"
install -Dm644 "${srcdir}/wiringPi/examples/COPYING.LESSER" "${pkgdir}/usr/share/wiringpi/examples/source_code/COPYING.LESSER"
install -Dm644 "${srcdir}/wiringPi.tgz" "${pkgdir}/usr/share/wiringpi/examples/source_code/wiringPi.tgz"
}