2014-02-10 22:05:19 +01:00
|
|
|
#
|
2019-07-22 10:05:36 +02:00
|
|
|
# spec file for package hidapi
|
2014-02-10 22:05:19 +01:00
|
|
|
#
|
2019-07-22 10:05:36 +02:00
|
|
|
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
2014-02-10 22:05:19 +01:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
|
2019-07-22 10:05:36 +02:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2014-02-10 22:05:19 +01:00
|
|
|
#
|
|
|
|
|
2019-07-22 10:05:36 +02:00
|
|
|
|
2014-02-10 22:05:19 +01:00
|
|
|
%define sover 0
|
|
|
|
|
|
|
|
Name: hidapi
|
2019-07-22 10:05:36 +02:00
|
|
|
Version: 0.9.0
|
2014-02-10 22:05:19 +01:00
|
|
|
Release: 0
|
|
|
|
Summary: Simple library for communicating with USB and Bluetooth HID devices
|
2019-07-22 10:05:36 +02:00
|
|
|
License: GPL-3.0-or-later OR BSD-3-Clause
|
2014-02-10 22:05:19 +01:00
|
|
|
Group: System/Libraries
|
2019-07-22 10:05:36 +02:00
|
|
|
Url: https://github.com/libusb/hidapi
|
|
|
|
Source: %{name}-%{version}.tar.gz
|
2014-03-23 21:11:07 +01:00
|
|
|
# PATCH-FIX-OPENSUSE do_not_install_docs.patch -- don't let make install put files into /usr/share/doc/packages
|
|
|
|
Patch0: do_not_install_docs.patch
|
2019-07-22 10:05:36 +02:00
|
|
|
BuildRequires: autoconf
|
|
|
|
BuildRequires: automake
|
|
|
|
BuildRequires: gcc-c++
|
|
|
|
BuildRequires: libtool
|
2014-02-10 22:05:19 +01:00
|
|
|
BuildRequires: libudev-devel
|
|
|
|
BuildRequires: libusb-1_0-devel
|
2019-07-22 10:05:36 +02:00
|
|
|
BuildRequires: make
|
2014-02-10 22:05:19 +01:00
|
|
|
BuildRequires: pkg-config
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
|
|
|
|
%description
|
|
|
|
HIDAPI is a library which allows an application to interface with USB and Bluetooth HID-Class devices.
|
|
|
|
While it can be used to communicate with standard HID devices like keyboards, mice, and Joysticks, it is most useful when used with custom (Vendor-Defined) HID devices.
|
|
|
|
|
|
|
|
%package -n libhidapi-devel
|
|
|
|
Summary: Development libraries and header files for hidapi
|
|
|
|
Group: Development/Libraries/C and C++
|
|
|
|
Requires: glibc-devel
|
|
|
|
Requires: libhidapi-hidraw%{sover} = %{version}
|
|
|
|
Requires: libhidapi-libusb%{sover} = %{version}
|
2019-07-22 10:05:36 +02:00
|
|
|
Requires: libudev-devel
|
|
|
|
Requires: libusb-1_0-devel
|
2014-02-10 22:05:19 +01:00
|
|
|
|
|
|
|
%description -n libhidapi-devel
|
|
|
|
This package contains the header files and libraries for building
|
|
|
|
programs using the hidapi library.
|
|
|
|
|
|
|
|
%package -n libhidapi-hidraw%{sover}
|
|
|
|
Summary: Simple library for communicating with USB and Bluetooth HID devices
|
|
|
|
Group: System/Libraries
|
|
|
|
|
|
|
|
%description -n libhidapi-hidraw%{sover}
|
|
|
|
HIDAPI is a library which allows an application to interface with USB and Bluetooth HID-Class devices.
|
2014-03-23 21:11:07 +01:00
|
|
|
While it can be used to communicate with standard HID devices like keyboards, mice, and Joysticks, it is most useful when used with custom (Vendor-Defined) HID devices.
|
2014-02-10 22:05:19 +01:00
|
|
|
|
|
|
|
%package -n libhidapi-libusb%{sover}
|
|
|
|
Summary: Simple library for communicating with USB and Bluetooth HID devices
|
|
|
|
Group: System/Libraries
|
|
|
|
|
|
|
|
%description -n libhidapi-libusb%{sover}
|
|
|
|
HIDAPI is a library which allows an application to interface with USB and Bluetooth HID-Class devices.
|
2014-03-23 21:11:07 +01:00
|
|
|
While it can be used to communicate with standard HID devices like keyboards, mice, and Joysticks, it is most useful when used with custom (Vendor-Defined) HID devices.
|
2014-02-10 22:05:19 +01:00
|
|
|
|
|
|
|
%prep
|
2019-07-22 10:05:36 +02:00
|
|
|
%setup -q -n %{name}-%{name}-%{version}
|
2014-03-23 21:11:07 +01:00
|
|
|
%patch0 -p1
|
2014-02-10 22:05:19 +01:00
|
|
|
|
|
|
|
%build
|
|
|
|
./bootstrap
|
|
|
|
%configure --disable-static --docdir=%{_defaultdocdir}/%{name}
|
|
|
|
make %{?_smp_mflags}
|
|
|
|
|
|
|
|
%install
|
2014-04-10 11:21:25 +02:00
|
|
|
make install DESTDIR=%{?buildroot}
|
2014-03-23 21:11:07 +01:00
|
|
|
find %{buildroot}%{_libdir} -type f -name '*.la' -delete -print
|
2014-02-10 22:05:19 +01:00
|
|
|
|
|
|
|
%post -n libhidapi-libusb%{sover} -p /sbin/ldconfig
|
|
|
|
%post -n libhidapi-hidraw%{sover} -p /sbin/ldconfig
|
|
|
|
|
|
|
|
%postun -n libhidapi-libusb%{sover} -p /sbin/ldconfig
|
|
|
|
%postun -n libhidapi-hidraw%{sover} -p /sbin/ldconfig
|
|
|
|
|
|
|
|
%files -n libhidapi-devel
|
|
|
|
%defattr(-,root,root)
|
2019-07-22 10:05:36 +02:00
|
|
|
%doc README.md AUTHORS.txt HACKING.txt
|
2014-02-10 22:05:19 +01:00
|
|
|
%{_includedir}/hidapi
|
|
|
|
%{_libdir}/pkgconfig/*
|
|
|
|
%{_libdir}/libhidapi-*.so
|
|
|
|
|
|
|
|
%files -n libhidapi-hidraw%{sover}
|
|
|
|
%defattr(-,root,root)
|
2019-07-22 10:05:36 +02:00
|
|
|
%license LICENSE*
|
2014-02-10 22:05:19 +01:00
|
|
|
%{_libdir}/libhidapi-hidraw.so.%{sover}*
|
|
|
|
|
|
|
|
%files -n libhidapi-libusb%{sover}
|
|
|
|
%defattr(-,root,root)
|
2019-07-22 10:05:36 +02:00
|
|
|
%license LICENSE*
|
2014-02-10 22:05:19 +01:00
|
|
|
%{_libdir}/libhidapi-libusb.so.%{sover}*
|
|
|
|
|
|
|
|
%changelog
|