]> git.pld-linux.org Git - SPECS.git/blob - hidapi.spec
SPECS updated Tue 30 Apr 15:13:02 CEST 2024
[SPECS.git] / hidapi.spec
1 #
2 # Conditional build:
3 %bcond_without  apidocs         # API documentation
4
5 Summary:        HID API for Windows, Linux and Mac OS X
6 Summary(pl.UTF-8):      API HID dla systemów Windows, Linux oraz Mac OS X
7 Name:           hidapi
8 Version:        0.14.0
9 Release:        1
10 License:        GPL v3 or BSD or HIDAPI
11 Group:          Libraries
12 #Source0Download: https://github.com/libusb/hidapi/releases
13 Source0:        https://github.com/libusb/hidapi/archive/%{name}-%{version}/%{name}-%{version}.tar.gz
14 # Source0-md5:  d65a951df6f566f90bbeb4414caf2c1e
15 URL:            https://github.com/libusb/hidapi
16 BuildRequires:  cmake >= 3.1.3
17 %{?with_apidocs:BuildRequires:  doxygen}
18 BuildRequires:  libusb-devel >= 1.0.9
19 # HIDRAW interface
20 BuildRequires:  linux-libc-headers >= 7:2.6.39
21 BuildRequires:  pkgconfig
22 BuildRequires:  rpm-build >= 4.6
23 BuildRequires:  rpmbuild(macros) >= 1.752
24 BuildRequires:  udev-devel
25 Requires:       libusb >= 1.0.9
26 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27
28 %description
29 HIDAPI is a multi-platform library which allows an application to
30 interface with USB and Bluetooth HID-Class (Human Interface Device)
31 devices on Windows, Linux, and Mac OS X.
32
33 %description -l pl.UTF-8
34 HIDAPI to wieloplatformowa biblioteka pozwalająca aplikacjom
35 współpracować z urządzeniami USB i Bluetooth klasy HID (Human
36 Interface Device) w systemach Windows, Linux oraz Mac OS X.
37
38 %package devel
39 Summary:        Header file for HIDAPI library
40 Summary(pl.UTF-8):      Plik nagłówkowy biblioteki HIDAPI
41 Group:          Development/Libraries
42 Requires:       %{name} = %{version}-%{release}
43 Requires:       libusb-devel >= 1.0.9
44 Obsoletes:      hidapi-static < 0.11.0
45
46 %description devel
47 Header file for HIDAPI library.
48
49 %description devel -l pl.UTF-8
50 Plik nagłówkowy biblioteki HIDAPI.
51
52 %package apidocs
53 Summary:        HIDAPI API documentation
54 Summary(pl.UTF-8):      Dokumentacja API biblioteki HIDAPI
55 Group:          Documentation
56 BuildArch:      noarch
57
58 %description apidocs
59 API documentation for HIDAPI library.
60
61 %description apidocs -l pl.UTF-8
62 Dokumentacja API biblioteki HIDAPI.
63
64 %prep
65 %setup -q -n %{name}-%{name}-%{version}
66
67 %build
68 %cmake -B build
69 %{__make} -C build
70
71 %if %{with apidocs}
72 cd doxygen
73 doxygen Doxyfile
74 cd ..
75 %endif
76
77 %install
78 rm -rf $RPM_BUILD_ROOT
79
80 %{__make} -C build install \
81         DESTDIR=$RPM_BUILD_ROOT
82
83 install -D udev/69-hid.rules $RPM_BUILD_ROOT/lib/udev/rules.d/69-hid.rules
84
85 %clean
86 rm -rf $RPM_BUILD_ROOT
87
88 %post   -p /sbin/ldconfig
89 %postun -p /sbin/ldconfig
90
91 %files
92 %defattr(644,root,root,755)
93 %doc AUTHORS.txt LICENSE.txt LICENSE-bsd.txt LICENSE-orig.txt README.md
94 %attr(755,root,root) %{_libdir}/libhidapi-hidraw.so.*.*.*
95 %attr(755,root,root) %ghost %{_libdir}/libhidapi-hidraw.so.0
96 %attr(755,root,root) %{_libdir}/libhidapi-libusb.so.*.*.*
97 %attr(755,root,root) %ghost %{_libdir}/libhidapi-libusb.so.0
98 /lib/udev/rules.d/69-hid.rules
99
100 %files devel
101 %defattr(644,root,root,755)
102 %attr(755,root,root) %{_libdir}/libhidapi-hidraw.so
103 %attr(755,root,root) %{_libdir}/libhidapi-libusb.so
104 %{_includedir}/hidapi
105 %{_pkgconfigdir}/hidapi-hidraw.pc
106 %{_pkgconfigdir}/hidapi-libusb.pc
107 %{_libdir}/cmake/hidapi
108
109 %if %{with apidocs}
110 %files apidocs
111 %defattr(644,root,root,755)
112 %doc doxygen/html/*
113 %endif
This page took 1.870967 seconds and 3 git commands to generate.