]> git.pld-linux.org Git - packages/hidapi.git/blob - hidapi.spec
c123673f1463eef70b417fe0bf4dcd755fc1d4c8
[packages/hidapi.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.10.1
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:  12dd792b3dbdfd5c875c3d8b0527cb79
15 URL:            https://github.com/libusb/hidapi
16 BuildRequires:  autoconf >= 2.63
17 BuildRequires:  automake
18 %{?with_apidocs:BuildRequires:  doxygen}
19 BuildRequires:  libtool >= 2:2
20 BuildRequires:  libusb-devel >= 1.0.9
21 # HIDRAW interface
22 BuildRequires:  linux-libc-headers >= 7:2.6.39
23 BuildRequires:  pkgconfig
24 BuildRequires:  rpmbuild(macros) >= 1.752
25 BuildRequires:  udev-devel
26 Requires:       libusb >= 1.0.9
27 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
29 %description
30 HIDAPI is a multi-platform library which allows an application to
31 interface with USB and Bluetooth HID-Class (Human Interface Device)
32 devices on Windows, Linux, and Mac OS X.
33
34 %description -l pl.UTF-8
35 HIDAPI to wieloplatformowa biblioteka pozwalająca aplikacjom
36 współpracować z urządzeniami USB i Bluetooth klasy HID (Human
37 Interface Device) w systemach Windows, Linux oraz Mac OS X.
38
39 %package devel
40 Summary:        Header file for HIDAPI library
41 Summary(pl.UTF-8):      Plik nagłówkowy biblioteki HIDAPI
42 Group:          Development/Libraries
43 Requires:       %{name} = %{version}-%{release}
44 Requires:       libusb-devel >= 1.0.9
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 static
53 Summary:        Static HIDAPI library
54 Summary(pl.UTF-8):      Statyczna biblioteka HIDAPI
55 Group:          Development/Libraries
56 Requires:       %{name}-devel = %{version}-%{release}
57
58 %description static
59 Static HIDAPI library.
60
61 %description static -l pl.UTF-8
62 Statyczna biblioteka HIDAPI.
63
64 %package apidocs
65 Summary:        HIDAPI API documentation
66 Summary(pl.UTF-8):      Dokumentacja API biblioteki HIDAPI
67 Group:          Documentation
68 BuildArch:      noarch
69
70 %description apidocs
71 API documentation for HIDAPI library.
72
73 %description apidocs -l pl.UTF-8
74 Dokumentacja API biblioteki HIDAPI.
75
76 %prep
77 %setup -q -n %{name}-%{name}-%{version}
78
79 %build
80 %{__libtoolize}
81 %{__aclocal} -I m4
82 %{__autoconf}
83 %{__autoheader}
84 %{__automake}
85 %configure \
86         --disable-silent-rules
87 %{__make}
88
89 %if %{with apidocs}
90 cd doxygen
91 doxygen Doxyfile
92 cd ..
93 %endif
94
95 %install
96 rm -rf $RPM_BUILD_ROOT
97
98 %{__make} install \
99         DESTDIR=$RPM_BUILD_ROOT
100
101 # obsoleted by pkg-config
102 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libhidapi-*.la
103
104 # packaged as %doc
105 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/hidapi
106
107 %clean
108 rm -rf $RPM_BUILD_ROOT
109
110 %post   -p /sbin/ldconfig
111 %postun -p /sbin/ldconfig
112
113 %files
114 %defattr(644,root,root,755)
115 # included hid.rules as doc only - it uses e.g. MODE="0666", so requires some adjustments at least for stricter permissions
116 %doc AUTHORS.txt LICENSE.txt LICENSE-bsd.txt LICENSE-orig.txt README.md udev/99-hid.rules
117 %attr(755,root,root) %{_libdir}/libhidapi-hidraw.so.*.*.*
118 %attr(755,root,root) %ghost %{_libdir}/libhidapi-hidraw.so.0
119 %attr(755,root,root) %{_libdir}/libhidapi-libusb.so.*.*.*
120 %attr(755,root,root) %ghost %{_libdir}/libhidapi-libusb.so.0
121
122 %files devel
123 %defattr(644,root,root,755)
124 %attr(755,root,root) %{_libdir}/libhidapi-hidraw.so
125 %attr(755,root,root) %{_libdir}/libhidapi-libusb.so
126 %{_includedir}/hidapi
127 %{_pkgconfigdir}/hidapi-hidraw.pc
128 %{_pkgconfigdir}/hidapi-libusb.pc
129
130 %files static
131 %defattr(644,root,root,755)
132 %{_libdir}/libhidapi-hidraw.a
133 %{_libdir}/libhidapi-libusb.a
134
135 %if %{with apidocs}
136 %files apidocs
137 %defattr(644,root,root,755)
138 %doc doxygen/html/*
139 %endif
This page took 0.0749 seconds and 2 git commands to generate.