Update to release 0.4.1

This commit is contained in:
Rich Mattes 2014-05-02 19:49:19 -04:00
parent 8daa8ce05d
commit 8454871a25
7 changed files with 86 additions and 260 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
/libfreenect-v0.1.2.tar.bz2
/libfreenect-de79349de52e0458da38f3eaa721f2ca4b45ff29.tar.gz

View File

@ -1,177 +0,0 @@
commit e1365de85617781e370abdc7ce1ef6d9875d55de
Author: Drew Fisher <drew.m.fisher@gmail.com>
Date: Mon Jan 23 07:41:41 2012 -0800
cameras.c: memcpy structs into properly aligned buffers before toggling endianness.
The new registration structs are not aligned to 4-byte boundaries in the
buffers that we get back from the Kinect. This might have been causing
breakage on ARM, where nonaligned access is prohibited.
Signed-off-by: Drew Fisher <drew.m.fisher@gmail.com>
diff --git a/src/cameras.c b/src/cameras.c
index 9f0beb9..d391a7c 100644
--- a/src/cameras.c
+++ b/src/cameras.c
@@ -783,56 +783,55 @@ static int freenect_fetch_reg_info(freenect_device *dev)
FN_ERROR("freenect_fetch_reg_info: send_cmd read %d bytes (expected 118)\n", res);
return -1;
}
- freenect_reg_info *reg_info_ptr = (freenect_reg_info*)(&reply[2]);
- freenect_reg_info *dev_reg_info = &(dev->registration.reg_info);
- dev_reg_info->ax = fn_le32s(reg_info_ptr->ax);
- dev_reg_info->bx = fn_le32s(reg_info_ptr->bx);
- dev_reg_info->cx = fn_le32s(reg_info_ptr->cx);
- dev_reg_info->dx = fn_le32s(reg_info_ptr->dx);
- dev_reg_info->ay = fn_le32s(reg_info_ptr->ay);
- dev_reg_info->by = fn_le32s(reg_info_ptr->by);
- dev_reg_info->cy = fn_le32s(reg_info_ptr->cy);
- dev_reg_info->dy = fn_le32s(reg_info_ptr->dy);
- dev_reg_info->dx_start = fn_le32s(reg_info_ptr->dx_start);
- dev_reg_info->dy_start = fn_le32s(reg_info_ptr->dy_start);
- dev_reg_info->dx_beta_start = fn_le32s(reg_info_ptr->dx_beta_start);
- dev_reg_info->dy_beta_start = fn_le32s(reg_info_ptr->dy_beta_start);
- dev_reg_info->dx_beta_inc = fn_le32s(reg_info_ptr->dx_beta_inc);
- dev_reg_info->dy_beta_inc = fn_le32s(reg_info_ptr->dy_beta_inc);
- dev_reg_info->dxdx_start = fn_le32s(reg_info_ptr->dxdx_start);
- dev_reg_info->dxdy_start = fn_le32s(reg_info_ptr->dxdy_start);
- dev_reg_info->dydx_start = fn_le32s(reg_info_ptr->dydx_start);
- dev_reg_info->dydy_start = fn_le32s(reg_info_ptr->dydy_start);
- dev_reg_info->dxdxdx_start = fn_le32s(reg_info_ptr->dxdxdx_start);
- dev_reg_info->dydxdx_start = fn_le32s(reg_info_ptr->dydxdx_start);
- dev_reg_info->dxdxdy_start = fn_le32s(reg_info_ptr->dxdxdy_start);
- dev_reg_info->dydxdy_start = fn_le32s(reg_info_ptr->dydxdy_start);
- dev_reg_info->dydydx_start = fn_le32s(reg_info_ptr->dydydx_start);
- dev_reg_info->dydydy_start = fn_le32s(reg_info_ptr->dydydy_start);
- FN_SPEW("ax: %d\n", dev_reg_info->ax);
- FN_SPEW("bx: %d\n", dev_reg_info->bx);
- FN_SPEW("cx: %d\n", dev_reg_info->cx);
- FN_SPEW("dx: %d\n", dev_reg_info->dx);
- FN_SPEW("ay: %d\n", dev_reg_info->ay);
- FN_SPEW("by: %d\n", dev_reg_info->by);
- FN_SPEW("cy: %d\n", dev_reg_info->cy);
- FN_SPEW("dy: %d\n", dev_reg_info->dy);
- FN_SPEW("dx_start: %d\n", dev_reg_info->dx_start);
- FN_SPEW("dy_start: %d\n", dev_reg_info->dy_start);
- FN_SPEW("dx_beta_start: %d\n", dev_reg_info->dx_beta_start);
- FN_SPEW("dy_beta_start: %d\n", dev_reg_info->dy_beta_start);
- FN_SPEW("dx_beta_inc: %d\n", dev_reg_info->dx_beta_inc);
- FN_SPEW("dy_beta_inc: %d\n", dev_reg_info->dy_beta_inc);
- FN_SPEW("dxdx_start: %d\n", dev_reg_info->dxdx_start);
- FN_SPEW("dxdy_start: %d\n", dev_reg_info->dxdy_start);
- FN_SPEW("dydx_start: %d\n", dev_reg_info->dydx_start);
- FN_SPEW("dydy_start: %d\n", dev_reg_info->dydy_start);
- FN_SPEW("dxdxdx_start: %d\n", dev_reg_info->dxdxdx_start);
- FN_SPEW("dydxdx_start: %d\n", dev_reg_info->dydxdx_start);
- FN_SPEW("dxdxdy_start: %d\n", dev_reg_info->dxdxdy_start);
- FN_SPEW("dydxdy_start: %d\n", dev_reg_info->dydxdy_start);
- FN_SPEW("dydydx_start: %d\n", dev_reg_info->dydydx_start);
- FN_SPEW("dydydy_start: %d\n", dev_reg_info->dydydy_start);
+ memcpy(&dev->registration.reg_info, reply + 2, sizeof(dev->registration.reg_info));
+ dev->registration.reg_info.ax = fn_le32s(dev->registration.reg_info.ax);
+ dev->registration.reg_info.bx = fn_le32s(dev->registration.reg_info.bx);
+ dev->registration.reg_info.cx = fn_le32s(dev->registration.reg_info.cx);
+ dev->registration.reg_info.dx = fn_le32s(dev->registration.reg_info.dx);
+ dev->registration.reg_info.ay = fn_le32s(dev->registration.reg_info.ay);
+ dev->registration.reg_info.by = fn_le32s(dev->registration.reg_info.by);
+ dev->registration.reg_info.cy = fn_le32s(dev->registration.reg_info.cy);
+ dev->registration.reg_info.dy = fn_le32s(dev->registration.reg_info.dy);
+ dev->registration.reg_info.dx_start = fn_le32s(dev->registration.reg_info.dx_start);
+ dev->registration.reg_info.dy_start = fn_le32s(dev->registration.reg_info.dy_start);
+ dev->registration.reg_info.dx_beta_start = fn_le32s(dev->registration.reg_info.dx_beta_start);
+ dev->registration.reg_info.dy_beta_start = fn_le32s(dev->registration.reg_info.dy_beta_start);
+ dev->registration.reg_info.dx_beta_inc = fn_le32s(dev->registration.reg_info.dx_beta_inc);
+ dev->registration.reg_info.dy_beta_inc = fn_le32s(dev->registration.reg_info.dy_beta_inc);
+ dev->registration.reg_info.dxdx_start = fn_le32s(dev->registration.reg_info.dxdx_start);
+ dev->registration.reg_info.dxdy_start = fn_le32s(dev->registration.reg_info.dxdy_start);
+ dev->registration.reg_info.dydx_start = fn_le32s(dev->registration.reg_info.dydx_start);
+ dev->registration.reg_info.dydy_start = fn_le32s(dev->registration.reg_info.dydy_start);
+ dev->registration.reg_info.dxdxdx_start = fn_le32s(dev->registration.reg_info.dxdxdx_start);
+ dev->registration.reg_info.dydxdx_start = fn_le32s(dev->registration.reg_info.dydxdx_start);
+ dev->registration.reg_info.dxdxdy_start = fn_le32s(dev->registration.reg_info.dxdxdy_start);
+ dev->registration.reg_info.dydxdy_start = fn_le32s(dev->registration.reg_info.dydxdy_start);
+ dev->registration.reg_info.dydydx_start = fn_le32s(dev->registration.reg_info.dydydx_start);
+ dev->registration.reg_info.dydydy_start = fn_le32s(dev->registration.reg_info.dydydy_start);
+ FN_SPEW("ax: %d\n", dev->registration.reg_info.ax);
+ FN_SPEW("bx: %d\n", dev->registration.reg_info.bx);
+ FN_SPEW("cx: %d\n", dev->registration.reg_info.cx);
+ FN_SPEW("dx: %d\n", dev->registration.reg_info.dx);
+ FN_SPEW("ay: %d\n", dev->registration.reg_info.ay);
+ FN_SPEW("by: %d\n", dev->registration.reg_info.by);
+ FN_SPEW("cy: %d\n", dev->registration.reg_info.cy);
+ FN_SPEW("dy: %d\n", dev->registration.reg_info.dy);
+ FN_SPEW("dx_start: %d\n", dev->registration.reg_info.dx_start);
+ FN_SPEW("dy_start: %d\n", dev->registration.reg_info.dy_start);
+ FN_SPEW("dx_beta_start: %d\n", dev->registration.reg_info.dx_beta_start);
+ FN_SPEW("dy_beta_start: %d\n", dev->registration.reg_info.dy_beta_start);
+ FN_SPEW("dx_beta_inc: %d\n", dev->registration.reg_info.dx_beta_inc);
+ FN_SPEW("dy_beta_inc: %d\n", dev->registration.reg_info.dy_beta_inc);
+ FN_SPEW("dxdx_start: %d\n", dev->registration.reg_info.dxdx_start);
+ FN_SPEW("dxdy_start: %d\n", dev->registration.reg_info.dxdy_start);
+ FN_SPEW("dydx_start: %d\n", dev->registration.reg_info.dydx_start);
+ FN_SPEW("dydy_start: %d\n", dev->registration.reg_info.dydy_start);
+ FN_SPEW("dxdxdx_start: %d\n", dev->registration.reg_info.dxdxdx_start);
+ FN_SPEW("dydxdx_start: %d\n", dev->registration.reg_info.dydxdx_start);
+ FN_SPEW("dxdxdy_start: %d\n", dev->registration.reg_info.dxdxdy_start);
+ FN_SPEW("dydxdy_start: %d\n", dev->registration.reg_info.dydxdy_start);
+ FN_SPEW("dydydx_start: %d\n", dev->registration.reg_info.dydydx_start);
+ FN_SPEW("dydydy_start: %d\n", dev->registration.reg_info.dydydy_start);
/*
// NOTE: Not assigned above
FN_SPEW("dx_center: %d\n", dev_reg_info->dx_center);
@@ -861,10 +860,10 @@ static int freenect_fetch_reg_pad_info(freenect_device *dev)
FN_ERROR("freenect_fetch_reg_pad_info: send_cmd read %d bytes (expected 8)\n", res);
return -1;
}
- freenect_reg_pad_info *pad_info_ptr = (freenect_reg_pad_info*)(&reply[2]);
- dev->registration.reg_pad_info.start_lines = fn_le16s(pad_info_ptr->start_lines);
- dev->registration.reg_pad_info.end_lines = fn_le16s(pad_info_ptr->end_lines);
- dev->registration.reg_pad_info.cropping_lines = fn_le16s(pad_info_ptr->cropping_lines);
+ memcpy(&dev->registration.reg_pad_info, reply+2, sizeof(dev->registration.reg_pad_info));
+ dev->registration.reg_pad_info.start_lines = fn_le16s(dev->registration.reg_pad_info.start_lines);
+ dev->registration.reg_pad_info.end_lines = fn_le16s(dev->registration.reg_pad_info.end_lines);
+ dev->registration.reg_pad_info.cropping_lines = fn_le16s(dev->registration.reg_pad_info.cropping_lines);
FN_SPEW("start_lines: %u\n",dev->registration.reg_pad_info.start_lines);
FN_SPEW("end_lines: %u\n",dev->registration.reg_pad_info.end_lines);
FN_SPEW("cropping_lines: %u\n",dev->registration.reg_pad_info.cropping_lines);
@@ -888,7 +887,9 @@ static int freenect_fetch_reg_const_shift(freenect_device *dev)
FN_ERROR("freenect_fetch_reg_const_shift: send_cmd read %d bytes (expected 8)\n", res);
return -1;
}
- uint16_t shift = fn_le16(*((uint16_t*)(reply+2)));
+ uint16_t shift;
+ memcpy(&shift, reply+2, sizeof(shift));
+ shift = fn_le16(shift);
dev->registration.const_shift = (double)shift;
FN_SPEW("const_shift: %f\n",dev->registration.const_shift);
return 0;
@@ -907,17 +908,18 @@ static int freenect_fetch_zero_plane_info(freenect_device *dev)
FN_ERROR("freenect_fetch_zero_plane_info: send_cmd read %d bytes (expected 322)\n", res);
return -1;
}
+
+ memcpy(&(dev->registration.zero_plane_info), reply + 94, sizeof(dev->registration.zero_plane_info));
+ dev->registration.zero_plane_info.dcmos_emitter_dist = *((float*)(&fn_le32(*((uint32_t*)(&dev->registration.zero_plane_info.dcmos_emitter_dist)))));
+ dev->registration.zero_plane_info.dcmos_rcmos_dist = *((float*)(&fn_le32(*((uint32_t*)(&dev->registration.zero_plane_info.dcmos_rcmos_dist)))));
+ dev->registration.zero_plane_info.reference_distance = *((float*)(&fn_le32(*((uint32_t*)(&dev->registration.zero_plane_info.reference_distance)))));
+ dev->registration.zero_plane_info.reference_pixel_size = *((float*)(&fn_le32(*((uint32_t*)(&dev->registration.zero_plane_info.reference_pixel_size)))));
+
// WTF is all this data? it's way bigger than sizeof(XnFixedParams)...
- FN_SPEW("dcmos_emitter_distance: %f\n", *((float*)(reply+94)));
- FN_SPEW("dcmos_rcmos_distance: %f\n", *((float*)(reply+98)));
- FN_SPEW("reference_distance: %f\n", *((float*)(reply+102)));
- FN_SPEW("reference_pixel_size: %f\n", *((float*)(reply+106)));
-
- // The values are 32-bit floats in little-endian. So:
- dev->registration.zero_plane_info.dcmos_emitter_dist = *((float*)(&fn_le32(*((uint32_t*)(reply+94)))));
- dev->registration.zero_plane_info.dcmos_rcmos_dist = *((float*)(&fn_le32(*((uint32_t*)(reply+98)))));
- dev->registration.zero_plane_info.reference_distance = *((float*)(&fn_le32(*((uint32_t*)(reply+102)))));
- dev->registration.zero_plane_info.reference_pixel_size = *((float*)(&fn_le32(*((uint32_t*)(reply+106)))));
+ FN_SPEW("dcmos_emitter_distance: %f\n", dev->registration.zero_plane_info.dcmos_emitter_dist);
+ FN_SPEW("dcmos_rcmos_distance: %f\n", dev->registration.zero_plane_info.dcmos_rcmos_dist);
+ FN_SPEW("reference_distance: %f\n", dev->registration.zero_plane_info.reference_distance);
+ FN_SPEW("reference_pixel_size: %f\n", dev->registration.zero_plane_info.reference_pixel_size);
// FIXME: OpenNI seems to use a hardcoded value of 2.4 instead of 2.3 as reported by Kinect
dev->registration.zero_plane_info.dcmos_rcmos_dist = 2.4;

View File

@ -1,59 +0,0 @@
commit bbc109a589a1dd2c229f8bc98536dbc184dd73f9
Author: Drew Fisher <drew.m.fisher@gmail.com>
Date: Sun Jan 29 16:28:32 2012 -0800
Build on big-endian systems again.
On big endian, fn_le32() is actually a function, not an empty preprocessor
macro, so we can't take the address of its return value when doing the C
equivalent of reinterpret_cast.
Signed-off-by: Drew Fisher <drew.m.fisher@gmail.com>
diff --git a/src/cameras.c b/src/cameras.c
index d391a7c..a078e1d 100644
--- a/src/cameras.c
+++ b/src/cameras.c
@@ -910,10 +910,15 @@ static int freenect_fetch_zero_plane_info(freenect_device *dev)
}
memcpy(&(dev->registration.zero_plane_info), reply + 94, sizeof(dev->registration.zero_plane_info));
- dev->registration.zero_plane_info.dcmos_emitter_dist = *((float*)(&fn_le32(*((uint32_t*)(&dev->registration.zero_plane_info.dcmos_emitter_dist)))));
- dev->registration.zero_plane_info.dcmos_rcmos_dist = *((float*)(&fn_le32(*((uint32_t*)(&dev->registration.zero_plane_info.dcmos_rcmos_dist)))));
- dev->registration.zero_plane_info.reference_distance = *((float*)(&fn_le32(*((uint32_t*)(&dev->registration.zero_plane_info.reference_distance)))));
- dev->registration.zero_plane_info.reference_pixel_size = *((float*)(&fn_le32(*((uint32_t*)(&dev->registration.zero_plane_info.reference_pixel_size)))));
+ uint32_t temp;
+ temp = fn_le32(*((uint32_t*)(&dev->registration.zero_plane_info.dcmos_emitter_dist)));
+ dev->registration.zero_plane_info.dcmos_emitter_dist = *((float*)(&temp));
+ temp = fn_le32(*((uint32_t*)(&dev->registration.zero_plane_info.dcmos_rcmos_dist)));
+ dev->registration.zero_plane_info.dcmos_rcmos_dist = *((float*)(&temp));
+ temp = fn_le32(*((uint32_t*)(&dev->registration.zero_plane_info.reference_distance)));
+ dev->registration.zero_plane_info.reference_distance = *((float*)(&temp));
+ temp = fn_le32(*((uint32_t*)(&dev->registration.zero_plane_info.reference_pixel_size)));
+ dev->registration.zero_plane_info.reference_pixel_size = *((float*)(&temp));
// WTF is all this data? it's way bigger than sizeof(XnFixedParams)...
FN_SPEW("dcmos_emitter_distance: %f\n", dev->registration.zero_plane_info.dcmos_emitter_dist);
diff --git a/src/freenect_internal.h b/src/freenect_internal.h
index 4e7950e..d23208a 100644
--- a/src/freenect_internal.h
+++ b/src/freenect_internal.h
@@ -89,12 +89,16 @@ static inline uint32_t fn_le32(uint32_t d)
static inline int16_t fn_le16s(int16_t s)
{
// reinterpret cast to unsigned, use the normal fn_le16, and then reinterpret cast back
- return *((int16_t*)(&fn_le16(*((uint16_t*)(&s)))));
+ uint16_t temp = (*(uint16_t*)(&s));
+ temp = fn_le16(temp);
+ return *((int16_t*)(&temp));
}
static inline int32_t fn_le32s(int32_t s)
{
// reinterpret cast to unsigned, use the normal fn_le32, and then reinterpret cast back
- return *((int32_t*)(&fn_le32(*((uint32_t*)(&s)))));
+ uint32_t temp = (*(uint32_t*)(&s));
+ temp = fn_le32(temp);
+ return *((int32_t*)(&temp));
}
#else
#define fn_le16(x) (x)

View File

@ -0,0 +1,35 @@
diff -up ./wrappers/python/CMakeLists.txt.cmake28 ./wrappers/python/CMakeLists.txt
--- ./wrappers/python/CMakeLists.txt.cmake28 2014-03-22 20:42:53.000000000 -0400
+++ ./wrappers/python/CMakeLists.txt 2014-04-14 20:45:29.682944140 -0400
@@ -2,15 +2,16 @@
# Python extension builder
######################################################################################
-include(FindPythonInterp)
+#include(FindPythonInterp)
include(FindPythonLibs)
find_program(CYTHON_EXECUTABLE cython)
# Figure out installation path
execute_process(COMMAND
- ${PYTHON_EXECUTABLE} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(prefix='${CMAKE_INSTALL_PREFIX}')"
+ ${PYTHON_EXECUTABLE} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)"
OUTPUT_VARIABLE PYTHON_SITE_PACKAGES OUTPUT_STRIP_TRAILING_WHITESPACE)
+message(STATUS "PyPath: ${PYTHON_SITE_PACKAGES}")
# Figure out numpy include path
execute_process(COMMAND
@@ -31,9 +32,11 @@ set_target_properties(cython_freenect PR
target_link_libraries(cython_freenect freenect_sync)
include_directories(${PYTHON_INCLUDE_PATH} ../c_sync/ ${NUMPY_INCLUDE_PATH})
+message(STATUS "PyPath: ${PYTHON_SITE_PACKAGES}")
+
# Install the extension
install(TARGETS cython_freenect
- DESTINATION ${PYTHON_SITE_PACKAGES})
+ LIBRARY DESTINATION ${PYTHON_SITE_PACKAGES})
# TODO: decide on what to do with demo_ scripts and were to install
# them

View File

@ -0,0 +1,12 @@
diff -up ./OpenNI2-FreenectDriver/CMakeLists.txt.openni2 ./OpenNI2-FreenectDriver/CMakeLists.txt
--- ./OpenNI2-FreenectDriver/CMakeLists.txt.openni2 2014-05-02 19:44:28.783577819 -0400
+++ ./OpenNI2-FreenectDriver/CMakeLists.txt 2014-05-02 19:44:31.992726677 -0400
@@ -10,8 +10,6 @@ set(CMAKE_CXX_FLAGS "-Wno-gnu-static-flo
set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib/OpenNI2-FreenectDriver)
set_target_properties(FreenectDriver PROPERTIES
- VERSION ${PROJECT_VER}
- SOVERSION ${PROJECT_APIVER}
OUTPUT_NAME FreenectDriver)
add_definitions(-DPROJECT_VER="${PROJECT_VER}")

View File

@ -1,24 +1,24 @@
%global commit de79349de52e0458da38f3eaa721f2ca4b45ff29
%global shortcommit %(c=%{commit}; echo ${c:0:7})
%{?filter_setup:
%filter_provides_in %{python_sitearch}/.*\.so$
%filter_setup
}
Name: libfreenect
Version: 0.1.2
Release: 6%{?dist}
Version: 0.4.1
Release: 1%{?dist}
Summary: Device driver for the Kinect
License: GPLv2+ or ASL 2.0
URL: http://www.openkinect.org/
# No official releases, yet. To reproduce tarball use freenect_generate_tarball.sh:
# Usage: freenect_generate_tarball.sh [GIT TAG]
Source0: libfreenect-v%{version}.tar.bz2
Source1: freenect_generate_tarball.sh
Source0: https://github.com/OpenKinect/%{name}/archive/%{commit}/%{name}-%{commit}.tar.gz
# https://github.com/OpenKinect/libfreenect/commit/e1365de85617781e370abdc7ce1ef6d9875d55de
Patch0: %{name}-0.1.2-align.patch
# https://github.com/OpenKinect/libfreenect/commit/bbc109a589a1dd2c229f8bc98536dbc184dd73f9
Patch1: %{name}-0.1.2-big-endian.patch
# Fix python installation path discovery
Patch0: %{name}-0.4.0-cmake28.patch
# Freenect openni driver is a plugin lib, and doesn't need soversion symlinks
Patch1: %{name}-0.4.1-openni2.patch
BuildRequires: cmake
BuildRequires: Cython
@ -81,10 +81,19 @@ Requires: %{name}%{?_isa} = %{version}-%{release}
%description python
The %{name}-python package contains python bindings for %{name}
%package openni
Summary: OpenNI2 driver for the Kinect
%description openni
The OpenNI2-FreenectDriver is a bridge to libfreenect implemented as an
OpenNI2 driver. It allows OpenNI2 to use Kinect hardware on Linux and OSX.
It was originally a separate project but is now distributed with libfreenect.
%prep
%setup -q -n %{name}
%patch0 -p1 -b .align
%patch1 -p1 -b .big-endian
%setup -qn %{name}-%{commit}
rm -rf platform/windows
%patch0 -p0 -b .cmake28
%patch1 -p0 -b .openni2
# Get rid of osx and win specific stuff
sed -i 's|get_python_lib(prefix='\''${CMAKE_INSTALL_PREFIX}'\'')|get_python_lib(1)|' wrappers/python/CMakeLists.txt
sed -i 's|/usr/local|/usr|' wrappers/python/setup.py
@ -95,7 +104,7 @@ sed -i 's|set(CMAKE_C_FLAGS "-Wall")|#set(CMAKE_C_FLAGS "-Wall")|' examples/CMak
%build
mkdir build
pushd build
%cmake -DBUILD_AUDIO=ON -DBUILD-CPP=ON -DBUILD_C_SYNC=ON -DBUILD_CV=ON -DBUILD_REDIST_PACKAGE=ON -DBUILD_EXAMPLES=ON -DBUILD_CPACK=OFF -DBUILD_FAKENECT=ON -DBUILD_PYTHON=ON ..
%cmake -DBUILD_AUDIO=ON -DBUILD-CPP=ON -DBUILD_C_SYNC=ON -DBUILD_CV=ON -DBUILD_REDIST_PACKAGE=ON -DBUILD_EXAMPLES=ON -DBUILD_CPACK=OFF -DBUILD_FAKENECT=ON -DBUILD_PYTHON=ON -DBUILD_OPENNI2_DRIVER=ON ..
make %{?_smp_mflags} VERBOSE=1
popd
@ -109,12 +118,6 @@ make -C build install DESTDIR=%{buildroot}
mkdir -p %{buildroot}/lib/udev/rules.d
install -p -m 0644 platform/linux/udev/51-kinect.rules %{buildroot}/lib/udev/rules.d
find %{buildroot} -name '*.la' -exec rm -f {} ';'
mv %{buildroot}%{_includedir}/libfreenect.hpp %{buildroot}%{_includedir}/libfreenect/libfreenect.hpp
# These binaries have very vague names. Renaming them to freenect-* to clarify
for f in %{buildroot}%{_bindir}/*; do
mv $f %{buildroot}%{_bindir}/freenect-$(basename $f)
done
mv %{buildroot}%{_bindir}/freenect-fakenect %{buildroot}%{_bindir}/fakenect
mkdir -p %{buildroot}%{_datadir}/%{name}
mv %{buildroot}%{_datadir}/fwfetcher.py %{buildroot}%{_datadir}/%{name}
@ -130,7 +133,7 @@ sed -i "s|#!/usr/bin/env python||" %{buildroot}%{_datadir}/%{name}/fwfetcher.py
%postun opencv -p /sbin/ldconfig
%files
%doc APACHE20 GPL2 README.asciidoc CONTRIB
%doc APACHE20 GPL2 README.md CONTRIB
/lib/udev/rules.d/*
%{_libdir}/libfreenect.so.*
%{_libdir}/libfreenect_sync.so.*
@ -159,10 +162,21 @@ sed -i "s|#!/usr/bin/env python||" %{buildroot}%{_datadir}/%{name}/fwfetcher.py
%files fakenect
%dir %{_libdir}/fakenect
%{_bindir}/fakenect-record
%{_libdir}/fakenect/*.so.*
%{_bindir}/fakenect
%{_mandir}/man1/fakenect*1.*
%files openni
%{_libdir}/OpenNI2-FreenectDriver
%changelog
* Fri May 02 2014 Rich Mattes <richmattes@gmail.com> - 0.4.1-1
- Update to release 0.4.1
* Fri Nov 22 2013 Rich Mattes <richmattes@gmail.com> - 0.2.0-1
- Update to release 0.2.0
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1.2-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
@ -184,11 +198,11 @@ sed -i "s|#!/usr/bin/env python||" %{buildroot}%{_datadir}/%{name}/fwfetcher.py
- Create OpenCV wrapper sub-package
- Create fakenect library sub-package
* Tue Mar 24 2011 Rich Mattes <richmattes@gmail.com> - 0-0.3.4a159fgit
* Thu Mar 24 2011 Rich Mattes <richmattes@gmail.com> - 0-0.3.4a159fgit
- Force cmake to honor rpm optflags
- Change to out-of-tree build
* Tue Mar 24 2011 Rich Mattes <richmattes@gmail.com> - 0-0.2.4a159fgit
* Thu Mar 24 2011 Rich Mattes <richmattes@gmail.com> - 0-0.2.4a159fgit
- Update to latest snapshot
* Mon Jan 31 2011 Rich Mattes <richmattes@gmail.com> - 0-0.1.687b2da5git

View File

@ -1 +1 @@
b8f40bf839d50fb6937b76bd4fa1eecc libfreenect-v0.1.2.tar.bz2
d185bec75433e043da9a384e6f66fc7c libfreenect-de79349de52e0458da38f3eaa721f2ca4b45ff29.tar.gz