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