mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-12-08 23:03:46 +00:00
51 lines
1.6 KiB
Bash
51 lines
1.6 KiB
Bash
# Maintainer: Kevin Mihelich <kevin@archlinuxarm.org>
|
|
# Contributor: Mike Brown <mbrown@archlinuxarm.org>
|
|
|
|
buildarch=20
|
|
|
|
pkgname=wiringpi
|
|
_pkgname=wiringPi
|
|
pkgver=107.8d188fa
|
|
pkgrel=2
|
|
pkgdesc='GPIO Interface library for the Raspberry Pi'
|
|
arch=('armv6h' 'armv7h')
|
|
makedepends=('git')
|
|
license=('LGPL3')
|
|
url='http://wiringpi.com/'
|
|
source=("git://git.drogon.net/wiringPi")
|
|
md5sums=('SKIP')
|
|
|
|
pkgver() {
|
|
cd ${_pkgname}
|
|
echo $(git rev-list --count master).$(git rev-parse --short master)
|
|
}
|
|
|
|
prepare() {
|
|
cd ${_pkgname}
|
|
sed -i 's|/usr/local/bin/gpio|/usr/bin/gpio|' wiringPi/wiringPi.c
|
|
VERSION=$(cat VERSION)
|
|
}
|
|
|
|
build() {
|
|
cd ${_pkgname}
|
|
|
|
make -C wiringPi all
|
|
make -C devLib all INCLUDE+="-I${srcdir}/${_pkgname}/wiringPi"
|
|
|
|
ln -s "${srcdir}/${_pkgname}/wiringPi/libwiringPi.so.${VERSION}" wiringPi/libwiringPi.so
|
|
ln -s "${srcdir}/${_pkgname}/devLib/libwiringPiDev.so.${VERSION}" devLib/libwiringPiDev.so
|
|
|
|
make -C gpio INCLUDE+="-I${srcdir}/${_pkgname}/wiringPi -I${srcdir}/${_pkgname}/devLib" LDFLAGS+="-L${srcdir}/${_pkgname}/wiringPi -L${srcdir}/${_pkgname}/devLib"
|
|
make -C wiringPiD INCLUDE+="-I${srcdir}/${_pkgname}/wiringPi -I${srcdir}/${_pkgname}/devLib" LDFLAGS+="-L${srcdir}/${_pkgname}/wiringPi -L${srcdir}/${_pkgname}/devLib"
|
|
}
|
|
|
|
package(){
|
|
cd ${_pkgname}
|
|
|
|
make LDCONFIG= PREFIX= DESTDIR="${pkgdir}/usr" -C wiringPi install
|
|
make LDCONFIG= PREFIX= DESTDIR="${pkgdir}/usr" -C devLib install
|
|
install -d "${pkgdir}/usr/bin"
|
|
make PREFIX= DESTDIR="${pkgdir}/usr" WIRINGPI_SUID=1 -C gpio install
|
|
install -m0755 wiringPiD/wiringpid "${pkgdir}/usr/bin"
|
|
install -Dm644 COPYING.LESSER "$pkgdir/usr/share/licenses/$pkgname/COPYING.LESSER"
|
|
}
|