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

Git Clone URL: (read-only, click to copy)
Package Base: oculus-rift-sdk-jherico-git
Description: Oculus SDK community version. SHIM + shared release/debug (,, OculusConfigUtil, /etc/xdg/autostart/ovrd.desktop. Use /usr/include/ovr- as path to the SDK.
Upstream URL:
Licenses: custom
Provides: oculus-rift-sdk=
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


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."
optdepends=(" The closed config utility is linked against"
"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

# Config Util is directly binaries from oculus rift sdk upstream. Look it up, if you like

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

prepare() {
# add SHARED keyword to build shared
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} ]
msg "Setting BUILDTYPE to Release"
export BUILDTYPE="Release"
echo "Setting BUILDTYPE to Debug"
export BUILDTYPE="Debug"; export D="d"

cd "$srcdir/OculusSDK"

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

msg "Building 64 bit shared library"
install output/libOculusVR${D}.so "$srcdir/lib64"
# install output/ "$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
install output/libOculusVR${D}.a "$srcdir/lib64"

git clean -xfd

msg "Building 32 bit static library" #and demo"
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
install output/libOculusVR${D}.so "$srcdir/lib32"
# install output/ "$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}/" "${pkgdir}/usr/bin/OculusConfigUtil"
install -m755 "${srcdir}/" "${pkgdir}/usr/bin/OculusTuscanyDemo"

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

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

# vim:set ts=2 sw=2 et:

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 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.