aboutsummaryrefslogtreecommitdiffstats
path: root/community/wiringpi/APKBUILD
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2018-11-01 14:09:03 +0000
committerTimo Teräs <timo.teras@iki.fi>2018-11-01 14:11:43 +0000
commit347d80bc50e6316cedf4d9dcb30b2b8485dd2181 (patch)
tree935fee96de25bf23689c6215366223725471555d /community/wiringpi/APKBUILD
parentcd365db74ba63bc8f1e86587659e863a4175abd2 (diff)
downloadaports-347d80bc50e6316cedf4d9dcb30b2b8485dd2181.tar.bz2
aports-347d80bc50e6316cedf4d9dcb30b2b8485dd2181.tar.xz
community/wiringpi: really upgrade to 2.46, split -dev and modernize
As we are package from git tag, we ended up getting wrong version versus what was advertised. Ship the dynamic libraries, header files, and split -dev. Modernize aport.
Diffstat (limited to 'community/wiringpi/APKBUILD')
-rw-r--r--community/wiringpi/APKBUILD42
1 files changed, 20 insertions, 22 deletions
diff --git a/community/wiringpi/APKBUILD b/community/wiringpi/APKBUILD
index 128777b50b..dc8baa6fea 100644
--- a/community/wiringpi/APKBUILD
+++ b/community/wiringpi/APKBUILD
@@ -1,42 +1,40 @@
# Maintainer: Timo Teräs <timo.teras@iki.fi>
pkgname=wiringpi
pkgver=2.46
-_commitid=5edd177
-pkgrel=0
+_commitid=8d188fa
+pkgrel=1
pkgdesc="command line interface for Raspberry Pi gpio"
url="http://wiringpi.com/the-gpio-utility/"
arch="armhf armv7"
license="LGPL-3.0"
+options="!check" # no testsuite
depends=""
makedepends="linux-headers"
install=""
-subpackages=""
+subpackages="$pkgname-dev"
source="wiringpi-$pkgver.tar.gz::https://git.drogon.net/?p=wiringPi;a=snapshot;h=$_commitid;sf=tgz
"
-_srcdir="$srcdir"/wiringPi-$_commitid
-
-prepare() {
- local i
- cd "$_srcdir"
- for i in $source; do
- case $i in
- *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
- esac
- done
- sed -i -e '/sys\/ioctl/i#include <asm/ioctl.h>' wiringPi/wiringPiSPI.c
-}
+builddir="$srcdir"/wiringPi-$_commitid
build() {
- cd "$_srcdir"
- make -C wiringPi static CFLAGS="$CFLAGS -I." LDFLAGS="$LDFLAGS" || return 1
- make -C devLib static CFLAGS="$CFLAGS -I../wiringPi" LDFLAGS="$LDFLAGS" || return 1
- make -C gpio CFLAGS="$CFLAGS -I../wiringPi -I../devLib" LDFLAGS="$LDFLAGS -L../wiringPi -L../devLib" || return 1
+ cd "$builddir"
+ make -C wiringPi CFLAGS="$CFLAGS -I." LDFLAGS="$LDFLAGS" WIRINGPI_SONAME_SUFFIX=".$pkgver"
+ ln -sf libwiringPi.so.$pkgver wiringPi/libwiringPi.so
+ make -C devLib CFLAGS="$CFLAGS -I../wiringPi" LDFLAGS="$LDFLAGS" WIRINGPI_SONAME_SUFFIX=".$pkgver"
+ ln -sf libwiringPiDev.so.$pkgver devLib/libwiringPiDev.so
+ make -C gpio CFLAGS="$CFLAGS -I../wiringPi -I../devLib" LDFLAGS="$LDFLAGS -L../wiringPi -L../devLib"
}
package() {
- cd "$_srcdir"
- install -D -m755 gpio/gpio "$pkgdir"/usr/bin/gpio || return 1
+ cd "$builddir"
+ install -d -m755 "$pkgdir"/usr/include
+ install -D -m644 wiringPi/*.h devLib/*.h "$pkgdir"/usr/include
+ install -D -m755 wiringPi/libwiringPi.so."$pkgver" "$pkgdir"/usr/lib/libwiringPi.so."$pkgver"
+ ln -s libwiringPi.so."$pkgver" "$pkgdir"/usr/lib/libwiringPi.so
+ install -D -m755 devLib/libwiringPiDev.so."$pkgver" "$pkgdir"/usr/lib/libwiringPiDev.so."$pkgver"
+ ln -s libwiringPiDev.so."$pkgver" "$pkgdir"/usr/lib/libwiringPiDev.so
+ install -D -m755 gpio/gpio "$pkgdir"/usr/bin/gpio
}
-sha512sums="6891ea57e5829772c4567502f6ed93e40e46e0263913df6dd59977016668ebc7457955e34524c1b1838e7ffd64ddf6c5e7d18c16a26b4799d6255cdb32783801 wiringpi-2.46.tar.gz"
+sha512sums="ef46522557968b84534b407670217102bea3e83cff941dfa049220b439923231e3bfd99ec8b93fef0951a019322855afd55c4a5c30f9e07b449b0623669f1efb wiringpi-2.46.tar.gz"