diff options
Diffstat (limited to '~lukeshu')
20 files changed, 1763 insertions, 0 deletions
diff --git a/~lukeshu/not-working/codeanalyst/PKGBUILD b/~lukeshu/not-working/codeanalyst/PKGBUILD new file mode 100644 index 000000000..885e06f0e --- /dev/null +++ b/~lukeshu/not-working/codeanalyst/PKGBUILD @@ -0,0 +1,91 @@ +# Maintainer (Parabola): Luke Shumaker <lukeshu@sbcglobal.net> +# Maintainer (AUR): Felipe Bugno <capent@yahoo.com> + +# A note about the oprofile fork: +# The docs claim that the fork is just for adding support for +# processors that aren't upstream yet (at the time, they are now that +# 0.9.7 is out). So, shouldn't we just link against 0.9.7? Well: +# * AMD also added a bunch of CodeAnalyst-specific code. +# * Several external variables/types have different names; the API is +# incompatible. +# * [extra]/oprofile-0.9.7-3 only includes about half of the headers. + +pkgbase=CodeAnalyst +pkgname=(codeanalyst codeanalyst-cakm) +pkgver=3.3.18.0361 +_pkgver="${pkgver//./_}" +pkgrel=4.1 +pkgdesc="AMD performance profiler. Includes a fork of oprofile." +url="http://developer.amd.com/tools/${pkgbase}/" +arch=('i686' 'x86_64') +license=('GPL') +depends=('gcc' 'qt>=4.1' 'libdwarf') +makedepends=('linux-headers' 'elfutils' 'findutils' 'file') +options=('!strip') +install=codeanalyst.install +source=("http://download2-developer.amd.com/amd/${pkgbase}/${pkgbase}${_pkgver}Public.tar.gz" + 'gcc47.patch' + 'skipSetup.patch' + 'kernel3.4.patch' + 'codeanalyst.sudo' + 'codeanalyst.desktop' + 'codeanalyst.svg') + +build() { + build_codeanalyst + build_codeanalyst-cakm +} + +build_codeanalyst() { + cd "${srcdir}/${pkgbase}-${_pkgver}-Public" + patch -Np1 -i "${srcdir}/gcc47.patch" + patch -Np1 -i "${srcdir}/skipSetup.patch" + rm -rf src/dwarf-* # easiest way to ensure using the system install + + ./autogen.sh + ./configure --prefix=/usr \ + --with-libdwarf-includes=/usr/include/libdwarf \ + --with-libdwarf-libraries=/usr/lib + make +} + +build_codeanalyst-cakm() { + cd "${srcdir}/${pkgbase}-${_pkgver}-Public"/src/cakm + cp -r kernel2.6.38 kernel3.4 + cd kernel3.4 + patch -Np1 -i "${srcdir}/kernel3.4.patch" + make +} + +package_codeanalyst() { + provides=('oprofile=0.9.6cvs') + conflicts=('oprofile') + + cd "${srcdir}/${pkgbase}-${_pkgver}-Public" + make DESTDIR="${pkgdir}" install + rm -f "${pkgdir}/usr/sbin/ca_user_manager" # either codeanalyst.install does this, or it is trivial + + find "${pkgdir}"/usr/{bin,sbin} -type f -exec file '{}' +|sed -n 's/:\s*ELF .*//p'|xargs strip + + cd "${srcdir}" + install -D -m644 codeanalyst.sudo "${pkgdir}/etc/sudoers.d/codeanalyst" + install -D -m644 codeanalyst.svg "${pkgdir}/usr/share/icons/hicolor/scalable/apps/codeanalyst.svg" + install -D -m644 codeanalyst.desktop "${pkgdir}/usr/share/applications/codeanalyst.desktop" +} + +package_codeanalyst-cakm() { + pkgdesc="CodeAnalyst kernel module, oprofile-ca.ko, a replacement for oprofile.ko" + depends=(codeanalyst) + provides=() + + cd "${srcdir}/${pkgbase}-${_pkgver}-Public"/src/cakm/kernel3.4 + install -D -m644 oprofile.ko "${pkgdir}/lib/modules/`uname -r`/kernel/arch/x86/oprofile/oprofile-ca.ko" +} + +md5sums=('f1e29bc7c7da259df228ce59281ee1d7' + '063d0fc9680641a92ce5e310ffe1c9c0' + 'ce549e59c4a5916fd19e8d085e863627' + '3a5d820a43a0360d561bb0c4d67d9735' + '3cc8f64fe84c5a886d0172ee8d99f690' + '3a18d3f7fb01f199a8ed5ae2908c18e4' + '1822a4157b82904b82e72fc1e9bcbd42') diff --git a/~lukeshu/not-working/codeanalyst/codeanalyst.desktop b/~lukeshu/not-working/codeanalyst/codeanalyst.desktop new file mode 100644 index 000000000..56d54f884 --- /dev/null +++ b/~lukeshu/not-working/codeanalyst/codeanalyst.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Name=AMD CodeAnalyst +Comment=AMD profiler and performance analyzer +Exec=/usr/bin/CodeAnalyst +Icon=codeanalyst +Terminal=false +Encoding=UTF-8 +Type=Application +Categories=Development; diff --git a/~lukeshu/not-working/codeanalyst/codeanalyst.install b/~lukeshu/not-working/codeanalyst/codeanalyst.install new file mode 100644 index 000000000..6ed1ac841 --- /dev/null +++ b/~lukeshu/not-working/codeanalyst/codeanalyst.install @@ -0,0 +1,29 @@ +post_install() { + getent group amdca &>/dev/null || groupadd amdca &>/dev/null + echo " ==> To use CodeAnalyst as non-root, you must be in the 'amdca' group" + echo " ie: gpasswd -a USERNAME amdca" + + chown root:amdca /usr/bin/calog_report + chown root:amdca /usr/bin/capackage.sh + chown root:amdca /usr/bin/careport.sh + chown root:amdca /usr/bin/cgreport + chown root:amdca /usr/bin/CodeAnalyst + chown root:amdca /usr/bin/opannotate + chown root:amdca /usr/bin/oparchive + chown root:amdca /usr/bin/opcontrol + chown root:amdca /usr/bin/opgprof + chown root:amdca /usr/bin/ophelp + chown root:amdca /usr/bin/opimport + chown root:amdca /usr/bin/opjitconv + chown root:amdca /usr/bin/opreport + chown root:amdca /usr/bin/oprofiled + chown root:amdca /usr/sbin/ca_oprofile_controller + #chown root:amdca /usr/sbin/ca_user_manager + + update-desktop-database -q +} + +post_remove() { + getent group amdca &>/dev/null && groupdel amdca &>/dev/null + update-desktop-database -q +} diff --git a/~lukeshu/not-working/codeanalyst/codeanalyst.sudo b/~lukeshu/not-working/codeanalyst/codeanalyst.sudo new file mode 100644 index 000000000..1c3173bdb --- /dev/null +++ b/~lukeshu/not-working/codeanalyst/codeanalyst.sudo @@ -0,0 +1 @@ +%amdca ALL= NOPASSWD: /usr/sbin/ca_oprofile_controller diff --git a/~lukeshu/not-working/codeanalyst/codeanalyst.svg b/~lukeshu/not-working/codeanalyst/codeanalyst.svg new file mode 100644 index 000000000..8febf725b --- /dev/null +++ b/~lukeshu/not-working/codeanalyst/codeanalyst.svg @@ -0,0 +1,59 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Generator: Adobe Illustrator 12.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 51448) --> + +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + version="1.1" + id="Layer_1" + width="286.95001" + height="286.95001" + viewBox="0 0 286.95063 286.95" + overflow="visible" + enable-background="new 0 0 1368.987 286.954" + xml:space="preserve" + inkscape:version="0.48.3.1 r9886" + sodipodi:docname="AMD_Logo.svg" + style="overflow:visible"><metadata + id="metadata17"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs + id="defs15" /><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1920" + inkscape:window-height="1028" + id="namedview13" + showgrid="false" + inkscape:zoom="2.11" + inkscape:cx="163.32315" + inkscape:cy="145.21584" + inkscape:window-x="-4" + inkscape:window-y="-3" + inkscape:window-maximized="1" + inkscape:current-layer="Layer_1" /> +<polyline + points="1165.47,92.779 1165.39,203.495 1281.63,203.513 1198.44,286.826 1081.79,286.954 1080.38,176.065 1165.47,92.779" + id="polyline3" + style="fill:#009a66" + transform="translate(-1082.0371,1.8496035e-4)" /> +<polyline + points="1165.39,84.082 1285.07,83.854 1284.83,202.972 1368.99,286.954 1368.75,0.12 1081.79,0 1165.39,84.082" + id="polyline5" + style="fill:#009a66" + transform="translate(-1082.0371,1.8496035e-4)" /> + + + +</svg>
\ No newline at end of file diff --git a/~lukeshu/not-working/codeanalyst/gcc47.patch b/~lukeshu/not-working/codeanalyst/gcc47.patch new file mode 100644 index 000000000..dfec4a0c4 --- /dev/null +++ b/~lukeshu/not-working/codeanalyst/gcc47.patch @@ -0,0 +1,72 @@ +diff -crB CodeAnalyst-3_3_18_0361-Public.orig/src/ca/cg/Makefile.am CodeAnalyst-3_3_18_0361-Public/src/ca/cg/Makefile.am +*** CodeAnalyst-3_3_18_0361-Public.orig/src/ca/cg/Makefile.am 2012-04-13 02:41:43.000000000 -0300 +--- CodeAnalyst-3_3_18_0361-Public/src/ca/cg/Makefile.am 2012-04-22 17:55:01.227439003 -0300 +*************** +*** 25,31 **** + cgcvt.cpp + + +! cgreport_LDFLAGS = -Wl -fPIC @QT_LDFLAGS@ + + AM_CPPFLAGS= $(INCLUDES) $(more_flags) \ + $(FLAG64) -Wno-unused -Wno-parentheses \ +--- 25,31 ---- + cgcvt.cpp + + +! cgreport_LDFLAGS = -fPIC @QT_LDFLAGS@ + + AM_CPPFLAGS= $(INCLUDES) $(more_flags) \ + $(FLAG64) -Wno-unused -Wno-parentheses \ +diff -crB CodeAnalyst-3_3_18_0361-Public.orig/src/ca/gui/MonitorDockView.cpp CodeAnalyst-3_3_18_0361-Public/src/ca/gui/MonitorDockView.cpp +*** CodeAnalyst-3_3_18_0361-Public.orig/src/ca/gui/MonitorDockView.cpp 2012-04-13 02:41:43.000000000 -0300 +--- CodeAnalyst-3_3_18_0361-Public/src/ca/gui/MonitorDockView.cpp 2012-04-22 17:38:14.884058192 -0300 +*************** +*** 17,22 **** +--- 17,23 ---- + */ + + #include <qtooltip.h> ++ #include <unistd.h> + + #include "MonitorDockView.h" + +diff -crB CodeAnalyst-3_3_18_0361-Public.orig/src/ca/libs/libca/dwarfengine.cpp CodeAnalyst-3_3_18_0361-Public/src/ca/libs/libca/dwarfengine.cpp +*** CodeAnalyst-3_3_18_0361-Public.orig/src/ca/libs/libca/dwarfengine.cpp 2012-04-13 02:41:43.000000000 -0300 +--- CodeAnalyst-3_3_18_0361-Public/src/ca/libs/libca/dwarfengine.cpp 2012-04-22 17:34:45.670714989 -0300 +*************** +*** 21,26 **** +--- 21,27 ---- + #include <sys/types.h> + #include <sys/stat.h> + #include <fcntl.h> ++ #include <unistd.h> + + #include "dwarfengine.h" + #define DWARF_DEBUG 0 +diff -crB CodeAnalyst-3_3_18_0361-Public.orig/src/ca/libs/libopdata/opdata_handler.cpp CodeAnalyst-3_3_18_0361-Public/src/ca/libs/libopdata/opdata_handler.cpp +*** CodeAnalyst-3_3_18_0361-Public.orig/src/ca/libs/libopdata/opdata_handler.cpp 2012-04-13 02:41:43.000000000 -0300 +--- CodeAnalyst-3_3_18_0361-Public/src/ca/libs/libopdata/opdata_handler.cpp 2012-04-22 17:32:30.780708624 -0300 +*************** +*** 29,34 **** +--- 29,35 ---- + #include <sys/stat.h> + #include <fcntl.h> + #include <time.h> ++ #include <unistd.h> + + // CodeAnalyst headers + #include "CaProfileWriter.h" +diff -crB CodeAnalyst-3_3_18_0361-Public.orig/src/ca_agent/libCAagent/slock.cpp CodeAnalyst-3_3_18_0361-Public/src/ca_agent/libCAagent/slock.cpp +*** CodeAnalyst-3_3_18_0361-Public.orig/src/ca_agent/libCAagent/slock.cpp 2012-04-13 02:41:43.000000000 -0300 +--- CodeAnalyst-3_3_18_0361-Public/src/ca_agent/libCAagent/slock.cpp 2012-04-22 17:26:58.424026278 -0300 +*************** +*** 13,18 **** +--- 13,19 ---- + #include <sys/ipc.h> + #include <sys/sem.h> + #include <sys/stat.h> ++ #include <unistd.h> + + #include "slock.h" + #include "smm.h" diff --git a/~lukeshu/not-working/codeanalyst/kernel3.4.patch b/~lukeshu/not-working/codeanalyst/kernel3.4.patch new file mode 100644 index 000000000..589abc800 --- /dev/null +++ b/~lukeshu/not-working/codeanalyst/kernel3.4.patch @@ -0,0 +1,72 @@ +diff -ru kernel2.6.38/Makefile kernel3.4/Makefile +--- kernel2.6.38/Makefile 2012-04-13 01:41:43.000000000 -0400 ++++ kernel3.4/Makefile 2012-07-11 11:32:27.000000000 -0400 +@@ -1,6 +1,6 @@ + TARGET = oprofile.ko + +-MDIR = $(if $(shell uname -m | grep x86_64),arch/x86/oprofile,arch/x86/oprofile) ++MDIR = arch/x86/oprofile + + DRIVER_OBJS = oprof.o cpu_buffer.o buffer_sync.o \ + event_buffer.o oprofile_files.o \ +@@ -16,7 +16,8 @@ + CURRENT = $(shell uname -r) + ARCH = $(if $(shell uname -m | grep x86_64),64,32) + KERN_ARCH = $(if $(shell uname -m | grep x86_64),x86_64,i386) +-KDIR = /lib/modules/$(CURRENT)/build ++SYS_KDIR = /lib/modules/$(CURRENT)/build ++KDIR = $(PWD)/../build + PWD = $(shell pwd) + DEST = /lib/modules/$(CURRENT)/kernel/$(MDIR) + USE_INTERNAL_ERRATA = $(if $(shell ls ../internal/errata.h 2> /dev/null),1,0) +@@ -39,6 +40,8 @@ + all: default + + default: ++ rm -rf $(KDIR) ++ cp -r $(SYS_KDIR)/ $(KDIR) + make -C $(KDIR) SUBDIRS=$(PWD) CFLAGS_MODULE+="-DMODULE -DUSE_INTERNAL_ERRATA=$(USE_INTERNAL_ERRATA)" modules ARCH=$(KERN_ARCH) + + install: +@@ -52,13 +55,12 @@ + + uninstall: + @echo "... Restore original oprofile.ko." +- @mv -v $(DEST)/$(TARGET).orig $(DEST)/$(TARGET) ++ @mv -v $(DEST)/$(TARGET).orig $(DEST)/$(TARGET) + + clean: + rm -f *.o oprofile.ko .*.cmd .*.flags *.mod.c + + prebuild: + cp $(TARGET) ../prebuilds/$(CURRENT)_$(ARCH).ko +- + +--include $(KDIR)/Rules.make ++-include $(SYS_KDIR)/Rules.make +Only in kernel3.4/: modules.order +Only in kernel3.4/: Module.symvers +diff -ru kernel2.6.38/nmi_int.c kernel3.4/nmi_int.c +--- kernel2.6.38/nmi_int.c 2012-04-13 01:41:43.000000000 -0400 ++++ kernel3.4/nmi_int.c 2012-07-11 11:32:27.000000000 -0400 +@@ -16,7 +16,6 @@ + #include <linux/notifier.h> + #include <linux/smp.h> + #include "oprofile.h" +-#include <linux/sysdev.h> + #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,0,0) + #include <linux/syscore_ops.h> + #endif +diff -ru kernel2.6.38/oprofilefs.c kernel3.4/oprofilefs.c +--- kernel2.6.38/oprofilefs.c 2012-04-13 01:41:43.000000000 -0400 ++++ kernel3.4/oprofilefs.c 2012-07-11 11:32:27.000000000 -0400 +@@ -244,7 +244,7 @@ + return -ENOMEM; + root_inode->i_op = &simple_dir_inode_operations; + root_inode->i_fop = &simple_dir_operations; +- root_dentry = d_alloc_root(root_inode); ++ root_dentry = d_make_root(root_inode); + if (!root_dentry) { + iput(root_inode); + return -ENOMEM; +Only in kernel3.4/: .tmp_versions diff --git a/~lukeshu/not-working/codeanalyst/skipSetup.patch b/~lukeshu/not-working/codeanalyst/skipSetup.patch new file mode 100644 index 000000000..fdc9bf42f --- /dev/null +++ b/~lukeshu/not-working/codeanalyst/skipSetup.patch @@ -0,0 +1,68 @@ +diff -crB CodeAnalyst-3_3_18_0361-Public.orig/src/ca/Makefile.am CodeAnalyst-3_3_18_0361-Public/src/ca/Makefile.am +*** CodeAnalyst-3_3_18_0361-Public.orig/src/ca/Makefile.am 2012-04-13 02:41:43.000000000 -0300 +--- CodeAnalyst-3_3_18_0361-Public/src/ca/Makefile.am 2012-04-22 20:44:07.437917684 -0300 +*************** +*** 8,19 **** + # FIXME [3.0] diffgui \ + # $(CA_RELEASE_TYPE) + +! install-exec-hook: +! @if test -e "scripts/Setup.sh"; then \ +! scripts/Setup.sh $(DESTDIR)$(prefix); \ +! fi + +! uninstall-hook: +! @if test -e "scripts/Uninstall.sh"; then \ +! scripts/Uninstall.sh $(DESTDIR)$(prefix);\ +! fi +--- 8,19 ---- + # FIXME [3.0] diffgui \ + # $(CA_RELEASE_TYPE) + +! #install-exec-hook: +! # @if test -e "scripts/Setup.sh"; then \ +! # scripts/Setup.sh $(DESTDIR)$(prefix); \ +! # fi + +! #uninstall-hook: +! # @if test -e "scripts/Uninstall.sh"; then \ +! # scripts/Uninstall.sh $(DESTDIR)$(prefix);\ +! # fi +diff -crB CodeAnalyst-3_3_18_0361-Public.orig/src/ca_agent/jvmpi/Makefile.am CodeAnalyst-3_3_18_0361-Public/src/ca_agent/jvmpi/Makefile.am +*** CodeAnalyst-3_3_18_0361-Public.orig/src/ca_agent/jvmpi/Makefile.am 2012-04-13 02:41:43.000000000 -0300 +--- CodeAnalyst-3_3_18_0361-Public/src/ca_agent/jvmpi/Makefile.am 2012-04-22 20:47:21.604593511 -0300 +*************** +*** 15,20 **** + libCAJVMPIA_so_SOURCES = \ + jpa.cpp + +! install-exec-hook: +! @/sbin/ldconfig + +--- 15,20 ---- + libCAJVMPIA_so_SOURCES = \ + jpa.cpp + +! #install-exec-hook: +! # @/sbin/ldconfig + +diff -crB CodeAnalyst-3_3_18_0361-Public.orig/src/Makefile.am CodeAnalyst-3_3_18_0361-Public/src/Makefile.am +*** CodeAnalyst-3_3_18_0361-Public.orig/src/Makefile.am 2012-04-13 02:41:43.000000000 -0300 +--- CodeAnalyst-3_3_18_0361-Public/src/Makefile.am 2012-04-22 20:44:57.674586720 -0300 +*************** +*** 8,21 **** + install-exec-hook: + @if test -e "${LIBDWARF_DIR}libdwarf.so"; then \ + install -pD -m 755 ${LIBDWARF_DIR}libdwarf.so $(DESTDIR)$(prefix)/lib/libdwarf.so ; \ +- /sbin/ldconfig ;\ + fi + + uninstall-hook: + @if test -e "${LIBDWARF_DIR}libdwarf.so"; then \ + if test -e "$(DESTDIR)$(prefix)/lib/libdwarf.so"; then \ + rm -f $(DESTDIR)$(prefix)/lib/libdwarf.so ; \ +- /sbin/ldconfig ; \ + fi ; \ + fi + +--- 8,19 ---- diff --git a/~lukeshu/openni-all/openni-git/PKGBUILD b/~lukeshu/openni-all/openni-git/PKGBUILD new file mode 100644 index 000000000..7ac6abb87 --- /dev/null +++ b/~lukeshu/openni-all/openni-git/PKGBUILD @@ -0,0 +1,286 @@ +# Maintainer: Luke Shumaker <lukeshu@sbcglobal.net> +# Contributor: Sven Schneider <archlinux.sandmann@googlemail.com> +# Contributor: bugix +# Contributor: Lubosz Sarnecki <lubosz at gmail> + +# unfortunately we can't use $_suf in function names, but sed makes it ok +_suf='-git' +pkgname=( + openni$_suf + openni$_suf-docs + + openni$_suf-core + openni$_suf-core-samples + openni$_suf-core-samples-source + + openni$_suf-mono + openni$_suf-mono-samples + openni$_suf-mono-samples-source + + openni$_suf-java + openni$_suf-java-samples + openni$_suf-java-samples-source + ) +pkgver=20111121 +pkgrel=4 +arch=('i686' 'x86_64') +url="http://www.openni.org/" +license=('GPL') +makedepends=('git' 'doxygen' 'graphviz') +source=() +md5sums=() + +_gitroot="git://github.com/OpenNI/OpenNI.git" +_gitname="openni" +#_gitbranch="unstable" +_gitbranch="master" + +_os='Linux' +case "${CARCH}" in +'x86_64') _arch=x86;; +'i686') _arch=x86;; +'arm') _arch=Arm;; # untested +*) _arch=UNSUPPORTED_ARCH;; +esac +_platform="${_os}-${_arch}" + +export MAKEFLAGS+=' -j1 ' + +build() { + cd "${srcdir}" + msg "Connecting to GIT server...." + + if [ -d ${_gitname} ] ; then + cd ${_gitname} + git checkout master + git pull origin + msg "The local files are updated." + else + git clone ${_gitroot} ${_gitname} + cd ${_gitname} + fi + git checkout ${_gitbranch} + cd .. + + msg "GIT checkout done or server timeout" + msg "Starting make..." + + rm -rf "${srcdir}/${_gitname}-build" + git clone "${srcdir}/${_gitname}" "${srcdir}/${_gitname}-build" + cd "${srcdir}/${_gitname}-build" + + # PATCH + sed -i 's/python /python2 /' "Platform/${_platform}/CreateRedist/RedistMaker" + echo ' +abs_core: $(ALL_MODULES) $(ALL_UTILS) +abs_core_samples: $(CORE_SAMPLES) +abs_java: $(ALL_JAVA_PROJS) +abs_java_samples: $(JAVA_SAMPLES) +abs_mono: $(ALL_MONO_PROJS) +abs_mono_samples: $(MONO_SAMPLES) $(MONO_FORMS_SAMPLES) +' >> "Platform/${_platform}/Build/Makefile" + + + # BUILD + cd "Platform/${_platform}/Build" + make -j1 \ + abs_core abs_core_samples \ + abs_java abs_java_samples \ + abs_mono abs_mono_samples || return 1 + + cd '../../../Source/DoxyGen' + mkdir html + doxygen Doxyfile + rm -rf html/*.map html*.md5 html/*.hhc html/*.hhp +} + +package_openni-git() { + pkgdesc="Open Natural Interface framework" + depends=("openni$_suf-core") + optdepends=("openni$_suf-docs: programmer documentation") + provides=('openni') + conflicts=('openni') +} + +package_openni-git-docs() { + pkgdesc="OpenNI programmer documentation" + arch=('any') + provides=('openni-docs') + conflicts=('openni-docs') + + cd "${srcdir}/${_gitname}-build/Source/DoxyGen/" + install -d "${pkgdir}/usr/share/openni" + cp -r html "${pkgdir}/usr/share/openni" +} + +package_openni-git-core() { + pkgdesc="OpenNI core libraries" + depends=('libusb' 'freeglut') + install="openni.install" + provides=('openni-core') + conflicts=('openni-core') + + cd "${srcdir}/${_gitname}-build/Platform/${_platform}/Bin/Release" + + LIB_FILES=' + libnimCodecs.so + libnimMockNodes.so + libnimRecorder.so + libOpenNI.so + ' + install -d "${pkgdir}/usr/lib" + install -m755 $LIB_FILES "${pkgdir}/usr/lib" + + BIN_FILES='niReg niLicense' + install -d "${pkgdir}/usr/bin" + install -m755 $BIN_FILES "${pkgdir}/usr/bin" + + cd "${srcdir}/${_gitname}-build/Include" + install -d "${pkgdir}/usr/include/ni" + install -m644 *.h "${pkgdir}/usr/include/ni" + cp -r "${_platform}" "${pkgdir}/usr/include/ni" + + cd "${srcdir}/${_gitname}-build/Platform/${_platform}/Build" + install -d "${pkgdir}/usr/share" + cp -r Common "${pkgdir}/usr/share/common" +} + +package_openni-git-java() { + pkgdesc="OpenNI java wrapper" + depends=("openni$_suf" 'java-environment') + provides=('openni-java') + conflicts=('openni-java') + + cd "${srcdir}/${_gitname}-build/Platform/${_platform}/Bin/Release" + + install -d "${pkgdir}/usr/lib" + install -m755 libOpenNI.jni.so "${pkgdir}/usr/lib" + + install -d "${pkgdir}/usr/share/openni/java" + install -m755 org.OpenNI.jar "${pkgdir}/usr/share/openni/java" +} + +package_openni-git-mono() { + pkgdesc="OpenNI mono wrapper" + depends=("openni$_suf" 'mono') + provides=('openni-mono') + conflicts=('openni-mono') + + cd "${srcdir}/${_gitname}-build/Platform/${_platform}/Bin/Release" + + install -d "${pkgdir}/usr/share/openni/mono" + install -m755 OpenNI.net.dll "${pkgdir}/usr/share/openni/mono" +} + +# SAMPLES + +_install_sample_source() { + sample=$1 + makefile="Platform/${_platform}/Build/Samples/$sample/Makefile" + install -d "${pkgdir}/usr/share/openni/samples" + cp -r "Samples/$sample" "${pkgdir}/usr/share/openni/samples/$sample" + install -m644 "$makefile" "${pkgdir}/usr/share/openni/samples/$sample" +} + +# Leave out NiViewer, it's set up wrong +CORE_SAMPLES=' + AudioSample + BackRecorder + CRead + ConvertXToONI + RecordSynthetic + SimpleCreate + SimpleRead SimpleViewer UserTracker' +MONO_SAMPLES='SimpleRead SimpleViewer UserTracker' +JAVA_SAMPLES='SimpleRead SimpleViewer UserTracker' + +package_openni-git-core-samples() { + pkgdesc="OpenNI sample programs" + depends=("openni$_suf-core") + optdepends=('openni-core-samples-source: source code for the samples') + provides=('openni-core-samples') + conflicts=('openni-core-samples') + + cd "${srcdir}/${_gitname}-build/Platform/${_platform}/Bin/Release" + install -d "${pkgdir}/usr/bin" + install -m755 NiViewer "${pkgdir}/usr/bin/niSample-Viewer" + for sample in $CORE_SAMPLES; do + install -m766 Sample-Ni$sample "${pkgdir}/usr/bin/niSample-$sample" + done +} +package_openni-git-core-samples-source() { + pkgdesc="OpenNI sample programs source code" + depends=("openni$_suf-core") + provides=('openni-core-samples-source') + conflicts=('openni-core-samples-source') + options+=('!strip') + + cd "${srcdir}/${_gitname}-build" + for sample in Viewer $CORE_SAMPLES; do + _install_sample_source Ni$sample + done +} + +package_openni-git-java-samples() { + pkgdesc="OpenNI java wrapper sample programs" + depends=("openni$_suf-java") + optdepends=("openni$_suf-java-samples-source: source code for the samples") + arch=('any') + provides=('openni-java-samples') + conflicts=('openni-java-samples') + + cd "${srcdir}/${_gitname}-build/Platform/${_platform}/Bin/Release" + install -d "${pkgdir}/usr/bin" + install -d "${pkgdir}/usr/share/openni/java" + for sample in $JAVA_SAMPLES; do + install -m644 org.OpenNI.Samples.$sample.jar "${pkgdir}/usr/share/openni/java" + echo "#/bin/sh +java -jar /usr/share/openni/java/org.OpenNI.Samples.$sample.jar $@ +" > "${pkgdir}/usr/bin/niSample-$sample.jar" + chmod 755 "${pkgdir}/usr/bin/niSample-$sample.jar" + done +} +package_openni-git-java-samples-source() { + pkgdesc="OpenNI java wrapper sample programs source code" + depends=("openni$_suf-java") + provides=('openni-java-samples-source') + conflicts=('openni-java-samples-source') + options+=('!strip') + + cd "${srcdir}/${_gitname}-build" + for sample in $JAVA_SAMPLES; do + _install_sample_source $sample.java + done +} + +package_openni-git-mono-samples() { + pkgdesc="OpenNI java wrapper sample programs" + depends=("openni$_suf-mono") + optdepends=("openni$_suf-mono-samples-source: source code for the samples") + provides=('openni-mono-samples') + conflicts=('openni-mono-samples') + + cd "${srcdir}/${_gitname}-build/Platform/${_platform}/Bin/Release" + install -d "${pkgdir}/usr/bin" + install -d "${pkgdir}/usr/share/openni/mono" + for sample in $MONO_SAMPLES; do + install -m755 $sample.net.exe "${pkgdir}/usr/share/openni/mono" + echo "#/bin/sh +cd /usr/share/openni/mono +mono $sample.net.exe $@ +" > "${pkgdir}/usr/bin/niSample-$sample.net" + chmod 755 "${pkgdir}/usr/bin/niSample-$sample.net" + done +} +package_openni-git-mono-samples-source() { + pkgdesc="OpenNI mono wrapper sample programs source code" + depends=("openni$_suf-mono") + provides=('openni-mono-samples-source') + conflicts=('openni-mono-samples-source') + options+=('!strip') + + cd "${srcdir}/${_gitname}-build" + for sample in $MONO_SAMPLES; do + _install_sample_source $sample.net + done +} diff --git a/~lukeshu/openni-all/openni-git/openni.install b/~lukeshu/openni-all/openni-git/openni.install new file mode 100644 index 000000000..8470f4512 --- /dev/null +++ b/~lukeshu/openni-all/openni-git/openni.install @@ -0,0 +1,11 @@ +post_install() { + MODULES="libnimMockNodes.so libnimCodecs.so libnimRecorder.so" + for module in $MODULES + do + /usr/bin/niReg /usr/lib/$module + done +} + +pre_remove() { + rm /var/lib/ni/modules.xml +} diff --git a/~lukeshu/openni-all/openni-module-primesensor-git/PKGBUILD b/~lukeshu/openni-all/openni-module-primesensor-git/PKGBUILD new file mode 100644 index 000000000..0ebfac2e5 --- /dev/null +++ b/~lukeshu/openni-all/openni-module-primesensor-git/PKGBUILD @@ -0,0 +1,65 @@ +# Maintainer: Luke Shumaker <lukeshu@sbcglobal.net> +# Contributor: pallegro from the AUR + +_pkgname=openni-module-primesensor +pkgname=${_pkgname}-git +pkgver=20111115 +pkgrel=1 +pkgdesc="OpenNI PrimeSensor harware modules for the PrimeSense sensor device" +arch=('i686') +url="http://www.primesense.com/" +license=('GPL') +depends=('openni') +makedepends=('git') +provides=($_pkgname) +conflicts=($_pkgname) +install="sensorkinect.install" +source=() +md5sums=() + +_gitroot="https://github.com/PrimeSense/Sensor.git" +_gitname="primesensor" +_gitbranch="unstable" +#_gitbranch="master" + +build() { + cd "$srcdir" + msg "Connecting to GIT server...." + + if [ -d $_gitname ] ; then + cd $_gitname && git pull origin + msg "The local files are updated." + else + git clone -b $_gitbranch $_gitroot $_gitname + fi + + msg "GIT checkout done or server timeout" + msg "Starting make..." + + rm -rf "$srcdir/$_gitname-build" + git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build" + cd $srcdir/$_gitname-build + + # BUILD + cd Platform/Linux-x86/Build + make NI_CONF_DIR=/etc || return 1 +} + +package() { + install -d -m755 ${pkgdir}/usr/{lib,bin} + + cd $srcdir/$_gitname-build/Platform/Linux-x86/Bin/Release + install XnSensorServer ${pkgdir}/usr/bin + install libXnCore.so libXnDDK.so libXnDeviceFile.so libXnDeviceSensorV2KM.so libXnFormats.so ${pkgdir}/usr/lib + chmod +s ${pkgdir}/usr/bin/XnSensorServer + + cd $srcdir/$_gitname-build/Platform/Linux-x86/Install + install -d -m755 ${pkgdir}/etc/udev/rules.d + install 55-primesense-usb.rules ${pkgdir}/etc/udev/rules.d + + cd $srcdir/$_gitname-build/Data + install -d -m755 ${pkgdir}/etc/primesense + install GlobalDefaultsKinect.ini ${pkgdir}/etc/primesense + + install -d -m777 ${pkgdir}/var/log/primesense/XnSensorServer +} diff --git a/~lukeshu/openni-all/openni-module-sensorkinect-git/PKGBUILD b/~lukeshu/openni-all/openni-module-sensorkinect-git/PKGBUILD new file mode 100644 index 000000000..2a2abbdc5 --- /dev/null +++ b/~lukeshu/openni-all/openni-module-sensorkinect-git/PKGBUILD @@ -0,0 +1,77 @@ +# Maintainer: Luke Shumaker <lukeshu@sbcglobal.net> +# Contributor: pallegro from the AUR + +pkgname=openni-module-sensorkinect-git +pkgver=20111211 +pkgrel=2 +pkgdesc="OpenNI SensorKinect harware modules for the Xbox Kinect device" +arch=('i686' 'x86_64') +url="https://github.com/avin2/SensorKinect" +license=('GPL') +depends=('openni-unstable' 'kinect-udev') +makedepends=('git') +provides=('openni-module-sensorkinect') +conflicts=('openni-module-sensorkinect' 'openni-module-primesensor') +install="sensorkinect.install" +source=() +md5sums=() + +_gitroot="https://github.com/avin2/SensorKinect.git" +_gitname="sensorkinect" +_gitbranch="master" + +_os='Linux' +case "${CARCH}" in +'x86_64') _arch=x86;; +'i686') _arch=x86;; +'arm') _arch=Arm;; # untested +*) _arch=UNSUPPORTED_ARCH;; +esac +_platform="${_os}-${_arch}" + +build() { + cd "$srcdir" + msg "Connecting to GIT server...." + + if [ -d ${_gitname} ] ; then + cd ${_gitname} + git checkout master + git pull origin + msg "The local files are updated." + else + git clone ${_gitroot} ${_gitname} + cd ${_gitname} + fi + git checkout ${_gitbranch} + cd .. + + msg "GIT checkout done or server timeout" + msg "Starting build..." + + rm -rf "$srcdir/$_gitname-build" + git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build" + cd $srcdir/$_gitname-build + + # BUILD + cd Platform/${_platform}/Build + make + make redist +} + +package() { + cd $srcdir/$_gitname-build + cd Platform/${_platform}/Redist + + # This is all cloned from ./install.sh, which can't be used for a number + # of reasons. + install -d $pkgdir/usr/{lib,bin} + install -m755 Lib/* $pkgdir/usr/lib + install -m755 Bin/* $pkgdir/usr/bin + + install -d $pkgdir/etc/primesense + install -m644 Config/GlobalDefaultsKinect.ini $pkgdir/etc/primesense + + chmod +s $pkgdir/usr/bin/XnSensorServer + + install -m777 -d $pkgdir/var/log/primesense/XnSensorServer +} diff --git a/~lukeshu/openni-all/openni-module-sensorkinect-git/sensorkinect.install b/~lukeshu/openni-all/openni-module-sensorkinect-git/sensorkinect.install new file mode 100644 index 000000000..d62d263d1 --- /dev/null +++ b/~lukeshu/openni-all/openni-module-sensorkinect-git/sensorkinect.install @@ -0,0 +1,15 @@ +#!/bin/sh + +export MODULES="libXnDeviceSensorV2KM.so libXnDeviceFile.so" + +post_install() { + for module in $MODULES; do + /usr/bin/niReg -r /usr/lib/$module /etc/primesense + done +} + +pre_remove() { + for module in $MODULES; do + /usr/bin/niReg -u /usr/lib/$module + done +} diff --git a/~lukeshu/openni-all/openni-unstable-git/PKGBUILD b/~lukeshu/openni-all/openni-unstable-git/PKGBUILD new file mode 100644 index 000000000..07f276b02 --- /dev/null +++ b/~lukeshu/openni-all/openni-unstable-git/PKGBUILD @@ -0,0 +1,286 @@ +# Maintainer: Luke Shumaker <lukeshu@sbcglobal.net> +# Contributor: Sven Schneider <archlinux.sandmann@googlemail.com> +# Contributor: bugix +# Contributor: Lubosz Sarnecki <lubosz at gmail> + +# unfortunately we can't use $_suf in function names, but sed makes it ok +_suf='-unstable-git' +pkgname=( + openni$_suf + openni$_suf-docs + + openni$_suf-core + openni$_suf-core-samples + openni$_suf-core-samples-source + + openni$_suf-mono + openni$_suf-mono-samples + openni$_suf-mono-samples-source + + openni$_suf-java + openni$_suf-java-samples + openni$_suf-java-samples-source + ) +pkgver=20111121 +pkgrel=4 +arch=('i686' 'x86_64') +url="http://www.openni.org/" +license=('GPL') +makedepends=('git' 'doxygen' 'graphviz') +source=() +md5sums=() + +_gitroot="git://github.com/OpenNI/OpenNI.git" +_gitname="openni" +_gitbranch="unstable" +#_gitbranch="master" + +_os='Linux' +case "${CARCH}" in +'x86_64') _arch=x86;; +'i686') _arch=x86;; +'arm') _arch=Arm;; # untested +*) _arch=UNSUPPORTED_ARCH;; +esac +_platform="${_os}-${_arch}" + +export MAKEFLAGS+=' -j1 ' + +build() { + cd "${srcdir}" + msg "Connecting to GIT server...." + + if [ -d ${_gitname} ] ; then + cd ${_gitname} + git checkout master + git pull origin + msg "The local files are updated." + else + git clone ${_gitroot} ${_gitname} + cd ${_gitname} + fi + git checkout ${_gitbranch} + cd .. + + msg "GIT checkout done or server timeout" + msg "Starting make..." + + rm -rf "${srcdir}/${_gitname}-build" + git clone "${srcdir}/${_gitname}" "${srcdir}/${_gitname}-build" + cd "${srcdir}/${_gitname}-build" + + # PATCH + sed -i 's/python /python2 /' "Platform/${_os}/CreateRedist/RedistMaker" + echo ' +abs_core: $(ALL_MODULES) $(ALL_UTILS) +abs_core_samples: $(CORE_SAMPLES) +abs_java: $(ALL_JAVA_PROJS) +abs_java_samples: $(JAVA_SAMPLES) +abs_mono: $(ALL_MONO_PROJS) +abs_mono_samples: $(MONO_SAMPLES) $(MONO_FORMS_SAMPLES) +' >> "Platform/${_os}/Build/Makefile" + + + # BUILD + cd "Platform/${_os}/Build" + make -j1 \ + abs_core abs_core_samples \ + abs_java abs_java_samples \ + abs_mono abs_mono_samples || return 1 + + cd '../../../Source/DoxyGen' + mkdir html + doxygen Doxyfile + rm -rf html/*.map html*.md5 html/*.hhc html/*.hhp +} + +package_openni-unstable-git() { + pkgdesc="Open Natural Interface framework" + depends=("openni$_suf-core") + optdepends=("openni$_suf-docs: programmer documentation") + provides=('openni' 'openni-unstable') + conflicts=('openni' 'openni-unstable') +} + +package_openni-unstable-git-docs() { + pkgdesc="OpenNI programmer documentation" + arch=('any') + provides=('openni-docs' 'openni-unstable-docs') + conflicts=('openni-docs' 'openni-unstable-docs') + + cd "${srcdir}/${_gitname}-build/Source/DoxyGen/" + install -d "${pkgdir}/usr/share/openni" + cp -r html "${pkgdir}/usr/share/openni" +} + +package_openni-unstable-git-core() { + pkgdesc="OpenNI core libraries" + depends=('libusb' 'freeglut') + install="openni.install" + provides=('openni-core' 'openni-unstable-core') + conflicts=('openni-core' 'openni-unstable-core') + + cd "${srcdir}/${_gitname}-build/Platform/${_os}/Bin/${_arch}-Release" + + LIB_FILES=' + libnimCodecs.so + libnimMockNodes.so + libnimRecorder.so + libOpenNI.so + ' + install -d "${pkgdir}/usr/lib" + install -m755 $LIB_FILES "${pkgdir}/usr/lib" + + BIN_FILES='niReg niLicense' + install -d "${pkgdir}/usr/bin" + install -m755 $BIN_FILES "${pkgdir}/usr/bin" + + cd "${srcdir}/${_gitname}-build/Include" + install -d "${pkgdir}/usr/include/ni" + install -m644 *.h "${pkgdir}/usr/include/ni" + cp -r "${_platform}" "${pkgdir}/usr/include/ni" + + cd "${srcdir}/${_gitname}-build/Platform/${_os}/Build" + install -d "${pkgdir}/usr/share" + cp -r Common "${pkgdir}/usr/share/common" +} + +package_openni-unstable-git-java() { + pkgdesc="OpenNI java wrapper" + depends=("openni$_suf" 'java-environment') + provides=('openni-java' 'openni-unstable-java') + conflicts=('openni-java' 'openni-unstable-java') + + cd "${srcdir}/${_gitname}-build/Platform/${_os}/Bin/${_arch}-Release" + + install -d "${pkgdir}/usr/lib" + install -m755 libOpenNI.jni.so "${pkgdir}/usr/lib" + + install -d "${pkgdir}/usr/share/openni/java" + install -m755 org.OpenNI.jar "${pkgdir}/usr/share/openni/java" +} + +package_openni-unstable-git-mono() { + pkgdesc="OpenNI mono wrapper" + depends=("openni$_suf" 'mono') + provides=('openni-mono' 'openni-unstable-mono') + conflicts=('openni-mono' 'openni-unstable-mono') + + cd "${srcdir}/${_gitname}-build/Platform/${_os}/Bin/${_arch}-Release" + + install -d "${pkgdir}/usr/share/openni/mono" + install -m755 OpenNI.net.dll "${pkgdir}/usr/share/openni/mono" +} + +# SAMPLES + +_install_sample_source() { + sample=$1 + makefile="Platform/${_os}/Build/Samples/$sample/Makefile" + install -d "${pkgdir}/usr/share/openni/samples" + cp -r "Samples/$sample" "${pkgdir}/usr/share/openni/samples/$sample" + install -m644 "$makefile" "${pkgdir}/usr/share/openni/samples/$sample" +} + +# Leave out NiViewer, it's set up wrong +CORE_SAMPLES=' + AudioSample + BackRecorder + CRead + ConvertXToONI + RecordSynthetic + SimpleCreate + SimpleRead SimpleViewer UserTracker' +MONO_SAMPLES='SimpleRead SimpleViewer UserTracker' +JAVA_SAMPLES='SimpleRead SimpleViewer UserTracker' + +package_openni-unstable-git-core-samples() { + pkgdesc="OpenNI sample programs" + depends=("openni$_suf-core") + optdepends=('openni-core-samples-source: source code for the samples') + provides=('openni-core-samples' 'openni-unstable-core-samples') + conflicts=('openni-core-samples' 'openni-unstable-core-samples') + + cd "${srcdir}/${_gitname}-build/Platform/${_os}/Bin/${_arch}-Release" + install -d "${pkgdir}/usr/bin" + install -m755 NiViewer "${pkgdir}/usr/bin/niSample-Viewer" + for sample in $CORE_SAMPLES; do + install -m766 Sample-Ni$sample "${pkgdir}/usr/bin/niSample-$sample" + done +} +package_openni-unstable-git-core-samples-source() { + pkgdesc="OpenNI sample programs source code" + depends=("openni$_suf-core") + provides=('openni-core-samples-source' 'openni-unstable-core-samples-source') + conflicts=('openni-core-samples-source' 'openni-unstable-core-samples-source') + options+=('!strip') + + cd "${srcdir}/${_gitname}-build" + for sample in Viewer $CORE_SAMPLES; do + _install_sample_source Ni$sample + done +} + +package_openni-unstable-git-java-samples() { + pkgdesc="OpenNI java wrapper sample programs" + depends=("openni$_suf-java") + optdepends=("openni$_suf-java-samples-source: source code for the samples") + arch=('any') + provides=('openni-java-samples' 'openni-unstable-java-samples') + conflicts=('openni-java-samples' 'openni-unstable-java-samples') + + cd "${srcdir}/${_gitname}-build/Platform/${_os}/Bin/${_arch}-Release" + install -d "${pkgdir}/usr/bin" + install -d "${pkgdir}/usr/share/openni/java" + for sample in $JAVA_SAMPLES; do + install -m644 org.OpenNI.Samples.$sample.jar "${pkgdir}/usr/share/openni/java" + echo "#/bin/sh +java -jar /usr/share/openni/java/org.OpenNI.Samples.$sample.jar $@ +" > "${pkgdir}/usr/bin/niSample-$sample.jar" + chmod 755 "${pkgdir}/usr/bin/niSample-$sample.jar" + done +} +package_openni-unstable-git-java-samples-source() { + pkgdesc="OpenNI java wrapper sample programs source code" + depends=("openni$_suf-java") + provides=('openni-java-samples-source' 'openni-unstable-java-samples-source') + conflicts=('openni-java-samples-source' 'openni-unstable-java-samples-source') + options+=('!strip') + + cd "${srcdir}/${_gitname}-build" + for sample in $JAVA_SAMPLES; do + _install_sample_source $sample.java + done +} + +package_openni-unstable-git-mono-samples() { + pkgdesc="OpenNI java wrapper sample programs" + depends=("openni$_suf-mono") + optdepends=("openni$_suf-mono-samples-source: source code for the samples") + provides=('openni-mono-samples' 'openni-unstable-mono-samples') + conflicts=('openni-mono-samples' 'openni-unstable-mono-samples') + + cd "${srcdir}/${_gitname}-build/Platform/${_os}/Bin/${_arch}-Release" + install -d "${pkgdir}/usr/bin" + install -d "${pkgdir}/usr/share/openni/mono" + for sample in $MONO_SAMPLES; do + install -m755 $sample.net.exe "${pkgdir}/usr/share/openni/mono" + echo "#/bin/sh +cd /usr/share/openni/mono +mono $sample.net.exe $@ +" > "${pkgdir}/usr/bin/niSample-$sample.net" + chmod 755 "${pkgdir}/usr/bin/niSample-$sample.net" + done +} +package_openni-unstable-git-mono-samples-source() { + pkgdesc="OpenNI mono wrapper sample programs source code" + depends=("openni$_suf-mono") + provides=('openni-mono-samples-source' 'openni-unstable-mono-samples-source') + conflicts=('openni-mono-samples-source' 'openni-unstable-mono-samples-source') + options+=('!strip') + + cd "${srcdir}/${_gitname}-build" + for sample in $MONO_SAMPLES; do + _install_sample_source $sample.net + done +} diff --git a/~lukeshu/openni-all/openni-unstable-git/openni.install b/~lukeshu/openni-all/openni-unstable-git/openni.install new file mode 100644 index 000000000..8470f4512 --- /dev/null +++ b/~lukeshu/openni-all/openni-unstable-git/openni.install @@ -0,0 +1,11 @@ +post_install() { + MODULES="libnimMockNodes.so libnimCodecs.so libnimRecorder.so" + for module in $MODULES + do + /usr/bin/niReg /usr/lib/$module + done +} + +pre_remove() { + rm /var/lib/ni/modules.xml +} diff --git a/~lukeshu/openni-all/openni-unstable/PKGBUILD b/~lukeshu/openni-all/openni-unstable/PKGBUILD new file mode 100644 index 000000000..19d1575a1 --- /dev/null +++ b/~lukeshu/openni-all/openni-unstable/PKGBUILD @@ -0,0 +1,294 @@ +# Maintainer: Luke Shumaker <lukeshu@sbcglobal.net> +# Contributor: Sven Schneider <archlinux.sandmann@googlemail.com> +# Contributor: bugix +# Contributor: Lubosz Sarnecki <lubosz at gmail> + +# unfortunately we can't use $_suf in function names, but sed makes it ok +_suf='-unstable' +pkgname=( + openni$_suf + openni$_suf-docs + + openni$_suf-core + openni$_suf-core-samples + openni$_suf-core-samples-source + + openni$_suf-mono + openni$_suf-mono-samples + openni$_suf-mono-samples-source + + openni$_suf-java + openni$_suf-java-samples + openni$_suf-java-samples-source + ) +pkgver=1.4.0.2 +pkgrel=1 +arch=('i686' 'x86_64') +url="http://www.openni.org/" +license=('GPL') +makedepends=('git' 'doxygen' 'graphviz') +options+=('!strip') +source=() +md5sums=() + +__gitroot="git://github.com/OpenNI/OpenNI.git" +_gitname="openni" +_gitbranch="Unstable-$pkgver" + +_os='Linux' +case "${CARCH}" in +'x86_64') _arch=x64;; +'i686') _arch=x86;; +'arm') _arch=Arm;; # untested +*) _arch=UNSUPPORTED_ARCH;; +esac +_platform="${_os}-${_arch}" + +export MAKEFLAGS+=' -j1 ' + +build() { + cd "${srcdir}" + msg "Connecting to GIT server...." + + #if [ -d ${_gitname} ] ; then + cd ${_gitname} + # git checkout master + # git pull origin + # msg "The local files are updated." + #else + # git clone ${__gitroot} ${_gitname} + # cd ${_gitname} + #fi + git checkout ${_gitbranch} + cd .. + + msg "GIT checkout done or server timeout" + msg "Starting build..." + + #rm -rf "${srcdir}/${_gitname}-build" + #git clone "${srcdir}/${_gitname}" "${srcdir}/${_gitname}-build" + cd "${srcdir}/${_gitname}-build" + + # PATCH + sed -i 's/python /python2 /' "Platform/${_os}/CreateRedist/RedistMaker" + + for sample in NiViewer NiSimpleViewer NiUserTracker NiUserSelection NiHandTracker; do + echo 'USED_LIBS += GL' >> "Platform/${_os}/Build/Samples/${sample}/Makefile" + done + + echo ' +abs_core: $(ALL_MODULES) $(ALL_UTILS) +abs_core_samples: $(CORE_SAMPLES) +abs_java: $(ALL_JAVA_PROJS) +abs_java_samples: $(JAVA_SAMPLES) +abs_mono: $(ALL_MONO_PROJS) +abs_mono_samples: $(MONO_SAMPLES) $(MONO_FORMS_SAMPLES) +' >> "Platform/${_os}/Build/Makefile" + + + # BUILD + cd "Platform/${_os}/Build" + make -j1 \ + abs_core abs_core_samples \ + abs_java abs_java_samples \ + abs_mono abs_mono_samples + cd "../Bin/${_arch}-Release" + ln NiViewer Sample-NiViewer + + cd '../../../Source/DoxyGen' + mkdir html + doxygen Doxyfile + rm -rf html/*.map html*.md5 html/*.hhc html/*.hhp +} + +package_openni-unstable() { + pkgdesc="Open Natural Interface framework" + depends=("openni$_suf-core") + optdepends=("openni$_suf-docs: programmer documentation") + provides=('openni') + conflicts=('openni') +} + +package_openni-unstable-docs() { + pkgdesc="OpenNI programmer documentation" + arch=('any') + provides=('openni-docs') + conflicts=('openni-docs') + + cd "${srcdir}/${_gitname}-build/Source/DoxyGen/" + install -d "${pkgdir}/usr/share/openni" + cp -r html "${pkgdir}/usr/share/openni" +} + +package_openni-unstable-core() { + pkgdesc="OpenNI core libraries" + depends=('libusb' 'freeglut') + install="openni-core.install" + provides=('openni-core') + conflicts=('openni-core') + + cd "${srcdir}/${_gitname}-build/Platform/${_os}/Bin/${_arch}-Release" + + LIB_FILES=' + libnimCodecs.so + libnimMockNodes.so + libnimRecorder.so + libOpenNI.so + ' + install -d "${pkgdir}/usr/lib" + install -m755 $LIB_FILES "${pkgdir}/usr/lib" + + BIN_FILES='niReg niLicense' + install -d "${pkgdir}/usr/bin" + install -m755 $BIN_FILES "${pkgdir}/usr/bin" + + cd "${srcdir}/${_gitname}-build/Include" + install -d "${pkgdir}/usr/include/ni" + install -m644 *.h "${pkgdir}/usr/include/ni" + cp -r "${_platform}" "${pkgdir}/usr/include/ni" + + cd "${srcdir}/${_gitname}-build/Platform/${_os}/Build" + install -d "${pkgdir}/usr/share" + cp -r Common "${pkgdir}/usr/share/common" + + install -d "${pkgdir}/var/lib/ni" +} + +package_openni-unstable-java() { + pkgdesc="OpenNI java wrapper" + depends=("openni$_suf" 'java-environment') + provides=('openni-java') + conflicts=('openni-java') + + cd "${srcdir}/${_gitname}-build/Platform/${_os}/Bin/${_arch}-Release" + + install -d "${pkgdir}/usr/lib" + install -m755 libOpenNI.jni.so "${pkgdir}/usr/lib" + + install -d "${pkgdir}/usr/share/openni/java" + install -m755 org.OpenNI.jar "${pkgdir}/usr/share/openni/java" +} + +package_openni-unstable-mono() { + pkgdesc="OpenNI mono wrapper" + depends=("openni$_suf" 'mono') + install="openni-mono.install" + provides=('openni-mono') + conflicts=('openni-mono') + + cd "${srcdir}/${_gitname}-build/Platform/${_os}/Bin/${_arch}-Release" + + install -d "${pkgdir}/usr/share/openni/mono" + install -m755 OpenNI.net.dll "${pkgdir}/usr/share/openni/mono" +} + +# SAMPLES + +_install_sample_source() { + sample=$1 + makefile="Platform/${_os}/Build/Samples/$sample/Makefile" + install -d "${pkgdir}/usr/share/openni/samples" + cp -r "Samples/$sample" "${pkgdir}/usr/share/openni/samples/$sample" + install -m644 "$makefile" "${pkgdir}/usr/share/openni/samples/$sample" +} + +CORE_SAMPLES=' + AudioSample + BackRecorder + CRead + ConvertXToONI + HandTracker + RecordSynthetic + SimpleCreate + UserSelection + Viewer + SimpleRead SimpleViewer UserTracker' +MONO_SAMPLES='SimpleRead SimpleViewer UserTracker' +JAVA_SAMPLES='SimpleRead SimpleViewer UserTracker' + +package_openni-unstable-core-samples() { + pkgdesc="OpenNI sample programs" + depends=("openni$_suf-core") + optdepends=('openni-core-samples-source: source code for the samples') + provides=('openni-core-samples') + conflicts=('openni-core-samples') + + cd "${srcdir}/${_gitname}-build/Platform/${_os}/Bin/${_arch}-Release" + install -d "${pkgdir}/usr/bin" + for sample in $CORE_SAMPLES; do + install -m755 Sample-Ni$sample "${pkgdir}/usr/bin/niSample-$sample" + done +} +package_openni-unstable-core-samples-source() { + pkgdesc="OpenNI sample programs source code" + depends=("openni$_suf-core") + provides=('openni-core-samples-source') + conflicts=('openni-core-samples-source') + + cd "${srcdir}/${_gitname}-build" + for sample in Viewer $CORE_SAMPLES; do + _install_sample_source Ni$sample + done +} + +package_openni-unstable-java-samples() { + pkgdesc="OpenNI java wrapper sample programs" + depends=("openni$_suf-java") + optdepends=("openni$_suf-java-samples-source: source code for the samples") + arch=('any') + provides=('openni-java-samples') + conflicts=('openni-java-samples') + + cd "${srcdir}/${_gitname}-build/Platform/${_os}/Bin/${_arch}-Release" + install -d "${pkgdir}/usr/bin" + install -d "${pkgdir}/usr/share/openni/java" + for sample in $JAVA_SAMPLES; do + install -m644 org.OpenNI.Samples.$sample.jar "${pkgdir}/usr/share/openni/java" + echo "#/bin/sh +java -jar /usr/share/openni/java/org.OpenNI.Samples.$sample.jar $@ +" > "${pkgdir}/usr/bin/niSample-$sample.jar" + chmod 755 "${pkgdir}/usr/bin/niSample-$sample.jar" + done +} +package_openni-unstable-java-samples-source() { + pkgdesc="OpenNI java wrapper sample programs source code" + depends=("openni$_suf-java") + provides=('openni-java-samples-source') + conflicts=('openni-java-samples-source') + + cd "${srcdir}/${_gitname}-build" + for sample in $JAVA_SAMPLES; do + _install_sample_source $sample.java + done +} + +package_openni-unstable-mono-samples() { + pkgdesc="OpenNI java wrapper sample programs" + depends=("openni$_suf-mono") + optdepends=("openni$_suf-mono-samples-source: source code for the samples") + provides=('openni-mono-samples') + conflicts=('openni-mono-samples') + + cd "${srcdir}/${_gitname}-build/Platform/${_os}/Bin/${_arch}-Release" + install -d "${pkgdir}/usr/bin" + install -d "${pkgdir}/usr/share/openni/mono" + for sample in $MONO_SAMPLES; do + install -m755 $sample.net.exe "${pkgdir}/usr/share/openni/mono" + echo "#/bin/sh +cd /usr/share/openni/mono +mono $sample.net.exe $@ +" > "${pkgdir}/usr/bin/niSample-$sample.net" + chmod 755 "${pkgdir}/usr/bin/niSample-$sample.net" + done +} +package_openni-unstable-mono-samples-source() { + pkgdesc="OpenNI mono wrapper sample programs source code" + depends=("openni$_suf-mono") + provides=('openni-mono-samples-source') + conflicts=('openni-mono-samples-source') + + cd "${srcdir}/${_gitname}-build" + for sample in $MONO_SAMPLES; do + _install_sample_source $sample.net + done +} diff --git a/~lukeshu/openni-all/openni-unstable/openni-core.install b/~lukeshu/openni-all/openni-unstable/openni-core.install new file mode 100644 index 000000000..8470f4512 --- /dev/null +++ b/~lukeshu/openni-all/openni-unstable/openni-core.install @@ -0,0 +1,11 @@ +post_install() { + MODULES="libnimMockNodes.so libnimCodecs.so libnimRecorder.so" + for module in $MODULES + do + /usr/bin/niReg /usr/lib/$module + done +} + +pre_remove() { + rm /var/lib/ni/modules.xml +} diff --git a/~lukeshu/openni-all/openni-unstable/openni-mono.install b/~lukeshu/openni-all/openni-unstable/openni-mono.install new file mode 100644 index 000000000..72a6fb23d --- /dev/null +++ b/~lukeshu/openni-all/openni-unstable/openni-mono.install @@ -0,0 +1,7 @@ +post_install() { + gacutil -i /usr/share/openni/mono/OpenNI.net.dll -gacdir /usr +} + +post_remove() { + gacutil -u OpenNI.net -gacdir /usr +} diff --git a/~lukeshu/openni-all/openni/PKGBUILD b/~lukeshu/openni-all/openni/PKGBUILD new file mode 100644 index 000000000..2cdc2fd7d --- /dev/null +++ b/~lukeshu/openni-all/openni/PKGBUILD @@ -0,0 +1,288 @@ +# Maintainer: Luke Shumaker <lukeshu@sbcglobal.net> +# Contributor: Sven Schneider <archlinux.sandmann@googlemail.com> +# Contributor: bugix +# Contributor: Lubosz Sarnecki <lubosz at gmail> + +# unfortunately we can't use $_suf in function names, but sed makes it ok +_suf='' +pkgname=( + openni$_suf + openni$_suf-docs + + openni$_suf-core + openni$_suf-core-samples + openni$_suf-core-samples-source + + openni$_suf-mono + openni$_suf-mono-samples + openni$_suf-mono-samples-source + + openni$_suf-java + openni$_suf-java-samples + openni$_suf-java-samples-source + ) +pkgver=1.3.3.6 +pkgrel=4 +arch=('i686' 'x86_64') +url="http://www.openni.org/" +license=('GPL') +makedepends=('git' 'doxygen' 'graphviz') +source=() +md5sums=() + +__gitroot="git://github.com/OpenNI/OpenNI.git" +_gitname="openni" +#_gitbranch="unstable" +#_gitbranch="master" +_gitbranch="Stable-$pkgver" + +_os='Linux' +case "${CARCH}" in +'x86_64') _arch=x86;; +'i686') _arch=x86;; +'arm') _arch=Arm;; # untested +*) _arch=UNSUPPORTED_ARCH;; +esac +_platform="${_os}-${_arch}" + +export MAKEFLAGS+=' -j1 ' + +build() { + cd "${srcdir}" + msg "Connecting to GIT server...." + + if [ -d ${_gitname} ] ; then + cd ${_gitname} + git checkout master + git pull origin + msg "The local files are updated." + else + git clone ${__gitroot} ${_gitname} + cd ${_gitname} + fi + git checkout ${_gitbranch} + cd .. + + msg "GIT checkout done or server timeout" + msg "Starting make..." + + rm -rf "${srcdir}/${_gitname}-build" + git clone "${srcdir}/${_gitname}" "${srcdir}/${_gitname}-build" + cd "${srcdir}/${_gitname}-build" + + # PATCH + sed -i 's/python /python2 /' "Platform/${_platform}/CreateRedist/RedistMaker" + mv Wrappers/OpenNI.java/src/org/OpenNI/AlternativeView{p,P}ointCapability.java + echo ' +abs_core: $(ALL_MODULES) $(ALL_UTILS) +abs_core_samples: $(CORE_SAMPLES) +abs_java: $(ALL_JAVA_PROJS) +abs_java_samples: $(JAVA_SAMPLES) +abs_mono: $(ALL_MONO_PROJS) +abs_mono_samples: $(MONO_SAMPLES) $(MONO_FORMS_SAMPLES) +' >> "Platform/${_platform}/Build/Makefile" + + + # BUILD + cd "Platform/${_platform}/Build" + make -j1 \ + abs_core abs_core_samples \ + abs_java abs_java_samples \ + abs_mono abs_mono_samples || return 1 + + cd '../../../Source/DoxyGen' + mkdir html + doxygen Doxyfile + rm -rf html/*.map html*.md5 html/*.hhc html/*.hhp +} + +package_openni() { + pkgdesc="Open Natural Interface framework" + depends=("openni$_suf-core") + optdepends=("openni$_suf-docs: programmer documentation") + provides=('openni') + conflicts=('openni') +} + +package_openni-docs() { + pkgdesc="OpenNI programmer documentation" + arch=('any') + provides=('openni-docs') + conflicts=('openni-docs') + + cd "${srcdir}/${_gitname}-build/Source/DoxyGen/" + install -d "${pkgdir}/usr/share/openni" + cp -r html "${pkgdir}/usr/share/openni" +} + +package_openni-core() { + pkgdesc="OpenNI core libraries" + depends=('libusb' 'freeglut') + install="openni.install" + provides=('openni-core') + conflicts=('openni-core') + + cd "${srcdir}/${_gitname}-build/Platform/${_platform}/Bin/Release" + + LIB_FILES=' + libnimCodecs.so + libnimMockNodes.so + libnimRecorder.so + libOpenNI.so + ' + install -d "${pkgdir}/usr/lib" + install -m755 $LIB_FILES "${pkgdir}/usr/lib" + + BIN_FILES='niReg niLicense' + install -d "${pkgdir}/usr/bin" + install -m755 $BIN_FILES "${pkgdir}/usr/bin" + + cd "${srcdir}/${_gitname}-build/Include" + install -d "${pkgdir}/usr/include/ni" + install -m644 *.h "${pkgdir}/usr/include/ni" + cp -r "${_platform}" "${pkgdir}/usr/include/ni" + + cd "${srcdir}/${_gitname}-build/Platform/${_platform}/Build" + install -d "${pkgdir}/usr/share" + cp -r Common "${pkgdir}/usr/share/common" +} + +package_openni-java() { + pkgdesc="OpenNI java wrapper" + depends=("openni$_suf" 'java-environment') + provides=('openni-java') + conflicts=('openni-java') + + cd "${srcdir}/${_gitname}-build/Platform/${_platform}/Bin/Release" + + install -d "${pkgdir}/usr/lib" + install -m755 libOpenNI.jni.so "${pkgdir}/usr/lib" + + install -d "${pkgdir}/usr/share/openni/java" + install -m755 org.OpenNI.jar "${pkgdir}/usr/share/openni/java" +} + +package_openni-mono() { + pkgdesc="OpenNI mono wrapper" + depends=("openni$_suf" 'mono') + provides=('openni-mono') + conflicts=('openni-mono') + + cd "${srcdir}/${_gitname}-build/Platform/${_platform}/Bin/Release" + + install -d "${pkgdir}/usr/share/openni/mono" + install -m755 OpenNI.net.dll "${pkgdir}/usr/share/openni/mono" +} + +# SAMPLES + +_install_sample_source() { + sample=$1 + makefile="Platform/${_platform}/Build/Samples/$sample/Makefile" + install -d "${pkgdir}/usr/share/openni/samples" + cp -r "Samples/$sample" "${pkgdir}/usr/share/openni/samples/$sample" + install -m644 "$makefile" "${pkgdir}/usr/share/openni/samples/$sample" +} + +# Leave out NiViewer, it's set up wrong +CORE_SAMPLES=' + AudioSample + BackRecorder + CRead + ConvertXToONI + RecordSynthetic + SimpleCreate + SimpleRead SimpleViewer UserTracker' +MONO_SAMPLES='SimpleRead SimpleViewer UserTracker' +JAVA_SAMPLES='SimpleRead SimpleViewer UserTracker' + +package_openni-core-samples() { + pkgdesc="OpenNI sample programs" + depends=("openni$_suf-core") + optdepends=('openni-core-samples-source: source code for the samples') + provides=('openni-core-samples') + conflicts=('openni-core-samples') + + cd "${srcdir}/${_gitname}-build/Platform/${_platform}/Bin/Release" + install -d "${pkgdir}/usr/bin" + install -m755 NiViewer "${pkgdir}/usr/bin/niSample-Viewer" + for sample in $CORE_SAMPLES; do + install -m766 Sample-Ni$sample "${pkgdir}/usr/bin/niSample-$sample" + done +} +package_openni-core-samples-source() { + pkgdesc="OpenNI sample programs source code" + depends=("openni$_suf-core") + provides=('openni-core-samples-source') + conflicts=('openni-core-samples-source') + options+=('!strip') + + cd "${srcdir}/${_gitname}-build" + for sample in Viewer $CORE_SAMPLES; do + _install_sample_source Ni$sample + done +} + +package_openni-java-samples() { + pkgdesc="OpenNI java wrapper sample programs" + depends=("openni$_suf-java") + optdepends=("openni$_suf-java-samples-source: source code for the samples") + arch=('any') + provides=('openni-java-samples') + conflicts=('openni-java-samples') + + cd "${srcdir}/${_gitname}-build/Platform/${_platform}/Bin/Release" + install -d "${pkgdir}/usr/bin" + install -d "${pkgdir}/usr/share/openni/java" + for sample in $JAVA_SAMPLES; do + install -m644 org.OpenNI.Samples.$sample.jar "${pkgdir}/usr/share/openni/java" + echo "#/bin/sh +java -jar /usr/share/openni/java/org.OpenNI.Samples.$sample.jar $@ +" > "${pkgdir}/usr/bin/niSample-$sample.jar" + chmod 755 "${pkgdir}/usr/bin/niSample-$sample.jar" + done +} +package_openni-java-samples-source() { + pkgdesc="OpenNI java wrapper sample programs source code" + depends=("openni$_suf-java") + provides=('openni-java-samples-source') + conflicts=('openni-java-samples-source') + options+=('!strip') + + cd "${srcdir}/${_gitname}-build" + for sample in $JAVA_SAMPLES; do + _install_sample_source $sample.java + done +} + +package_openni-mono-samples() { + pkgdesc="OpenNI java wrapper sample programs" + depends=("openni$_suf-mono") + optdepends=("openni$_suf-mono-samples-source: source code for the samples") + provides=('openni-mono-samples') + conflicts=('openni-mono-samples') + + cd "${srcdir}/${_gitname}-build/Platform/${_platform}/Bin/Release" + install -d "${pkgdir}/usr/bin" + install -d "${pkgdir}/usr/share/openni/mono" + for sample in $MONO_SAMPLES; do + install -m755 $sample.net.exe "${pkgdir}/usr/share/openni/mono" + echo "#/bin/sh +cd /usr/share/openni/mono +mono $sample.net.exe $@ +" > "${pkgdir}/usr/bin/niSample-$sample.net" + chmod 755 "${pkgdir}/usr/bin/niSample-$sample.net" + done +} +package_openni-mono-samples-source() { + pkgdesc="OpenNI mono wrapper sample programs source code" + depends=("openni$_suf-mono") + provides=('openni-mono-samples-source') + conflicts=('openni-mono-samples-source') + options+=('!strip') + + cd "${srcdir}/${_gitname}-build" + for sample in $MONO_SAMPLES; do + _install_sample_source $sample.net + done +} diff --git a/~lukeshu/openni-all/openni/openni.install b/~lukeshu/openni-all/openni/openni.install new file mode 100644 index 000000000..8470f4512 --- /dev/null +++ b/~lukeshu/openni-all/openni/openni.install @@ -0,0 +1,11 @@ +post_install() { + MODULES="libnimMockNodes.so libnimCodecs.so libnimRecorder.so" + for module in $MODULES + do + /usr/bin/niReg /usr/lib/$module + done +} + +pre_remove() { + rm /var/lib/ni/modules.xml +} |