address review findings

- fixed duplicate files warning
- made file lists more explicit
- corrected License tag
- added missing Provides: for bundled parson
- added executable bit to fwfetcher.py script and fixed shebang
- avoid timestamps in generated docs for reproducibility
This commit is contained in:
Dominik 'Rathann' Mierzejewski 2025-11-25 00:00:12 +01:00
commit ee4496ce03
3 changed files with 78 additions and 31 deletions

View file

@ -0,0 +1,12 @@
diff -up libfreenect-0.7.5/doc/Doxyfile.tstamp libfreenect-0.7.5/doc/Doxyfile
--- libfreenect-0.7.5/doc/Doxyfile.tstamp 2024-01-06 17:57:12.000000000 +0100
+++ libfreenect-0.7.5/doc/Doxyfile 2025-11-24 23:51:39.844958326 +0100
@@ -875,7 +875,7 @@ HTML_COLORSTYLE_GAMMA = 80
# page will contain the date and time when the page was generated. Setting
# this to NO can help when comparing the output of multiple runs.
-HTML_TIMESTAMP = YES
+HTML_TIMESTAMP = NO
# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
# files or namespaces will be aligned in HTML using tables. If set to

View file

@ -1,6 +1,12 @@
diff -up libfreenect-0.7.5/src/fwfetcher.py.py3 libfreenect-0.7.5/src/fwfetcher.py
--- libfreenect-0.7.5/src/fwfetcher.py.py3 2024-01-06 17:57:12.000000000 +0100
+++ libfreenect-0.7.5/src/fwfetcher.py 2025-11-11 09:46:49.713531146 +0100
+++ libfreenect-0.7.5/src/fwfetcher.py 2025-11-25 00:20:24.085725755 +0100
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
from __future__ import absolute_import, division, print_function
@@ -10,10 +10,10 @@ import sys
import time
import zipfile
@ -16,7 +22,7 @@ diff -up libfreenect-0.7.5/src/fwfetcher.py.py3 libfreenect-0.7.5/src/fwfetcher.
diff -up libfreenect-0.7.5/wrappers/python/CMakeLists.txt.py3 libfreenect-0.7.5/wrappers/python/CMakeLists.txt
--- libfreenect-0.7.5/wrappers/python/CMakeLists.txt.py3 2024-01-06 17:57:12.000000000 +0100
+++ libfreenect-0.7.5/wrappers/python/CMakeLists.txt 2025-11-11 09:46:49.713788373 +0100
+++ libfreenect-0.7.5/wrappers/python/CMakeLists.txt 2025-11-11 09:48:50.045686564 +0100
@@ -19,10 +19,7 @@ find_program(CYTHON_EXECUTABLE cython)
# Figure out installation path
@ -43,7 +49,7 @@ diff -up libfreenect-0.7.5/wrappers/python/CMakeLists.txt.py3 libfreenect-0.7.5/
# them
diff -up libfreenect-0.7.5/wrappers/python/setup.py.py3 libfreenect-0.7.5/wrappers/python/setup.py
--- libfreenect-0.7.5/wrappers/python/setup.py.py3 2024-01-06 17:57:12.000000000 +0100
+++ libfreenect-0.7.5/wrappers/python/setup.py 2025-11-11 09:46:49.713970521 +0100
+++ libfreenect-0.7.5/wrappers/python/setup.py 2025-11-11 09:48:50.045794539 +0100
@@ -1,6 +1,6 @@
#!/usr/bin/env python
-from distutils.core import setup

View file

@ -1,13 +1,12 @@
%global __provides_exclude %{python3_sitearch}/.*\.so$
Name: libfreenect
Version: 0.7.5
Release: 1%{?dist}
Release: 2%{?dist}
Summary: Device driver for the Kinect
# Core libfreenect is available as Apache-2.0 OR GPL-2.0-only
#
# OpenNI driver is available as Apache-2.0
License: Apache-2.0 AND (GPL-2.0-only OR Apache-2.0)
# fakenect/parson.{c,h} is MIT
# fwfetcher.py is BSD-2-Clause
License: Apache-2.0 AND (GPL-2.0-only OR Apache-2.0) AND MIT AND BSD-2-Clause
URL: https://github.com/OpenKinect/
Source0: https://github.com/OpenKinect/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz
@ -21,6 +20,11 @@ Patch3: %{name}-0.4.2-libdir.patch
Patch4: secarch.patch
# Fix the installation path for python libs
Patch5: %{name}-0.7.5-py3.patch
# Avoid timestamps in generated docs
Patch6: %{name}-0.7.5-notimestamp.patch
# https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval
ExcludeArch: %{ix86}
BuildRequires: gcc-c++
BuildRequires: cmake3
@ -61,6 +65,8 @@ developing applications that use %{name}.
%package fakenect
Summary: Library to play back recorded data for %{name}
Requires: %{name}%{?_isa} = %{version}-%{release}
# upstream commit f1bb6e7fbe347754fbfc4613bf43000ef0b0c2b2
Provides: bundled(parson)
%description fakenect
Fakenect consists of a "record" program to save dumps from the kinect sensor
@ -80,7 +86,6 @@ library for OpenCV development.
Summary: Python 3 bindings for %{name}
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: python3-numpy
%{?python_provide:%python_provide python3-%{name}}
%description -n python3-%{name}
The %{name}-python package contains python 3 bindings for %{name}
@ -94,17 +99,18 @@ 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 -qn %{name}-%{version}
rm -rf platform/windows
%setup -q
rm -rv platform/windows
%patch -P 0 -p0 -b .videogroup
%patch -P 1 -p1 -b .openni2
%patch -P 3 -p0 -b .libdir
%patch -P 4 -p1 -b .secarch
%patch -P 5 -p1 -b .py3
%patch -P 6 -p1 -b .tstamp
%build
%cmake3 \
%cmake \
-DBUILD_AUDIO=ON \
-DBUILD_C_SYNC=ON \
-DBUILD_CV=ON \
@ -116,26 +122,27 @@ rm -rf platform/windows
-DBUILD_PYTHON3=ON \
-DBUILD_OPENNI2_DRIVER=ON
%cmake3_build
%cmake_build
pushd doc
doxygen Doxyfile
popd
%install
%cmake3_install
%cmake_install
# Install the kinect udev rule
mkdir -p %{buildroot}/lib/udev/rules.d
mkdir -p %{buildroot}%{_udevrulesdir}
mkdir -p %{buildroot}%{_libdir}/openni2
install -p -m 0644 platform/linux/udev/51-kinect.rules %{buildroot}/lib/udev/rules.d
install -p -m 0644 platform/linux/udev/51-kinect.rules %{buildroot}%{_udevrulesdir}
# Delete libtool archives
find %{buildroot} -name '*.la' -exec rm -f {} ';'
# Move the fwfetcher script to the correct datadir
mkdir -p %{buildroot}%{_datadir}/%{name}
mv %{buildroot}%{_datadir}/fwfetcher.py %{buildroot}%{_datadir}/%{name}
mv %{buildroot}%{_datadir}/fwfetcher.py %{buildroot}%{_datadir}/%{name}
chmod +x %{buildroot}%{_datadir}/%{name}/fwfetcher.py
# Move openni plugin: rhbz#1094787
mv %{buildroot}%{_libdir}/OpenNI2-FreenectDriver %{buildroot}%{_libdir}/openni2/Drivers
@ -143,43 +150,65 @@ mv %{buildroot}%{_libdir}/OpenNI2-FreenectDriver %{buildroot}%{_libdir}/openni2/
%files
%license APACHE20 GPL2
%doc README.md CONTRIB
/lib/udev/rules.d/*
%{_libdir}/libfreenect.so.0*
%{_libdir}/libfreenect_sync.so.0*
%exclude %{_bindir}/freenect-cvdemo
%exclude %{_bindir}/fakenect
%{_bindir}/freenect-*
%{_udevrulesdir}/51-kinect.rules
%{_libdir}/libfreenect.so.0{,.*}
%{_libdir}/libfreenect_sync.so.0{,.*}
%{_bindir}/freenect-camtest
%{_bindir}/freenect-chunkview
%{_bindir}/freenect-cpp_pcview
%{_bindir}/freenect-cppview
%{_bindir}/freenect-glpclview
%{_bindir}/freenect-glview
%{_bindir}/freenect-hiview
%{_bindir}/freenect-micview
%{_bindir}/freenect-regtest
%{_bindir}/freenect-regview
%{_bindir}/freenect-tiltdemo
%{_bindir}/freenect-wavrecord
%{_datadir}/%{name}
%files opencv
%{_bindir}/freenect-cvdemo
%{_libdir}/libfreenect_cv.so.*
%{_libdir}/libfreenect_cv.so.0{,.*}
%files devel
%doc doc/html
%doc examples/*.c wrappers/cpp/cppview.cpp
%{_includedir}/libfreenect
%{_libdir}/*.so
%{_libdir}/pkgconfig/*
%{_libdir}/fakenect/*.so
%{_libdir}/libfreenect.so
%{_libdir}/libfreenect_cv.so
%{_libdir}/libfreenect_sync.so
%{_libdir}/pkgconfig/libfreenect.pc
%{_libdir}/fakenect/libfakenect.so
%files static
%{_libdir}/*.a
%{_libdir}/libfreenect.a
%{_libdir}/libfreenect_sync.a
%files -n python3-%{name}
%{python3_sitearch}/*.so
%{python3_sitearch}/freenect.so
%files fakenect
%dir %{_libdir}/fakenect
%{_bindir}/fakenect-record
%{_libdir}/fakenect/*.so.*
%{_libdir}/fakenect/libfakenect.so.0{,.*}
%{_bindir}/fakenect
%{_mandir}/man1/fakenect*1.*
%{_mandir}/man1/fakenect-record.1.*
%{_mandir}/man1/fakenect.1.*
%files openni
%license APACHE20 GPL2
%{_libdir}/openni2
%changelog
* Mon Nov 24 2025 Dominik Mierzejewski <dominik@greysector.net> - 0.7.5-2
- fixed duplicate files warning
- made file lists more explicit
- corrected License tag
- added missing Provides: for bundled parson
- added executable bit to fwfetcher.py script and fixed shebang
- avoid timestamps in generated docs for reproducibility
* Tue Nov 11 2025 Dominik Mierzejewski <dominik@greysector.net> - 0.7.5-1
- Updated to 0.7.5
- Dropped obsolete patches