summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorsL1pKn072023-01-22 01:34:29 +0100
committersL1pKn072023-01-22 01:37:12 +0100
commitdbf9af6294a900eca973a25d874770d2e7d97a9e (patch)
tree2c037671f03591eb62aaa44492eb873790fb0433
parentfaa374f7bd1b6438c28f50421a4c25d67e0bb684 (diff)
downloadaur-dbf9af6294a900eca973a25d874770d2e7d97a9e.tar.gz
bump
-rw-r--r--.SRCINFO48
-rw-r--r--.gitignore5
-rw-r--r--PKGBUILD126
-rw-r--r--add-libv4l2-module.patch37
-rw-r--r--fix-opencv-headers.patch13
5 files changed, 132 insertions, 97 deletions
diff --git a/.SRCINFO b/.SRCINFO
index eaf55f6d1383..351f68431543 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,28 +1,38 @@
pkgbase = psmoveapi-git
- pkgdesc = Playstation Move Motion Controller API
- pkgver = 4.0.4.r7.ge64a766
+ pkgdesc = Playstation Move Motion Controller API (GIT version)
+ pkgver = 4.0.12.162.g5067d19
pkgrel = 1
- url = http://thp.io/2010/psmove/
- arch = i686
+ url = http://thp.io/2010/psmove
arch = x86_64
license = BSD
+ makedepends = git
makedepends = cmake
- depends = udev
- depends = bluez-libs
- depends = v4l-utils
- depends = opencv
- depends = jdk7-openjdk
- depends = python2
- depends = mono
- depends = swig
- depends = freeglut
- depends = libusb
- source = psmoveapi::git+https://github.com/thp/psmoveapi.git
- source = fix-opencv-headers.patch
+ makedepends = python-sphinx
+ makedepends = udev
+ makedepends = bluez-libs
+ makedepends = libusb-compat
+ options = debug
+ source = git+https://github.com/thp/psmoveapi.git
+ source = git+https://github.com/thp/hidapi.git
+ source = git+https://github.com/inspirit/PS3EYEDriver.git
+ source = git+https://github.com/libusb/libusb.git
source = add-libv4l2-module.patch
- sha1sums = SKIP
- sha1sums = 383b842942af8f5911d23b4950fe4ef4addbaf67
- sha1sums = f81b484bced325b076ea550b47f2bb145f709a45
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = 271eaa3f1f5c50045873f1583ebc38eb6c9451440a7c98de5b75731058901480
pkgname = psmoveapi-git
+ depends = udev
+ depends = bluez-libs
+ depends = libusb-compat
+ provides = psmoveapi
+ conflicts = psmoveapi
+pkgname = python-psmoveapi-git
+ pkgdesc = Python bindings for Playstation Move Motion Controller API (GIT version)
+ depends = psmoveapi-git=4.0.12.162.g5067d19
+ depends = python
+ provides = python-psmoveapi
+ conflicts = python-psmoveapi
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..a97df690c92f
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,5 @@
+*
+!.gitignore
+!.SRCINFO
+!PKGBUILD
+!add-libv4l2-module.patch
diff --git a/PKGBUILD b/PKGBUILD
index e051c284d14c..7d6338e732a8 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,59 +1,103 @@
-# Maintainer: Arthur Zamarin <arthurzam@gmail.com>
-# Maintainer: Hermann Mayer <hermann.mayer92@gmail.com>
+# Maintainer: Gustavo Alvarez <sl1pkn07@gmail.com>
+# Contributor: Arthur Zamarin <arthurzam@gmail.com>
+# Contributor: Hermann Mayer <hermann.mayer92@gmail.com>
-_pkgname=psmoveapi
-pkgname=${_pkgname}-git
-pkgver=4.0.4.r7.ge64a766
+pkgbase=psmoveapi-git
+pkgname=('psmoveapi-git'
+ 'python-psmoveapi-git'
+ )
+pkgver=4.0.12.162.g5067d19
pkgrel=1
-pkgdesc="Playstation Move Motion Controller API"
-arch=(i686 x86_64)
-url="http://thp.io/2010/psmove/"
+pkgdesc='Playstation Move Motion Controller API (GIT version)'
+arch=('x86_64')
+url='http://thp.io/2010/psmove'
license=('BSD')
-depends=('udev' 'bluez-libs' 'v4l-utils' 'opencv' 'jdk7-openjdk'
- 'python2' 'mono' 'swig' 'freeglut' 'libusb')
-makedepends=('cmake')
-source=("${_pkgname}::git+https://github.com/thp/psmoveapi.git"
- 'fix-opencv-headers.patch'
- 'add-libv4l2-module.patch')
-sha1sums=('SKIP'
- '383b842942af8f5911d23b4950fe4ef4addbaf67'
- 'f81b484bced325b076ea550b47f2bb145f709a45')
+makedepends=('git'
+ 'cmake'
+ 'python-sphinx'
+ 'udev'
+ 'bluez-libs'
+ 'libusb-compat'
+ )
+source=('git+https://github.com/thp/psmoveapi.git'
+ 'git+https://github.com/thp/hidapi.git'
+ 'git+https://github.com/inspirit/PS3EYEDriver.git'
+ 'git+https://github.com/libusb/libusb.git'
+ 'add-libv4l2-module.patch'
+ )
+sha256sums=('SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ '271eaa3f1f5c50045873f1583ebc38eb6c9451440a7c98de5b75731058901480'
+ )
+options=('debug')
pkgver() {
- cd "${srcdir}/${_pkgname}"
- git describe --long --tags | sed -r 's/([^-]*-g)/r\1/;s/-/./g'
+ cd psmoveapi
+ echo "$(git describe --long --tags | tr - . | tr -d v)"
}
prepare() {
- cd "${srcdir}/${_pkgname}"
- git submodule init
- git submodule update
-
- # Add the missing OpenCV includes
- patch -p1 -i "${srcdir}/fix-opencv-headers.patch"
+ cd psmoveapi
+ git config submodule.external/hidapi.url "${srcdir}/hidapi"
+ git config submodule.external/PS3EYEDriver.url "${srcdir}/PS3EYEDriver"
+ git config submodule.external/libusb-1.0.url "${srcdir}/libusb"
+ git -c protocol.file.allow=always submodule update --init \
+ external/hidapi \
+ external/PS3EYEDriver \
+ external/libusb-1.0
# Add the missing cmake libv4l2 linkage
patch -p1 -i "${srcdir}/add-libv4l2-module.patch"
- JAVA_HOME=/usr/lib/jvm/default cmake . \
- -DCMAKE_INSTALL_PREFIX:PATH=/usr \
- -DPSMOVEAPI_LIB_DEST=lib \
- -DPSMOVE_BUILD_EXAMPLES=OFF \
- -DPSMOVE_BUILD_OPENGL_EXAMPLES=OFF \
- -DPSMOVE_BUILD_TESTS=OFF
+ mkdir -p docs/_static
}
build() {
- cd "${srcdir}/${_pkgname}"
- make
+ cmake -B build -S psmoveapi \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_SKIP_RPATH=ON \
+ -DPSMOVEAPI_LIB_DEST=lib \
+ -DPSMOVE_BUILD_EXAMPLES=ON \
+ -DPSMOVE_BUILD_TESTS=OFF \
+ -DPSMOVE_BUILD_TRACKER=ON
+
+ cmake --build build
}
-package() {
- cd "${srcdir}/${_pkgname}"
- make DESTDIR="$pkgdir" install
- install -m755 -d "${pkgdir}"/usr/lib/python3.6/site-packages/
- install -D -m644 _psmove.so "${pkgdir}"/usr/lib/python3.6/site-packages/
- install -D -m644 psmove.py "${pkgdir}"/usr/lib/python3.6/site-packages/
- install -D -m644 psmove_config.h "${pkgdir}"/usr/include/psmoveapi/
- install -D -m644 COPYING "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
+package_psmoveapi-git() {
+ provides=('psmoveapi')
+ conflicts=('psmoveapi')
+ depends=('udev'
+ 'bluez-libs'
+ 'libusb-compat'
+ )
+
+ DESTDIR="${pkgdir}" cmake --install build
+
+ (cd psmoveapi/docs; make BUILDDIR="${pkgdir}/usr/share/doc/${pkgbase}" html)
+
+ mkdir -p "${pkgdir}/usr/share/"{doc,licenses}"/${pkgbase}"
+ mv "${pkgdir}/usr/share/psmoveapi/README.md" "${pkgdir}/usr/share/doc/${pkgbase}/README.md"
+ mv "${pkgdir}/usr/share/psmoveapi/COPYING" "${pkgdir}/usr/share/licenses/${pkgbase}/COPYING"
+ rm -fr "${pkgdir}/usr/share/psmoveapi"
+}
+
+package_python-psmoveapi-git() {
+ pkgdesc='Python bindings for Playstation Move Motion Controller API (GIT version)'
+ provides=('python-psmoveapi')
+ conflicts=('python-psmoveapi')
+ depends=("psmoveapi-git=${pkgver}"
+ 'python'
+ )
+
+ _site_packages="$(python -c 'import sysconfig; print(sysconfig.get_paths()["purelib"])')"
+ install -Dm644 psmoveapi/bindings/python/psmoveapi.py "${pkgdir}${_site_packages}/psmoveapi.py"
+ python -m compileall -q -f -d "${_site_packages}" "${pkgdir}${_site_packages}/psmoveapi.py"
+ python -OO -m compileall -q -f -d "${_site_packages}" "${pkgdir}${_site_packages}/psmoveapi.py"
+
+ mkdir -p "${pkgdir}/usr/share/licenses/${pkgname}"
+ ln -s "/usr/share/licenses/${pkgbase}/COPYING" "${pkgdir}/usr/share/licenses/${pkgname}/COPYING"
}
diff --git a/add-libv4l2-module.patch b/add-libv4l2-module.patch
index 7112c704bfff..8b47a9bf7eaa 100644
--- a/add-libv4l2-module.patch
+++ b/add-libv4l2-module.patch
@@ -1,24 +1,13 @@
-diff --git a/examples/c/distance_calibration.c b/examples/c/distance_calibration.c
-index 14f8189..3c209c5 100644
---- a/examples/c/distance_calibration.c
-+++ b/examples/c/distance_calibration.c
-@@ -34,6 +34,7 @@
-
- #include "opencv2/core/core_c.h"
- #include "opencv2/highgui/highgui_c.h"
-+#include "opencv2/imgcodecs/imgcodecs_c.h"
-
- #include "psmove.h"
- #include "psmove_tracker.h"
-diff --git a/src/tracker/camera_control_private.h b/src/tracker/camera_control_private.h
-index a4842b1..86aa8b7 100644
---- a/src/tracker/camera_control_private.h
-+++ b/src/tracker/camera_control_private.h
-@@ -33,6 +33,7 @@
- #include "opencv2/core/core_c.h"
- #include "opencv2/highgui/highgui_c.h"
- #include "opencv2/imgproc/imgproc_c.h"
-+#include "opencv2/videoio/videoio_c.h"
-
- #if defined(WIN32)
- # include <windows.h>
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 6e45cae..081c00a 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -91,5 +91,9 @@ list(APPEND PSMOVEAPI_REQUIRED_LIBS m)
+ include_directories(${UDEV_INCLUDE_DIRS})
+ list(APPEND PSMOVEAPI_REQUIRED_LIBS ${UDEV_LIBRARIES})
+
++ pkg_check_modules(V4L2 REQUIRED libv4l2)
++ include_directories(${V4L2_INCLUDE_DIRS})
++ list(APPEND PSMOVEAPI_REQUIRED_LIBS ${V4L2_LIBRARIES})
++
+ pkg_check_modules(BLUEZ REQUIRED bluez>=5)
diff --git a/fix-opencv-headers.patch b/fix-opencv-headers.patch
deleted file mode 100644
index 8b47a9bf7eaa..000000000000
--- a/fix-opencv-headers.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
-index 6e45cae..081c00a 100644
---- a/src/CMakeLists.txt
-+++ b/src/CMakeLists.txt
-@@ -91,5 +91,9 @@ list(APPEND PSMOVEAPI_REQUIRED_LIBS m)
- include_directories(${UDEV_INCLUDE_DIRS})
- list(APPEND PSMOVEAPI_REQUIRED_LIBS ${UDEV_LIBRARIES})
-
-+ pkg_check_modules(V4L2 REQUIRED libv4l2)
-+ include_directories(${V4L2_INCLUDE_DIRS})
-+ list(APPEND PSMOVEAPI_REQUIRED_LIBS ${V4L2_LIBRARIES})
-+
- pkg_check_modules(BLUEZ REQUIRED bluez>=5)