File libuvc.spec of Package libuvc
#
# spec file for package libuvc
#
# Copyright (c) 2023 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 sover 0
Name: libuvc
Version: 0.0.7
Release: 0
Summary: A library for USB video devices
License: BSD-3-Clause
URL: https://github.com/libuvc/libuvc
Source0: %{name}-%{version}.tar.xz
BuildRequires: cmake
BuildRequires: gcc-c++
BuildRequires: pkgconfig(libjpeg)
BuildRequires: pkgconfig(libusb-1.0)
%description
libuvc is a library that supports enumeration, control and streaming for USB
Video Class (UVC) devices, such as consumer webcams.
%package -n %{name}%{sover}
Summary: A library for USB video devices
%description -n %{name}%{sover}
libuvc is a library that supports enumeration, control and streaming for USB
Video Class (UVC) devices, such as consumer webcams.
%package devel
Summary: Development files for %{name}%{sover}
Requires: %{name}%{sover} = %{version}
%description devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}%{sover}.
%prep
%autosetup -p1
%build
%cmake \
-DCMAKE_BUILD_TARGET=Shared
%cmake_build
%install
%cmake_install
%ldconfig_scriptlets -n %{name}%{sover}
%files -n %{name}%{sover}
%license LICENSE.txt
%doc changelog.txt
%{_libdir}/libuvc.so.%{sover}*
%files devel
%doc README.md
%{_includedir}/libuvc
%{_libdir}/cmake/libuvc
%{_libdir}/libuvc.so
%{_libdir}/pkgconfig/libuvc.pc
%changelog