1 |
|
2 |
%define api 0.1 |
3 |
%define major 4 |
4 |
%define libname %mklibname usb-compat %api %major |
5 |
%define devellibname %mklibname -d usb-compat %api |
6 |
%define sdevellibname %mklibname -s -d usb-compat %api |
7 |
|
8 |
%define oldlibusb_version 0.1.12-14 |
9 |
|
10 |
Summary: A library which allows userspace access to USB devices |
11 |
Name: libusb-compat |
12 |
Version: 0.1.4 |
13 |
Release: %mkrel 2 |
14 |
Source0: http://downloads.sourceforge.net/libusb/%name-%{version}.tar.bz2 |
15 |
License: LGPLv2+ |
16 |
Group: System/Libraries |
17 |
URL: http://libusb.wiki.sourceforge.net/Libusb1.0 |
18 |
BuildRequires: doxygen |
19 |
BuildRequires: pkgconfig(libusb-1.0) >= 0.9.1 |
20 |
|
21 |
%description |
22 |
A compatibility layer allowing applications written for libusb-0.1 to work |
23 |
with libusb-1.0. libusb-compat-0.1 attempts to look, feel, smell and walk |
24 |
like libusb-0.1. |
25 |
|
26 |
%package -n %libname |
27 |
Summary: %summary |
28 |
Group: System/Libraries |
29 |
Requires(pre): filesystem >= 2.1.9-18 |
30 |
Provides: %{_lib}usb0.1_4 = %oldlibusb_version |
31 |
Obsoletes: %{_lib}usb0.1_4 < %oldlibusb_version |
32 |
# old provides from libusb0.1_4 |
33 |
Provides: libusb = %oldlibusb_version |
34 |
Provides: libusb0.1 = %oldlibusb_version |
35 |
|
36 |
%description -n %libname |
37 |
A compatibility layer allowing applications written for libusb-0.1 to work |
38 |
with libusb-1.0. libusb-compat-0.1 attempts to look, feel, smell and walk |
39 |
like libusb-0.1. |
40 |
|
41 |
%package -n %devellibname |
42 |
Summary: Development files for libusb-0.1 |
43 |
Group: Development/C |
44 |
Requires(pre): filesystem >= 2.1.9-18 |
45 |
Requires: %{libname} = %{version} |
46 |
Provides: %{_lib}usb-devel = %oldlibusb_version |
47 |
Obsoletes: %{_lib}usb-devel < %oldlibusb_version |
48 |
Obsoletes: %{_lib}usb0.1_4-devel < %oldlibusb_version |
49 |
Provides: libusb-devel = %oldlibusb_version |
50 |
Provides: libusb0.1-devel = %oldlibusb_version |
51 |
Provides: usb-compat-devel = %{version}-%{release} |
52 |
Provides: usb0.1-devel = %{version}-%{release} |
53 |
|
54 |
%description -n %devellibname |
55 |
This package contains the header files, libraries and documentation needed to |
56 |
develop applications that use libusb-0.1. |
57 |
|
58 |
%package -n %sdevellibname |
59 |
Summary: Static development files for libusb-0.1 |
60 |
Group: Development/C |
61 |
Requires(pre): filesystem >= 2.1.9-18 |
62 |
Requires: %{devellibname} = %{version} |
63 |
Provides: libusb-static-devel = %oldlibusb_version |
64 |
Provides: libusb0.1-static-devel = %oldlibusb_version |
65 |
Obsoletes: %{_lib}usb-static-devel < %oldlibusb_version |
66 |
Obsoletes: %{_lib}usb1.0_4-static-devel < %oldlibusb_version |
67 |
|
68 |
%description -n %sdevellibname |
69 |
This package contains static libraries to develop applications that use |
70 |
libusb0. |
71 |
|
72 |
%prep |
73 |
%setup -q |
74 |
|
75 |
%build |
76 |
%configure2_5x |
77 |
%make |
78 |
|
79 |
%install |
80 |
%makeinstall_std |
81 |
%multiarch_binaries %{buildroot}%{_bindir}/libusb-config |
82 |
|
83 |
rm -f %{buildroot}%{_libdir}/*.la |
84 |
|
85 |
%files -n %libname |
86 |
%doc AUTHORS COPYING README NEWS |
87 |
%{_libdir}/libusb-%{api}.so.%{major}* |
88 |
|
89 |
%files -n %devellibname |
90 |
%doc examples/*.c |
91 |
%{_libdir}/pkgconfig/libusb.pc |
92 |
%{_includedir}/usb.h |
93 |
%{_libdir}/libusb.so |
94 |
%{multiarch_bindir}/libusb-config |
95 |
%{_bindir}/libusb-config |
96 |
|
97 |
%files -n %sdevellibname |
98 |
%{_libdir}/libusb.a |