]>
Commit | Line | Data |
---|---|---|
68be1f2a | 1 | # |
2 | # Conditional build: | |
c3db903f | 3 | %bcond_without apidocs # API documentation |
4453ad9c JB |
4 | %bcond_with tests # perform "make check" |
5 | %bcond_without static_libs # static library | |
6 | %bcond_without udev # udev for device enumeration and hotplug support | |
ca10b4cd | 7 | |
7b80d3f0 | 8 | Summary: Application access to USB devices |
09575bc9 ER |
9 | Summary(es.UTF-8): libusb - Biblioteca USB |
10 | Summary(pl.UTF-8): Dostęp z poziomu aplikacji do urządzeń USB | |
11 | Summary(pt_BR.UTF-8): libusb - Biblioteca para acesso a devices USB | |
7b80d3f0 | 12 | Name: libusb |
378e5ecd | 13 | Version: 1.0.27 |
0fc92668 | 14 | Release: 1 |
434a38fe | 15 | License: LGPL v2.1+ |
7b80d3f0 | 16 | Group: Libraries |
b8fbf58c JB |
17 | #Source0Download: https://github.com/libusb/libusb/releases |
18 | Source0: https://github.com/libusb/libusb/releases/download/v%{version}/%{name}-%{version}.tar.bz2 | |
378e5ecd | 19 | # Source0-md5: 1fb61afe370e94f902a67e03eb39c51f |
b8fbf58c | 20 | URL: https://libusb.info/ |
e45b4620 | 21 | BuildRequires: autoconf >= 2.69 |
434a38fe | 22 | BuildRequires: automake >= 1.6 |
c3db903f | 23 | %{?with_apidocs:BuildRequires: doxygen} |
89acf9a9 | 24 | BuildRequires: gcc >= 6:4.9 |
4453ad9c JB |
25 | BuildRequires: glibc-devel >= 6:2.9 |
26 | BuildRequires: libtool >= 2:2 | |
f6a980d0 | 27 | BuildRequires: rpm-build >= 4.6 |
c3db903f | 28 | BuildRequires: rpmbuild(macros) >= 1.752 |
4453ad9c | 29 | %{?with_udev:BuildRequires: udev-devel} |
487dc423 | 30 | Obsoletes: libusb0.1 |
4453ad9c | 31 | Obsoletes: libusbx < 1.0.18 |
1fb117c0 | 32 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
7b80d3f0 AM |
33 | |
34 | %description | |
35 | Provides a library for application access to USB devices. | |
36 | ||
3940d8eb | 37 | %description -l es.UTF-8 |
bd61608e JB |
38 | Biblioteca de uso en devices USB. |
39 | ||
3940d8eb JR |
40 | %description -l pl.UTF-8 |
41 | Biblioteka umożliwiająca dostęp do urządzeń USB z poziomu aplikacji. | |
7b80d3f0 | 42 | |
3940d8eb | 43 | %description -l pt_BR.UTF-8 |
3f7a981a | 44 | Biblioteca para acesso em devices USB. |
c2267cfc | 45 | |
7b80d3f0 | 46 | %package devel |
177d7b8a | 47 | Summary: Header files for libusb library |
09575bc9 ER |
48 | Summary(es.UTF-8): Archivos de desarrollo de libusb |
49 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libusb | |
50 | Summary(pt_BR.UTF-8): Arquivos de desenvolvimento da libusb | |
7b80d3f0 | 51 | Group: Development/Libraries |
177d7b8a | 52 | Requires: %{name} = %{version}-%{release} |
4453ad9c | 53 | %{?with_udev:Requires: udev-devel} |
487dc423 | 54 | Obsoletes: libusb0.1-devel |
4453ad9c | 55 | Obsoletes: libusbx-devel < 1.0.18 |
7b80d3f0 AM |
56 | |
57 | %description devel | |
177d7b8a JB |
58 | This package contains header files and other resources you can use to |
59 | incorporate libusb into applications. | |
7b80d3f0 | 60 | |
3940d8eb | 61 | %description devel -l es.UTF-8 |
bd61608e JB |
62 | Bibliotecas de desarrolo para linusb. |
63 | ||
3940d8eb JR |
64 | %description devel -l pl.UTF-8 |
65 | Pliki nagłówkowe oraz dokumentacja pozwalająca na dodawanie obsługi | |
7b80d3f0 AM |
66 | USB w swoich programach. |
67 | ||
3940d8eb | 68 | %description devel -l pt_BR.UTF-8 |
3f7a981a | 69 | Bibliotecas de desenvolvimento para libusb. |
c2267cfc | 70 | |
7b80d3f0 AM |
71 | %package static |
72 | Summary: libusb static libraries | |
09575bc9 ER |
73 | Summary(es.UTF-8): Archivos de desarrollo de libusb - estatico |
74 | Summary(pl.UTF-8): Statyczne biblioteki do obsługi USB | |
75 | Summary(pt_BR.UTF-8): Arquivos de desenvolvimento da libusb - biblioteca estática | |
7b80d3f0 | 76 | Group: Development/Libraries |
177d7b8a | 77 | Requires: %{name}-devel = %{version}-%{release} |
4453ad9c | 78 | Obsoletes: libusbx-static < 1.0.18 |
7b80d3f0 AM |
79 | |
80 | %description static | |
81 | This is package with static libusb libraries. | |
82 | ||
3940d8eb | 83 | %description static -l es.UTF-8 |
bd61608e JB |
84 | Bibliotecas de desarrolo para linusb - estatico. |
85 | ||
3940d8eb | 86 | %description static -l pl.UTF-8 |
7b80d3f0 AM |
87 | Statyczne biblioteki libusb. |
88 | ||
3940d8eb JR |
89 | %description static -l pt_BR.UTF-8 |
90 | Bibliotecas de desenvolvimento para libusb - estático. | |
c2267cfc | 91 | |
c3db903f JB |
92 | %package apidocs |
93 | Summary: API documentation for libusb library | |
94 | Summary(pl.UTF-8): Dokumentacja API biblioteki libusb | |
95 | Group: Documentation | |
3c6b8f8f | 96 | BuildArch: noarch |
c3db903f JB |
97 | |
98 | %description apidocs | |
99 | API documentation for libusb library. | |
100 | ||
101 | %description apidocs -l pl.UTF-8 | |
102 | Dokumentacja API biblioteki libusb. | |
103 | ||
7b80d3f0 | 104 | %prep |
3e42a6b7 | 105 | %setup -q |
7b80d3f0 AM |
106 | |
107 | %build | |
4502897f | 108 | %{__libtoolize} |
3f7a981a | 109 | %{__aclocal} |
0b36a5f4 | 110 | %{__autoconf} |
1fb117c0 | 111 | %{__autoheader} |
0b36a5f4 | 112 | %{__automake} |
434a38fe | 113 | %configure \ |
4453ad9c JB |
114 | --disable-silent-rules \ |
115 | %{!?with_static_libs:--disable-static} \ | |
116 | %{!?with_udev:--disable-udev} | |
acb0364c | 117 | |
d864f034 | 118 | %{__make} |
6409bb61 | 119 | |
c3db903f | 120 | %{?with_apidocs:%{__make} -C doc docs} |
7b80d3f0 | 121 | |
acb0364c | 122 | %{?with_tests:%{__make} check} |
1fb117c0 | 123 | |
7b80d3f0 AM |
124 | %install |
125 | rm -rf $RPM_BUILD_ROOT | |
126 | ||
3f7a981a AM |
127 | %{__make} install \ |
128 | DESTDIR=$RPM_BUILD_ROOT | |
7b80d3f0 | 129 | |
7b80d3f0 AM |
130 | %clean |
131 | rm -rf $RPM_BUILD_ROOT | |
132 | ||
d05b454d JB |
133 | %post -p /sbin/ldconfig |
134 | %postun -p /sbin/ldconfig | |
135 | ||
7b80d3f0 AM |
136 | %files |
137 | %defattr(644,root,root,755) | |
d6105294 | 138 | %doc AUTHORS ChangeLog NEWS README TODO |
47c28a72 | 139 | %attr(755,root,root) %{_libdir}/libusb-1.0.so.*.*.* |
bfa92946 | 140 | %attr(755,root,root) %ghost %{_libdir}/libusb-1.0.so.0 |
7b80d3f0 AM |
141 | |
142 | %files devel | |
143 | %defattr(644,root,root,755) | |
47c28a72 ER |
144 | %attr(755,root,root) %{_libdir}/libusb-1.0.so |
145 | %{_libdir}/libusb-1.0.la | |
146 | %{_includedir}/libusb-1.0 | |
147 | %{_pkgconfigdir}/libusb-1.0.pc | |
7b80d3f0 | 148 | |
a98a149e | 149 | %if %{with static_libs} |
7b80d3f0 AM |
150 | %files static |
151 | %defattr(644,root,root,755) | |
47c28a72 | 152 | %{_libdir}/libusb-1.0.a |
a98a149e | 153 | %endif |
c3db903f | 154 | |
b7129889 | 155 | %if %{with apidocs} |
c3db903f JB |
156 | %files apidocs |
157 | %defattr(644,root,root,755) | |
158 | %doc doc/api-1.0/*.{css,html,js,png} | |
b7129889 | 159 | %endif |