| 1 | Name:       libusb-compat | 
|---|
| 2 | Version:    0.1.5 | 
|---|
| 3 | Release:    2%{?dist} | 
|---|
| 4 | Summary:    libusb-compat | 
|---|
| 5 |  | 
|---|
| 6 | Group:      System Environment/libraries | 
|---|
| 7 | License:    GPLv2+ | 
|---|
| 8 | Url:        http://libusb.sourceforge.net | 
|---|
| 9 | Source:     http://downloads.sourceforge.net/libusb/%{name}-%{version}.tar.bz2 | 
|---|
| 10 | Patch0:     libusb-compat-os2.patch | 
|---|
| 11 |  | 
|---|
| 12 | BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-build | 
|---|
| 13 | BuildRequires:  libusb1-devel | 
|---|
| 14 |  | 
|---|
| 15 | Requires:       libusb1 | 
|---|
| 16 |  | 
|---|
| 17 | %description | 
|---|
| 18 | The libusb-compat package aims to look, feel and behave exactly like libusb-0.1. It is a compatibility layer needed by packages that have not been upgraded to the libusb-1.0 API. | 
|---|
| 19 |  | 
|---|
| 20 | %package devel | 
|---|
| 21 | Summary: Development files for libusb-compat | 
|---|
| 22 | Group: Development/Libraries | 
|---|
| 23 | Requires: %{name} = %{version}-%{release} | 
|---|
| 24 |  | 
|---|
| 25 | %description devel | 
|---|
| 26 | This package contains the header files and libraries needed to develop | 
|---|
| 27 | applications that use libusb-compat. | 
|---|
| 28 |  | 
|---|
| 29 | %package static | 
|---|
| 30 | Summary: Static development files for libusb | 
|---|
| 31 | Group: Development/Libraries | 
|---|
| 32 | Requires: %{name}-devel = %{version}-%{release} | 
|---|
| 33 |  | 
|---|
| 34 | %description static | 
|---|
| 35 | This package contains static libraries to develop applications that use libusb1. | 
|---|
| 36 |  | 
|---|
| 37 | %debug_package | 
|---|
| 38 |  | 
|---|
| 39 | %prep | 
|---|
| 40 | %setup -q -n %{name}-%{version} | 
|---|
| 41 | %patch0 -p1 -b ~os2 | 
|---|
| 42 |  | 
|---|
| 43 | %build | 
|---|
| 44 | export CONFIG_SITE="/@unixroot/usr/share/config.legacy" | 
|---|
| 45 | %configure | 
|---|
| 46 | make CFLAGS="$RPM_OPT_FLAGS" %{?_smp_mflags} | 
|---|
| 47 |  | 
|---|
| 48 | %check | 
|---|
| 49 |  | 
|---|
| 50 | %install | 
|---|
| 51 | rm -rf %{buildroot} | 
|---|
| 52 | make DESTDIR=%{buildroot} install | 
|---|
| 53 |  | 
|---|
| 54 | cp -p libusb/*.dll %{buildroot}%{_libdir} | 
|---|
| 55 | cp -p libusb/.libs/usb_s.a %{buildroot}%{_libdir} | 
|---|
| 56 | rm %{buildroot}%{_libdir}/*.la | 
|---|
| 57 |  | 
|---|
| 58 | %clean | 
|---|
| 59 | rm -rf %{buildroot} | 
|---|
| 60 |  | 
|---|
| 61 | %files | 
|---|
| 62 | %defattr(-,root,root,-) | 
|---|
| 63 | %{_libdir}/libusbc.dll | 
|---|
| 64 |  | 
|---|
| 65 | %files devel | 
|---|
| 66 | %defattr(-,root,root,-) | 
|---|
| 67 | %{_bindir}/libusb-config | 
|---|
| 68 | %{_includedir}/usb.h | 
|---|
| 69 | %{_libdir}/usb.a | 
|---|
| 70 | %{_libdir}/pkgconfig/libusb.pc | 
|---|
| 71 |  | 
|---|
| 72 | %files static | 
|---|
| 73 | %defattr(-,root,root) | 
|---|
| 74 | %{_libdir}/usb_s.a | 
|---|
| 75 |  | 
|---|
| 76 | %changelog | 
|---|
| 77 | * Wed Jun 15 2016 yd <yd@os2power.com> 0.1.5-2 | 
|---|
| 78 | - added requirements. | 
|---|
| 79 | - added debug package. | 
|---|
| 80 |  | 
|---|
| 81 | * Wed Apr 16 2014 yd | 
|---|
| 82 | - first public build. | 
|---|