PKGBUILDs/alarm/wiringc1/PKGBUILD

54 lines
1.7 KiB
Bash
Raw Normal View History

2015-01-03 19:43:20 +00:00
# Maintainer: Kevin Mihelich <kevin@archlinuxarm.org>
2016-02-26 02:00:51 +00:00
buildarch=12
2015-01-03 19:43:20 +00:00
_pkgname='wiringPi'
pkgname=wiringc1
2018-06-18 04:18:01 +00:00
pkgver=155.eb609f8
2015-01-03 19:43:20 +00:00
pkgrel=1
2016-02-26 01:46:25 +00:00
pkgdesc="An implementation of most of the Arduino Wiring functions for the ODROID-C1 and C2"
2017-11-22 01:40:20 +00:00
arch=('armv7h' 'aarch64')
2015-01-03 19:43:20 +00:00
makedepends=('git')
license=('LGPL')
url="https://github.com/hardkernel/wiringPi"
source=("git+https://github.com/hardkernel/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
}
build() {
cd "${_pkgname}"
make -C wiringPi all static
make -C devLib all static INCLUDE+="-I${srcdir}/${_pkgname}/wiringPi" LDFLAGS+="-L${srcdir}/${_pkgname}/wiringPi"
make -C gpio INCLUDE+="-I${srcdir}/${_pkgname}/wiringPi -I${srcdir}/${_pkgname}/devLib" LDFLAGS+="-L${srcdir}/${_pkgname}/wiringPi -L${srcdir}/${_pkgname}/devLib"
}
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,so*} "${pkgdir}/usr/lib"
ln -s /usr/lib/libwiringPi.so.2.0 "${pkgdir}/usr/lib/libwiringPi.so"
2015-01-03 19:43:20 +00:00
cd "${srcdir}/${_pkgname}/devLib"
install -m 0644 *.h "${pkgdir}/usr/include"
install -m 0644 libwiringPiDev.{a,so*} "${pkgdir}/usr/lib"
ln -s /usr/lib/libwiringPiDev.so.2.0 "${pkgdir}/usr/lib/libwiringPiDev.so"
2015-01-03 19:43:20 +00:00
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/"
}