summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorLubosz Sarnecki2015-07-09 21:15:38 +0200
committerLubosz Sarnecki2015-07-09 21:15:38 +0200
commit20df4e8c6a11a6f3d21327b707f4ad294e927bb4 (patch)
tree47d7b3458b8f7bf314640fafca58699714dd7555
downloadaur-20df4e8c6a11a6f3d21327b707f4ad294e927bb4.tar.gz
import from aur3
-rw-r--r--.SRCINFO35
-rw-r--r--OculusConfigUtil.sh4
-rw-r--r--OculusTuscanyDemo.sh14
-rw-r--r--PKGBUILD148
-rw-r--r--libovr.pc11
5 files changed, 212 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..37c1150152c
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,35 @@
+pkgbase = oculus-rift-sdk-jherico-git
+ pkgdesc = Oculus SDK community version. SHIM + shared release/debug (libOVRRT64_0.so.0.5.0.1, libOVRdRT64_0.so.0.5.0.1), OculusConfigUtil, /etc/xdg/autostart/ovrd.desktop. Use /usr/include/ovr-0.5.0.1/ as path to the SDK.
+ pkgver = 185.cbf6f96
+ pkgrel = 2
+ url = https://github.com/jherico/OculusSDK
+ arch = x86_64
+ license = custom
+ makedepends = git
+ makedepends = cmake
+ makedepends = libxrandr
+ depends = libgl
+ optdepends = libudev.so.0: The closed config utility is linked against libudev.so.0
+ optdepends = oculus-udev: Udev rule to make the rift sensors usable to the user "plugdev"
+ provides = oculus-rift-sdk=0.5.0.1
+ options = !strip
+ options = staticlibs
+ source = git+https://github.com/jherico/OculusSDK.git#branch=master
+ source = git+https://github.com/jherico/jocular.git
+ source = git+https://github.com/jherico/python-ovrsdk.git
+ source = git+https://github.com/jherico/cmake.git
+ source = http://haagch.frickel.club/files/ovr_sdk_linux_0.5.0.1/Tools/RiftConfigUtil/Bin/Linux/x86_64/ReleaseStatic/RiftConfigUtil
+ source = libovr.pc
+ source = OculusTuscanyDemo.sh
+ source = OculusConfigUtil.sh
+ md5sums = SKIP
+ md5sums = SKIP
+ md5sums = SKIP
+ md5sums = SKIP
+ md5sums = e650fd7a67579bbe7d41beb656424d9f
+ md5sums = 76c9a7c738ce871a780cb0879148e78c
+ md5sums = e8a3510f5bea1a99b1cec5c98f314ceb
+ md5sums = cf6564fda559b6d9fa5219d7a18dd78d
+
+pkgname = oculus-rift-sdk-jherico-git
+
diff --git a/OculusConfigUtil.sh b/OculusConfigUtil.sh
new file mode 100644
index 00000000000..1ad8d0dd9dc
--- /dev/null
+++ b/OculusConfigUtil.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+export LC_ALL=C # bug with profile saving when using locale with . as decimal separator: https://developer.oculusvr.com/forums/viewtopic.php?f=34&t=16130&p=211228&hilit=linux#p211228
+cd /usr/share/OculusConfigUtil/
+./RiftConfigUtil "$@"
diff --git a/OculusTuscanyDemo.sh b/OculusTuscanyDemo.sh
new file mode 100644
index 00000000000..a5f0327540b
--- /dev/null
+++ b/OculusTuscanyDemo.sh
@@ -0,0 +1,14 @@
+#!/bin/sh
+cd /usr/share/OculusTuscanyDemo/
+if [ $1 = "--debug" ]; then
+ if [ ! -z "$DEBUGGER" ]; then
+ echo "\$DEBUGGER Set to $DEBUGGER"
+ $DEBUGGER ./OculusWorldDemo64Debug "$@"
+ else
+ echo "\$DEBUGGER not set, using gdb"
+ gdb --args ./OculusWorldDemo64Debug "$@"
+ fi
+else
+ echo "Starting Release Version"
+ ./OculusWorldDemo64
+fi
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..a7ff139d9e5
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,148 @@
+pkgname=oculus-rift-sdk-jherico-git
+pkgver=185.cbf6f96
+realver=0.5.0.1
+pkgrel=2
+_branch=master
+pkgdesc="Oculus SDK community version. SHIM + shared release/debug (libOVRRT64_0.so.${realver}, libOVRdRT64_0.so.${realver}), OculusConfigUtil, /etc/xdg/autostart/ovrd.desktop. Use /usr/include/ovr-${realver}/ as path to the SDK."
+arch=('x86_64')
+url="https://github.com/jherico/OculusSDK"
+license=('custom')
+depends=('libgl')
+optdepends=("libudev.so.0: The closed config utility is linked against libudev.so.0"
+ "oculus-udev: Udev rule to make the rift sensors usable to the user \"plugdev\"")
+makedepends=('git' 'cmake' 'libxrandr')
+provides=("oculus-rift-sdk=${realver}")
+conflicts=()
+replaces=()
+backup=()
+options=('!strip' 'staticlibs')
+install=
+
+# Config Util is directly binaries from oculus rift sdk upstream. Look it up, if you like
+source=("git+https://github.com/jherico/OculusSDK.git#branch=$_branch"
+"git+https://github.com/jherico/jocular.git"
+"git+https://github.com/jherico/python-ovrsdk.git"
+"git+https://github.com/jherico/cmake.git"
+ "http://haagch.frickel.club/files/ovr_sdk_linux_${realver}/Tools/RiftConfigUtil/Bin/Linux/x86_64/ReleaseStatic/RiftConfigUtil"
+ 'libovr.pc'
+ 'OculusTuscanyDemo.sh'
+ 'OculusConfigUtil.sh')
+
+pkgver() {
+ cd "$srcdir/OculusSDK"
+ echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
+}
+
+prepare() {
+ cd "$srcdir/OculusSDK"
+
+ git submodule init
+ git config submodule.Bindings/Java.url "$srcdir/jocular"
+ git config submodule.Bindings/Python.url "$srcdir/python-ovrsdk"
+ git config submodule.cmake.url "$srcdir/cmake"
+ git submodule update
+
+}
+
+build() {
+#export CXX=clang++
+#export CC=clang
+
+mkdir -p build
+rm -rf build/*
+cd build
+
+ msg "Building 64 bit STATIC SHIM RELEASE library"
+ sed -i "s/ SHARED / STATIC /g" "$srcdir"/OculusSDK/LibOVR/CMakeLists.txt # STATIC is the default... FOR NOW!! Maybe it's needed again soon
+ cmake -DCMAKE_INSTALL_PREFIX=/usr/ -DCMAKE_BUILD_TYPE=Release -DOVR_USE_SHIM=1 -DCMAKE_CXX_FLAGS="-lX11 -lGL" ../OculusSDK
+ make
+
+ msg "Building 64 bit SHARED RELEASE library"
+ sed -i "s/ STATIC / SHARED /g" "$srcdir"/OculusSDK/LibOVR/CMakeLists.txt
+ cmake -DCMAKE_INSTALL_PREFIX=/usr/ -DCMAKE_BUILD_TYPE=Release -DOVR_USE_SHIM=0 -DCMAKE_CXX_FLAGS="-lX11 -lGL" ../OculusSDK
+ make
+
+
+ msg "Building 64 bit STATIC SHIM DEBUG library"
+ sed -i "s/ SHARED / STATIC /g" "$srcdir"/OculusSDK/LibOVR/CMakeLists.txt
+ cmake -DCMAKE_INSTALL_PREFIX=/usr/ -DCMAKE_BUILD_TYPE=Debug -DOVR_USE_SHIM=1 -DCMAKE_CXX_FLAGS="-lX11 -lGL" ../OculusSDK
+ make
+
+ msg "Building 64 bit SHARED DEBUG library"
+ sed -i "s/ STATIC / SHARED /g" "$srcdir"/OculusSDK/LibOVR/CMakeLists.txt
+ cmake -DCMAKE_INSTALL_PREFIX=/usr/ -DCMAKE_BUILD_TYPE=Debug -DOVR_USE_SHIM=0 -DCMAKE_CXX_FLAGS="-lX11 -lGL" ../OculusSDK
+ make
+
+}
+
+package() {
+ cd "$srcdir/OculusSDK"
+
+ #make DESTDIR="$pkgdir/" install
+
+ oculusv="$realver" #meh: $(cat LibOVR/Include/OVR_Version.h | sed -n 's/.*#define OVR_VERSION_STRING "\(.*\)"/\1/p')
+
+ install -d "$pkgdir/usr/lib"
+ install -d "$pkgdir/usr/include/ovr-$oculusv/"
+ install -d "$pkgdir/usr/lib/pkgconfig/"
+
+ install "$srcdir/libovr.pc" "$pkgdir/usr/lib/pkgconfig/"
+ sed -i "s/@PACKAGE_VERSION@/$oculusv/g" "$pkgdir/usr/lib/pkgconfig/libovr.pc"
+
+ install -d "$pkgdir/usr/share/OculusConfigUtil"
+ install -m 755 "$srcdir/RiftConfigUtil" "$pkgdir/usr/share/OculusConfigUtil/RiftConfigUtil"
+
+ install "$srcdir/build/output"/libovr.a "$pkgdir/usr/lib/libOVR.a"
+ install "$srcdir/build/output"/libovr.so "$pkgdir/usr/lib/libOVRRT64_0.so.5.0.1"
+ ln -s libOVRRT64_0.so.5.0.1 ${pkgdir}/usr/lib/libOVRRT64_0.so.5
+ install "$srcdir/build/output"/libovrd.a "$pkgdir/usr/lib/libOVRd.a"
+ install "$srcdir/build/output"/libovrd.so "$pkgdir/usr/lib/libOVRdRT64_0.so.5.0.1"
+ ln -s libOVRdRT64_0.so.5.0.1 ${pkgdir}/usr/lib/libOVRdRT64_0.so.5
+
+ #library was previously named libovr
+ ln -s /usr/lib/libOVRRT64_0.so.5.0.1 ${pkgdir}/usr/lib/libovr.so
+ ln -s /usr/lib/libOVR.a ${pkgdir}/usr/lib/libovr.a
+ ln -s /usr/lib/libOVRdRT64_0.so.5.0.1 ${pkgdir}/usr/lib/libovrd.so
+ ln -s /usr/lib/libOVRd.a ${pkgdir}/usr/lib/libovrd.a
+
+ # To be sure, these names too
+ ln -s /usr/lib/libovr.so ${pkgdir}/usr/lib/libOculusVR.so
+ ln -s /usr/lib/libovr.a ${pkgdir}/usr/lib/libOculusVR.a
+
+ cp -ra "$srcdir/OculusSDK/LibOVR/Include"/* "$pkgdir/usr/include/ovr-$oculusv/"
+ cp -ra "$srcdir/OculusSDK/LibOVRKernel/Src"/* "$pkgdir/usr/include/ovr-$oculusv/"
+
+ #this is just the whole library source code. You never know.
+ cp -ra "$srcdir/OculusSDK/LibOVRKernel" "$pkgdir/usr/include/ovr-$oculusv/"
+ cp -ra "$srcdir/OculusSDK/LibOVR" "$pkgdir/usr/include/ovr-$oculusv/"
+
+ #Grrr... https://github.com/Germanunkol/OgreOculusSample/blob/3ec4b9f9412db21455a324eb7d6d8dd82e2cddbf/cmake/FindOculusSDK.cmake#L36-L37
+ cp -ra "$pkgdir/usr/include/ovr-$oculusv/LibOVR/Include/"*.h "$pkgdir/usr/include/ovr-$oculusv/LibOVR/Src/"
+ cp -ra "$pkgdir/usr/include/ovr-$oculusv/LibOVRKernel/Src/Kernel/" "$pkgdir/usr/include/ovr-$oculusv/LibOVR/Include/"
+ cp -ra "$pkgdir/usr/include/ovr-$oculusv/LibOVR/Include/Extras/"*.h "$pkgdir/usr/include/ovr-$oculusv/LibOVR/Include/Kernel/"
+ cp -ra "$pkgdir/usr/include/ovr-$oculusv/LibOVR/Include/Extras/"*.h "$pkgdir/usr/include/ovr-$oculusv/LibOVR/Include/"
+
+ #TODO: Bindings
+
+ mkdir -p "${pkgdir}/usr/bin"
+ install -m755 "${srcdir}/OculusConfigUtil.sh" "${pkgdir}/usr/bin/OculusConfigUtil"
+
+ install -m 755 "${srcdir}/OculusSDK/Service/OVRServer/Bin/Linux/x86_64/ReleaseStatic/ovrd" "${pkgdir}/usr/bin/"
+
+ install -d "$pkgdir/etc/xdg/autostart"
+echo "[Desktop Entry]
+Type=Application
+Name=Oculus Rift Service
+Exec=/usr/bin/ovrd" > "$pkgdir/etc/xdg/autostart/ovrd.desktop"
+
+}
+
+# vim:set ts=2 sw=2 et:
+md5sums=('SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'e650fd7a67579bbe7d41beb656424d9f'
+ '76c9a7c738ce871a780cb0879148e78c'
+ 'e8a3510f5bea1a99b1cec5c98f314ceb'
+ 'cf6564fda559b6d9fa5219d7a18dd78d')
diff --git a/libovr.pc b/libovr.pc
new file mode 100644
index 00000000000..e7c0041a8ea
--- /dev/null
+++ b/libovr.pc
@@ -0,0 +1,11 @@
+prefix=/usr
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include
+
+Name: LibOVR
+Description: LibOVR for oculus rift support.
+Requires: xrandr libudev
+Version: @PACKAGE_VERSION@
+Libs: -L${libdir} -lOVR
+Cflags: -I${includedir}/ovr-@PACKAGE_VERSION@/LibOVR -I${includedir}/ovr-@PACKAGE_VERSION@/LibOVR/Include -I${includedir}/ovr-@PACKAGE_VERSION@/LibOVR/Src -I${includedir}/ovr-@PACKAGE_VERSION@/LibOVRKernel -I${includedir}/ovr-@PACKAGE_VERSION@/LibOVRKernel/Src