Package Details: oculus-rift-sdk-jherico-git 185.cbf6f96-2

Git Clone URL: https://aur.archlinux.org/oculus-rift-sdk-jherico-git.git (read-only, click to copy)
Package Base: oculus-rift-sdk-jherico-git
Description: 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.
Upstream URL: https://github.com/jherico/OculusSDK
Licenses: custom
Provides: oculus-rift-sdk=0.5.0.1
Submitter: haagch
Maintainer: lubosz
Last Packager: lubosz
Votes: 7
Popularity: 0.000000
First Submitted: 2014-09-02 00:43
Last Updated: 2016-06-02 15:35

Latest Comments

« First ‹ Previous 1 2 3 4 5 Next › Last »

feilen commented on 2014-12-05 06:13

Updated PKGBUILD:

pkgname=oculus-rift-sdk-jherico-git
pkgver=160.3a40e61
pkgrel=1
_branch=master
pkgdesc="Oculus SDK community version. 32/64 bit static/shared library, OculusTuscanyDemo. OculusConfigUtil, /etc/xdg/autostart/oculusd.desktop. Set OCULUS_SDK=/usr/include/ovr-0.4.4/. Do 'OVR_DEBUG=1 makepkg' to make a debug build."
arch=('x86_64')
url="https://github.com/jherico/OculusSDK"
license=('custom')
#depends=('oculus-udev')
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' 'patchelf') #TODO: Fix cmake to set rpath right first time
provides=()
conflicts=()
replaces=()
backup=()
options=('!strip')
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_0.4.4/ConfigUtil.tar.xz"
"http://haagch.frickel.club/files/ovr_sdk_linux_0.4.4/oculusd"
'libovr.pc'
'OculusTuscanyDemo.sh'
'OculusConfigUtil.sh')

pkgver() {
cd "$srcdir/OculusSDK"
echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

prepare() {
# add SHARED keyword to build shared libOVR.so
cd "$srcdir/OculusSDK"
install -d ../orig
cp -ra * ../orig
# sed -i "s/add_library(OculusVR /add_library(OculusVR SHARED /g" LibOVR/CMakeLists.txt
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() {
if [ -z ${OVR_DEBUG+x} ]
then
msg "Setting BUILDTYPE to Release"
export BUILDTYPE="Release"
else
echo "Setting BUILDTYPE to Debug"
export BUILDTYPE="Debug"; export D="d"
fi

cd "$srcdir/OculusSDK"

mkdir -p "$srcdir/lib32" "$srcdir/lib64" "$srcdir/share"

msg "Building 64 bit shared library"
cmake -DCMAKE_INSTALL_PREFIX=/usr/ -DOCULUS_BUILD_SAMPLES=1 -DCMAKE_BUILD_TYPE=${BUILDTYPE} -DBUILD_SHARED_LIBS=ON .
make
install output/libOculusVR${D}.so "$srcdir/lib64"
# install output/libOVR_C.so "$srcdir/lib64" #doesn't get built anymore?
patchelf --set-rpath /usr/lib/ output/OculusWorldDemo
install output/OculusWorldDemo "$srcdir/share" # now dynamically linked

git clean -xfd

msg "Building 64 bit static library and demo"
# sed -i "s/SHARED/STATIC/g" LibOVR/CMakeLists.txt
cmake -DCMAKE_INSTALL_PREFIX=/usr/ -DOCULUS_BUILD_SAMPLES=0 -DCMAKE_BUILD_TYPE=${BUILDTYPE} -DBUILD_SHARED_LIBS=OFF -DBUILD_STATIC_LIBS=ON .
make
install output/libOculusVR${D}.a "$srcdir/lib64"

git clean -xfd

msg "Building 32 bit static library" #and demo"
CC="gcc -m32" CXX="g++ -m32" cmake -DCMAKE_INSTALL_PREFIX=/usr/ -DOCULUS_BUILD_SAMPLES=0 -DCMAKE_BUILD_TYPE=${BUILDTYPE} -DBUILD_SHARED_LIBS=OFF .
make
install output/libOculusVR${D}.a "$srcdir/lib32"
#patchelf --set-rpath /usr/lib32/ output/OculusWorldDemo
# install output/OculusWorldDemo "$srcdir/share/OculusWorldDemo32"

git clean -xfd

msg "Building 32 bit shared library"
# sed -i "s/STATIC/SHARED/g" LibOVR/CMakeLists.txt
CC="gcc -m32" CXX="g++ -m32" cmake -DCMAKE_INSTALL_PREFIX=/usr/ -DOCULUS_BUILD_SAMPLES=0 -DCMAKE_BUILD_TYPE=${BUILDTYPE} -DBUILD_SHARED_LIBS=ON .
make
install output/libOculusVR${D}.so "$srcdir/lib32"
# install output/libOVR_C.so "$srcdir/lib32"
}

package() {
cd "$srcdir/OculusSDK"
oculusv=$(cat LibOVR/Include/OVR_Version.h | sed -n 's/.*#define OVR_VERSION_STRING "\(.*\)"/\1/p')

#make DESTDIR="$pkgdir/" install
install -d "$pkgdir/usr/lib"
install -d "$pkgdir/usr/lib32"
install -d "$pkgdir/usr/include/ovr-$oculusv/ovr"
install -d "$pkgdir/usr/share/"
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"

cp -ra "Samples/OculusWorldDemo/Assets/Tuscany/" "$pkgdir/usr/share/OculusTuscanyDemo"
install "$srcdir/share/OculusWorldDemo" "$pkgdir/usr/share/OculusTuscanyDemo/OculusWorldDemo64"
# install "$srcdir/share/OculusWorldDemo32" "$pkgdir/usr/share/OculusTuscanyDemo/OculusWorldDemo32"

cp -ra "$srcdir/ConfigUtil" "$pkgdir/usr/share/OculusConfigUtil"

install "$srcdir/lib32"/* "$pkgdir/usr/lib32/"
install "$srcdir/lib64"/* "$pkgdir/usr/lib/"

# cp -ra "LibOVR/Include" "$pkgdir/usr/include/ovr-$oculusv/"
# cp -ra "LibOVR/Src" "$pkgdir/usr/include/ovr-$oculusv/"
# Some programs like minecrift need the whole SDK and not just the usual headers
cp -ra ../orig/* "$pkgdir/usr/include/ovr-$oculusv/"
ln -s /usr/include/ovr-0.4.4/LibOVR/Include "$pkgdir"/usr/include/ovr-0.4.4/
ln -s /usr/include/ovr-0.4.4/LibOVR/Src "$pkgdir"/usr/include/ovr-0.4.4/

mkdir -p "${pkgdir}/usr/bin"
install -m755 "${srcdir}/OculusConfigUtil.sh" "${pkgdir}/usr/bin/OculusConfigUtil"
install -m755 "${srcdir}/OculusTuscanyDemo.sh" "${pkgdir}/usr/bin/OculusTuscanyDemo"

install -m 755 "${srcdir}/oculusd" "${pkgdir}/usr/bin/"

install -d "$pkgdir/etc/xdg/autostart"
echo "[Desktop Entry]
Type=Application
Name=Oculus Rift Service
Exec=/usr/bin/oculusd" > "$pkgdir/etc/xdg/autostart/oculusd.desktop"
}

# vim:set ts=2 sw=2 et:
md5sums=('SKIP'
'SKIP'
'SKIP'
'SKIP'
'cb4e57e7e3642ce7ca513df76dc4c7c6'
'7f9b36604772c09e82ad0af810fa3086'
'42229985530d52b42f6127281a4478e4'
'6bc87973022d3763ad4c81c2cdd92713'
'cf6564fda559b6d9fa5219d7a18dd78d')

feilen commented on 2014-11-10 18:24

I've updated my branch of Dolphin-emu-VR to find where it is in the current iteration. I'll go in and do the same for Minecrift in a minute, and then probably make Minecrift explicitly link against the static version (as libOculusVR.so doesn't get included)

feilen commented on 2014-11-09 20:53

That sounds good! You could pretty easily just provide symlinks and remove build-process files. /opt sounds good for the SDK overall.

haagch commented on 2014-11-09 10:26

After sleeping over it, I thought people can depend on *any* part of the SDK including the tuscany assets and whatnot so it probably is best to install the whole thing. I don't really like putting 114 megabyte in /usr/include, so maybe I'll put it into /opt or /usr/share or so later and only put all the .h files into /usr/include.

feilen commented on 2014-11-08 20:57

Alrighty. Well, for Minecrift, the best solution would be to copy the entire directory to /usr/include/<name> so that anyone with OCULUS_SDK or something similar defined will simply have to point it to that. Minecrift needs all of /Src, /Include and /Samples to build, but Dolphin just needs /Src and /Include.

Not totally sure how to procede, but since you're copying /Include into /ovr anyway, why not just leave it as /Include?

haagch commented on 2014-11-08 20:17

The pkg-config file is not official, just something I put together quickly, so you might want to think about whether you really want to depend on it.

feilen commented on 2014-11-08 20:08

Ah, that seems useful. I'll work that into the neccesary makefiles I guess. Unfortunately, Minecrift (which I'm messing with now) depends on some of the sample code in Samples/. Though minecrift isn't something you'd ever need to compile from source for without actually wanting to develop for it, so that's an edge case.

haagch commented on 2014-11-08 17:06

Indeed I did not quite understand how it is supposed to be arranged. When using pkg-config --cflags libovr it will just spit out all the possible paths that could be used for including files.

I'm not sure what the alternative is. Install all SDK files to /opt or /usr/share?

feilen commented on 2014-11-08 16:50

I'm not so sure about moving the SDK into /usr/include/ovr-# in a way that changes the directory structure (moving Include and Src around)

Most development environments expect the Oculus SDK to be arranged the way it is in upstream, and only allow you to change the base location of the SDK.

feilen commented on 2014-10-28 06:00

Awesome, thanks for the fast fix!

Was there something wrong with plugdev? You might want to add in a postinstall file something which tells you after installing to add yourself to that group.