mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-28 22:57:37 +00:00
51 lines
1.7 KiB
Bash
51 lines
1.7 KiB
Bash
# Maintainer: Kevin Mihelich <kevin@archlinuxarm.org>
|
|
# Contributor: Mike Brown <mbrown@archlinuxarm.org>
|
|
|
|
buildarch=20
|
|
|
|
pkgname=wiringpi
|
|
_pkgname=WiringPi
|
|
pkgver=149.50b7c5e
|
|
pkgrel=1
|
|
pkgdesc='GPIO Interface library for the Raspberry Pi'
|
|
arch=('armv6h' 'armv7h')
|
|
makedepends=('git')
|
|
license=('LGPL3')
|
|
url='https://github.com/WiringPi/WiringPi.git'
|
|
source=("git+https://github.com/WiringPi/WiringPi.git")
|
|
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"
|
|
}
|