Adding package for wiringPi that is used in the SparkFun tutorial.

This commit is contained in:
Mike Brown 2012-07-25 23:28:54 -04:00
parent 06bebfac4b
commit 7f73dd4f8e
3 changed files with 98 additions and 0 deletions

52
alarm/wiringpi/PKGBUILD Normal file
View file

@ -0,0 +1,52 @@
# $Id$
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
plugrel=3
_pkgbase='wiringPi'
pkgname=wiringpi
pkgver=19_Jul_2012
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=(wiringPi.tgz)
md5sums=('b3c6b79c525e0d1db436445f7aabe716')
build() {
cd "${srcdir}/${_pkgbase}/wiringPi"
make
cd "${srcdir}/${_pkgbase}/gpio"
cp ../wiringPi/wiringPi.h ./
make
cd "${srcdir}/${_pkgbase}/examples"
cp ../wiringPi/wiringPi.h ./
make
}
package(){
cd "${srcdir}/${_pkgbase}/wiringPi"
make DESTDIR="${pkgdir}" install
cd "${srcdir}/${_pkgbase}/gpio"
make DESTDIR="${pkgdir}" install
cd "${srcdir}/${_pkgbase}/examples"
install -Dm750 "${srcdir}/wiringPi/examples/test1" "${pkgdir}/root/wiringPi_examples/test1"
install -Dm750 "${srcdir}/wiringPi/examples/test2" "${pkgdir}/root/wiringPi_examples/test2"
install -Dm750 "${srcdir}/wiringPi/examples/speed" "${pkgdir}/root/wiringPi_examples/speed"
install -Dm750 "${srcdir}/wiringPi/examples/lcd" "${pkgdir}/root/wiringPi_examples/lcd"
install -Dm750 "${srcdir}/wiringPi/examples/wfi" "${pkgdir}/root/wiringPi_examples/wfi"
install -Dm750 "${srcdir}/wiringPi/examples/piface" "${pkgdir}/root/wiringPi_examples/piface"
}

BIN
alarm/wiringpi/wiringPi.tgz Normal file

Binary file not shown.

View file

@ -0,0 +1,46 @@
# This is a default template for a post-install scriptlet.
# Uncomment only required functions and remove any functions
# you don't need (and this header).
## arg 1: the new package version
#pre_install() {
# do something here
#}
## arg 1: the new package version
post_install() {
echo ""
echo ""
echo ""
echo "**********************************************************"
echo "The test examples are installed in /root/wiringPi_examples"
echo "**********************************************************"
echo ""
echo ""
echo ""
}
## arg 1: the new package version
## arg 2: the old package version
#pre_upgrade() {
# do something here
#}
## arg 1: the new package version
## arg 2: the old package version
#post_upgrade() {
# do something here
#}
## arg 1: the old package version
#pre_remove() {
# do something here
#}
## arg 1: the old package version
post_remove() {
echo ""
}
# vim:set ts=2 sw=2 et: