mirror of
https://abf.rosa.ru/djam/hidapi.git
synced 2025-02-23 10:12:48 +00:00
90 lines
2.4 KiB
RPMSpec
90 lines
2.4 KiB
RPMSpec
%define major 0
|
|
%define libhidraw %mklibname %{name}-hidraw %{major}
|
|
%define libusb %mklibname %{name}-libusb %{major}
|
|
%define devname %mklibname %{name} -d
|
|
|
|
Summary: Library for communicating with USB and Bluetooth HID devices
|
|
Name: hidapi
|
|
Version: 0.10.1
|
|
Release: 3
|
|
License: GPLv3
|
|
Group: Communications
|
|
Url: https://github.com/libusb/hidapi
|
|
Source0: https://github.com/libusb/hidapi/archive/%{name}-%{version}.tar.gz
|
|
Patch0: autoconf-2.70.patch
|
|
BuildRequires: autoconf
|
|
BuildRequires: automake
|
|
BuildRequires: libtool
|
|
BuildRequires: m4
|
|
BuildRequires: pkgconfig(libusb)
|
|
BuildRequires: pkgconfig(udev)
|
|
|
|
%description
|
|
HIDAPI is a multi-platform library which allows an application to interface
|
|
with USB and Bluetooth HID-class devices on Windows, Linux, FreeBSD and Mac OS
|
|
X. On Linux, either the hidraw or the libusb back-end can be used. There are
|
|
trade-offs and the functionality supported is slightly different.
|
|
|
|
#------------------------------------------------------------------
|
|
|
|
%package -n %{libhidraw}
|
|
Summary: Library files for hidapi
|
|
Group: System/Libraries
|
|
|
|
%description -n %{libhidraw}
|
|
This package contains library files for hidapi which provides access to
|
|
USB and Bluetooth HID-class devices.
|
|
|
|
%files -n %{libhidraw}
|
|
%doc AUTHORS.txt README.md
|
|
%{_libdir}/libhidapi-hidraw.so.%{major}*
|
|
|
|
#------------------------------------------------------------------
|
|
|
|
%package -n %{libusb}
|
|
Summary: Library files for hidapi
|
|
Group: System/Libraries
|
|
|
|
%description -n %{libusb}
|
|
This package contains library files for hidapi which provides access to
|
|
USB and Bluetooth HID-class devices.
|
|
|
|
%files -n %{libusb}
|
|
%doc AUTHORS.txt README.md
|
|
%{_libdir}/libhidapi-libusb.so.%{major}*
|
|
|
|
#------------------------------------------------------------------
|
|
|
|
%package -n %{devname}
|
|
Summary: Development files for hidapi
|
|
Group: System/Libraries
|
|
Requires: %{libhidraw} = %{EVRD}
|
|
Requires: %{libusb} = %{EVRD}
|
|
Provides: %{name}-devel = %{EVRD}
|
|
|
|
%description -n %{devname}
|
|
This package contains development files for hidapi which provides access to
|
|
USB and Bluetooth HID-class devices.
|
|
|
|
%files -n %{devname}
|
|
%{_includedir}/hidapi
|
|
%{_libdir}/libhidapi-*.so
|
|
%{_libdir}/pkgconfig/hidapi-*.pc
|
|
|
|
#------------------------------------------------------------------
|
|
|
|
%prep
|
|
%setup -qn %{name}-%{name}-%{version}
|
|
%apply_patches
|
|
|
|
%build
|
|
autoreconf -fi
|
|
%configure \
|
|
--disable-testgui \
|
|
--disable-static
|
|
%make
|
|
|
|
%install
|
|
%makeinstall_std
|
|
|
|
rm -rf %{buildroot}%{_defaultdocdir}/%{name}
|