File Kinect.spec of Package Kinect

#
# spec file for package Kinect
#
# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via https://bugs.opensuse.org/
#


%define vrui_ver 8.0

Name:           Kinect
Version:        3.10
Release:        0
Summary:        Kinect 3D plugin for Vrui
License:        GPL-2.0-or-later
Group:          System/Libraries
URL:            https://web.cs.ucdavis.edu/~okreylos/ResDev/Kinect/index.html
Source:         https://web.cs.ucdavis.edu/~okreylos/ResDev/%{name}/%{name}-%{version}.tar.gz
#PATCH-FIX-OPENSUSE fix-build.patch -- fix build errors due to the new build system
Patch0:         fix-build.patch
BuildRequires:  Mesa-devel
BuildRequires:  Vrui-devel
BuildRequires:  alsa-devel
BuildRequires:  gcc-c++
BuildRequires:  libdc1394-devel
BuildRequires:  libjpeg-devel
BuildRequires:  libpng-devel
BuildRequires:  libtheora-devel
BuildRequires:  libtiff-devel
BuildRequires:  libusb-devel
BuildRequires:  openal-soft-devel
BuildRequires:  speex-devel
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Vrui extension providing Kinect 3D plugin.

%package devel
Summary:        Development files for Kinect 3D plugin
Group:          Development/Languages/C and C++
Requires:       Kinect = %{version}

%description devel
Development files for Kinect 3D plugin for Vrui.

%prep
%setup -q -n %{name}-%{version}
%patch0

%build
%make_build VRUI_MAKEDIR=%{_datadir}/Vrui-%{vrui_ver}/make/

%install
%make_build VRUI_MAKEDIR=%{_datadir}/Vrui-%{vrui_ver}/make/ INSTALLPREFIX=%{buildroot} install
# To correct the KINECT_CONFIGDIR path
sed -i 's/=.*\/etc/= \/etc/' %{buildroot}%{_datadir}/Vrui-%{vrui_ver}/make/Configuration.Kinect

%files
%license COPYING
%doc HISTORY README
%{_bindir}/*
%config %{_sysconfdir}/Vrui-%{vrui_ver}/
%{_datadir}/Vrui-%{vrui_ver}/
%{_libdir}/Vrui-%{vrui_ver}/
%exclude %{_datadir}/Vrui-%{vrui_ver}/make/
%exclude %{_libdir}/Vrui-%{vrui_ver}/*.so

%files devel
%{_includedir}/Vrui-%{vrui_ver}/
%{_datadir}/Vrui-%{vrui_ver}/make/
%{_libdir}/Vrui-%{vrui_ver}/*.so

%changelog
openSUSE Build Service is sponsored by