#
# spec file for package libusb-1_0
#
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


Name:           libusb-1_0
Version:        1.0.20
Release:        52.1
Summary:        USB Library
License:        LGPL-2.1+
Group:          System/Libraries
%define _name libusb
Url:            http://libusb.info/
Source:         http://downloads.sourceforge.net/project/%{_name}/%{_name}-1.0/%{_name}-%{version}/%{_name}-%{version}.tar.bz2
Source1:        baselibs.conf
BuildRequires:  pkg-config
%if 0%{?suse_version} >= 1200
BuildRequires:  pkgconfig(libudev)
%endif
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%define debug_package_requires libusb-1_0-0 = %{version}-%{release}

%description
Libusb is a library that allows userspace access to USB devices.

%package -n libusb-1_0-0
Summary:        USB Library
Group:          System/Libraries

%description -n libusb-1_0-0
Libusb is a library that allows userspace access to USB devices.

%package devel
Summary:        USB Library
Group:          Development/Libraries/C and C++
Requires:       glibc-devel
Requires:       libusb-1_0-0 = %{version}

%description devel
Libusb is a library that allows userspace access to USB devices.

%prep
%setup -q -n %{_name}-%{version}
tr -d '\r' <NEWS >NEWS.unix ; touch -r NEWS NEWS.unix ; mv NEWS.unix NEWS

%build
%configure \
	--disable-udev \
	--with-pic \
	--disable-static
make

%install
%makeinstall
rm -f %{buildroot}%{_libdir}/*.la

%post -n libusb-1_0-0 -p /sbin/ldconfig

%postun -n libusb-1_0-0 -p /sbin/ldconfig

%files -n libusb-1_0-0
%defattr(-,root,root)
%doc AUTHORS ChangeLog COPYING NEWS README TODO
%{_libdir}/*.so.*

%files devel
%defattr(-,root,root)
%doc PORTING
%{_includedir}/libusb-1.0
%{_libdir}/*.so
%{_libdir}/pkgconfig/*.pc

%changelog
* Fri Oct 23 2015 olaf@aepfle.de
- Remove _smp_mflags usage to fix sporadic build errors
* Mon Sep 14 2015 mardnh@gmx.de
- Update to version 1.0.20:
  * Add Haiku support
  * Fix multiple memory and resource leaks (#16, #52, #76, #81)
  * Fix possible deadlock when executing transfer callback
  * New libusb_free_pollfds() API
  * Darwin: Fix devices not being detected on OS X 10.8 (#48)
  * Linux: Allow larger isochronous transfer submission (#23)
  * Windows: Fix broken builds Cygwin/MinGW builds and compiler warnings
  * Windows: Fix broken bus number lookup
  * Windows: Improve submission of control requests for composite devices
  * Examples: Add two-stage load support to fxload (#12)
  * Correctly report cancellations due to timeouts
  * Improve efficiency of event handling
  * Improve speed of transfer submission in multi-threaded environments
  * Various other bug fixes and improvements
* Wed Jul 23 2014 mardnh@gmx.de
- Update to version 1.0.19:
  * Add support for USB bulk streams on Linux and Mac OS X (#11)
  * Windows: Add AMD and Intel USB-3.0 root hub support
  * Windows: Fix USB 3.0 speed detection on Windows 8 or later (#10)
  * Added Russian translation for libusb_strerror strings
  * All: Various small fixes and cleanups
* Wed May 21 2014 sbrabec@suse.cz
- Build with pkgconfig(libudev), not pkgconfig(udev).
* Fri Feb  7 2014 sbrabec@suse.cz
- New upstream, new home page.
- Update to version 1.0.18:
  * API extensions:
  * hotplug support
  * topology support
  * error processing, detaching, debugging etc.
  * many fixes
  * for more see ChangeLog
* Mon Apr 15 2013 mmeister@suse.com
- Added url as source.
  Please see http://en.opensuse.org/SourceUrls
* Thu Apr 26 2012 sbrabec@suse.cz
- Use %%makeinstall instead of %%make_install to build on SLE11.
* Fri Apr 20 2012 dimstar@opensuse.org
- Update to version 1.0.9:
  + Numerous bug fixes and improvements
  + Backend for Windows, for devices using the WinUSB.sys driver
  + Backend for OpenBSD and NetBSD, for devices using the ugen
    driver
  + Add libusb_get_device_speed()
  + Add libusb_has_capability()
  + Add libusb_error_name()
  + Add libusb_get_version()
- Drop libtool BuildRequires and call to autoreconf: as we switched
  to an officialy released tarball, there is no need to bootstrap
  anymore.
* Tue Apr  3 2012 sbrabec@suse.cz
- Update to the latest git snapshot 6b1982b:
  * Bug fixes.
  * Support for USB 3.0.
  * Add LIBUSB_TRANSFER_ADD_ZERO_PACKET flag.
* Sun Feb 12 2012 crrodriguez@opensuse.org
- Libraries back in %%{_libdir}, /usr merge project.
* Thu Nov 24 2011 dimstar@opensuse.org
- Update to version 1.0.9rc3:
  + Fix memory leaks
  + Factorize event handler interruption code
  + Add Windows support
  + Fix inconsistencies between prototypes and definitions
  + Add libusb_error_name() API function.
* Sun Nov 20 2011 coolo@suse.com
- add libtool as buildrequire to avoid implicit dependency
* Wed Jun  1 2011 seife+obs@b1-systems.com
- move libusb from /usr to / to make it usable for other packages
  and work around rpmlint stupidity
* Mon Jun 21 2010 opensuse@sukimashita.com
- Updated to version 1.0.8:
  * Bug fixes and documentation tweaks
  * Add more interface class definitions
- This release fixes a crash for kernel's with debug flag enabled
* Sat Apr 24 2010 coolo@novell.com
- buildrequire pkg-config to fix provides
* Tue Dec 15 2009 jengelh@medozas.de
- add baselibs.conf as a source
* Wed Dec  9 2009 aj@suse.de
- Create libusb-1_0-devel-32bit for grub2.
* Mon Nov 23 2009 sbrabec@suse.cz
- Updated to version 1.0.6:
  * Increase libusb_handle_events() timeout to 60 seconds.
  * Allows libusb applications to access multiple interfaces of the
    same device in the same application.
  * Use timerfd for timeout handling.
  * Add support for the new URB_BULK_CONTINUATION flag.
  * Support for transfer locking.
  * More flexibility with monotonic clock.
* Tue Sep  8 2009 opensuse@sukimashita.com
- Updated to version 1.0.3:
  * Bug fixes
  * Allow sending zero length bulk packets
  * Add libusb_get_max_iso_packet_size()
* Mon Jun 29 2009 sbrabec@suse.cz
- Updated to version 1.0.2:
  * Bug fixes, see ChangeLog.
* Wed May 20 2009 sbrabec@suse.cz
- Updated to version 1.0.1:
  * Bug fixes
  * Darwin backend
* Thu Apr  9 2009 sbrabec@suse.cz
- Updated to version 1.0.0, the new official stable branch:
  * Bug fixes
  * Add libusb_attach_kernel_driver()
* Thu Feb  5 2009 crrodriguez@suse.de
- remove "la" files
* Mon Oct  6 2008 sbrabec@suse.cz
- Added baselibs.conf (bnc#432304).
* Wed Sep 24 2008 ro@suse.de
- fix debug package requires
* Wed Sep 10 2008 sbrabec@suse.cz
- Updated to version 0.9.3:
  * New branch, new API.
  * Introduced contexts to the API.
  * Compatible with new Linux kernel features.
  * Isochronous endpoint I/O
  * Asynchronous I/O with per-URB style callbacks
  * Zero threads (lightweight, uses main thread of calling
  application)
  * Exposure of poll fds to applications for good mainloop
  integration
* Fri Sep  5 2008 sbrabec@suse.cz
- Split according to shared library policy.
- Disabled static library.
* Wed May  7 2008 schwab@suse.de
- Fix configure script.
* Thu Apr 10 2008 ro@suse.de
- added baselibs.conf file to build xxbit packages
  for multilib support
* Wed May 23 2007 meissner@suse.de
- libusb main package no longer should provide libusb-devel.
- run ldconfig in %%post/%%postun
* Tue May 22 2007 olh@suse.de
- split libusb-devel package (#203989)
* Tue Apr 17 2007 sbrabec@suse.cz
- Provide libusb-devel.
* Sun Mar  5 2006 olh@suse.de
- update to 0.1.12
  endian fixes, memory leaks fixed
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Sat Jan 21 2006 olh@suse.de
- update to 0.1.11
  pkgconfig support
  Workaround regression in 0.1.10 with multi-threaded applications
* Fri Dec  9 2005 olh@suse.de
- remove resmgr patch
* Wed Nov 16 2005 lnussel@suse.de
- prefer /dev/bus/usb over /proc/bus/usb
- disable resmgr patch, not needed for /dev/bus/usb anymore
* Wed Aug 10 2005 olh@suse.de
- add patch from Kay Sievers to look also into /dev/bus/usb
* Tue May 31 2005 olh@suse.de
- add libusb-libusb_la-dep.patch to allow make -j
* Fri May 27 2005 olh@suse.de
- update to 0.1.10a
* Thu May 26 2005 olh@suse.de
- fix compile warnings
- build as user
- split our resmgr patch
* Sat Mar 19 2005 meissner@suse.de
- fixed a filedescriptor leak. #73967
* Sat Feb 21 2004 meissner@suse.de
- upgraded to 0.1.8 final.
* Thu Feb  5 2004 lnussel@suse.de
- add -lresmgr to output of libusb-config
* Mon Aug 25 2003 adrian@suse.de
- do not provide usb anymore, it is not needed for an update
  and breaks rpm4 update concept
* Tue Jul 22 2003 meissner@suse.de
- Upgraded to 0.1.8beta (finally supports USB interrupt
  tranfers).
- Forward ported resmgr patch.
* Wed May 14 2003 meissner@suse.de
- added libusb.la.
* Wed Mar  5 2003 meissner@suse.de
- the resmgr device finder part was adding all devices
  to all USB busses, leading to confusion later on. Check
  for correct busnumber.
* Mon Nov 18 2002 schwab@suse.de
- Fix use of AC_DIVERT_PUSH.
* Mon Nov 11 2002 okir@suse.de
- allow opening USB devices via the resource manager
* Tue Oct 15 2002 freitag@suse.de
- updated to 0.1.6a stable release to support more scanners
* Thu Feb  7 2002 meissner@suse.de
- updated to 0.1.5 stable release
* Mon Jan 21 2002 meissner@suse.de
- updated to latest CVS snapshot, so I can build gphoto2.
- use buildroot
* Sat Nov  3 2001 ro@suse.de
- call automake with "-a -f"
* Mon Sep  3 2001 ro@suse.de
- removed Obsoletes and Provides usbutils (package reanimated)
* Fri May 25 2001 adrian@suse.de
- update to libusb-0.1.3b
- rename package from usbutils to libusb
* Tue Dec  5 2000 schwab@suse.de
- Add %%suse_update_config.
* Thu Nov 30 2000 olaf@suse.de
- add usbutils 0.7 to SuSE dist, will replace the usb.rpm