summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorNiels Martignène2015-06-12 19:43:07 +0200
committerNiels Martignène2015-06-12 19:43:07 +0200
commit877a25d0a0de28ee324e20fd59733e9fc4f9b6b4 (patch)
tree97ed8d667eab946148a0fbc9761d60f87b187d39
downloadaur-877a25d0a0de28ee324e20fd59733e9fc4f9b6b4.tar.gz
Initial import
-rw-r--r--.SRCINFO22
-rw-r--r--PKGBUILD59
-rw-r--r--disable-hidtest.patch11
3 files changed, 92 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..01bb081a1f21
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,22 @@
+pkgbase = mingw-w64-hidapi
+ pkgdesc = Simple library for communicating with USB and Bluetooth HID devices (mingw-w64)
+ pkgver = 0.8.0rc1
+ pkgrel = 2
+ url = http://www.signal11.us/oss/hidapi/
+ arch = any
+ license = GPL3
+ license = BSD
+ license = custom
+ makedepends = mingw-w64-gcc
+ depends = mingw-w64-crt
+ options = staticlibs
+ options = !makeflags
+ options = !strip
+ options = !buildflags
+ source = https://github.com/signal11/hidapi/archive/hidapi-0.8.0-rc1.tar.gz
+ source = disable-hidtest.patch
+ md5sums = 069f9dd746edc37b6b6d0e3656f47199
+ md5sums = ba66138154dba31f7ed17eb17dbf0cc7
+
+pkgname = mingw-w64-hidapi
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..c2270e0ed9bf
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,59 @@
+# Maintainer: Niels Martignène <niels.martignene@gmail.com>
+
+pkgname=mingw-w64-hidapi
+pkgver=0.8.0rc1
+_hidapiver=0.8.0-rc1
+pkgrel=2
+pkgdesc="Simple library for communicating with USB and Bluetooth HID devices (mingw-w64)"
+arch=(any)
+url="http://www.signal11.us/oss/hidapi/"
+license=('GPL3' 'BSD' 'custom')
+depends=('mingw-w64-crt')
+makedepends=('mingw-w64-gcc')
+options=('staticlibs' '!makeflags' '!strip' '!buildflags')
+source=("https://github.com/signal11/hidapi/archive/hidapi-$_hidapiver.tar.gz"
+ 'disable-hidtest.patch')
+md5sums=('069f9dd746edc37b6b6d0e3656f47199'
+ 'ba66138154dba31f7ed17eb17dbf0cc7')
+
+_architectures=('i686-w64-mingw32' 'x86_64-w64-mingw32')
+
+prepare() {
+ cd "${srcdir}/hidapi-hidapi-${_hidapiver}"
+
+ patch -Np1 <"${srcdir}/disable-hidtest.patch"
+}
+
+build() {
+ unset LDFLAGS
+ cd "${srcdir}/hidapi-hidapi-${_hidapiver}"
+
+ ./bootstrap
+ for _arch in "${_architectures[@]}"; do
+ mkdir -p build-${_arch}
+ pushd build-${_arch}
+
+ ../configure --prefix=/usr/${_arch} --host=${_arch}
+ make
+
+ popd
+ done
+}
+
+package () {
+ cd "${srcdir}/hidapi-hidapi-${_hidapiver}"
+
+ for _arch in "${_architectures[@]}"; do
+ pushd build-${_arch}
+
+ make install DESTDIR="${pkgdir}/"
+ rm -rf "${pkgdir}/usr/${_arch}/share"
+ ${_arch}-strip --strip-unneeded "${pkgdir}/usr/${_arch}/bin/"*.dll
+ ${_arch}-strip -g "${pkgdir}/usr/${_arch}/lib/"*.a
+
+ popd
+ done
+
+ mkdir -p "${pkgdir}/usr/share/licenses/${pkgname}"
+ install -m644 LICENSE.txt LICENSE-bsd.txt LICENSE-orig.txt "${pkgdir}/usr/share/licenses/${pkgname}/"
+}
diff --git a/disable-hidtest.patch b/disable-hidtest.patch
new file mode 100644
index 000000000000..1fdf17826920
--- /dev/null
+++ b/disable-hidtest.patch
@@ -0,0 +1,11 @@
+--- a/Makefile.am 2013-10-07 00:43:37.000000000 +0200
++++ b/Makefile.am 2014-01-12 16:45:43.463262352 +0100
+@@ -31,8 +31,6 @@
+ SUBDIRS += windows
+ endif
+
+-SUBDIRS += hidtest
+-
+ if BUILD_TESTGUI
+ SUBDIRS += testgui
+ endif