| |
@@ -1,203 +1,128 @@
|
| |
- Summary: A library which allows userspace access to USB devices
|
| |
- Name: libusb1
|
| |
- Version: 1.0.9
|
| |
- Release: 0.6.rc1%{?dist}
|
| |
- # This is a git snapshot of what will hopefully soon become 1.0.9, but
|
| |
- # we need this now, to get things in place for:
|
| |
- # http://fedoraproject.org/wiki/Features/UsbNetworkRedirection
|
| |
- # To regenerate do:
|
| |
- # git clone git://git.libusb.org/libusb.git
|
| |
- # cd libusb
|
| |
- # git checkout 1.0.9-rc1
|
| |
- # ./autogen.sh
|
| |
- # make dist
|
| |
- # mv libusb-1.0.8.tar.bz2 libusb-1.0.9-rc1.tar.bz2
|
| |
- Source0: libusb-1.0.9-rc1.tar.bz2
|
| |
- #Source0: http://downloads.sourceforge.net/libusb/libusb-%{version}.tar.bz2
|
| |
-
|
| |
- Patch1: 0001-Correctly-handle-LIBUSB_TRANSFER_OVERFLOW-in-libusb_.patch
|
| |
- Patch2: 0002-linux-Fix-cancel_transfer-return-value-when-cancelli.patch
|
| |
- Patch3: 0003-Don-t-print-errors-when-cancel_transfer-fails-with-N.patch
|
| |
- Patch4: 0004-linux-Fix-handling-of-urb-status-codes.patch
|
| |
- Patch5: 0005-linux-Translate-linux-iso-pkt-status-codes-to-libusb.patch
|
| |
-
|
| |
- License: LGPLv2+
|
| |
- Group: System Environment/Libraries
|
| |
- URL: http://libusb.wiki.sourceforge.net/Libusb1.0
|
| |
- BuildRequires: doxygen
|
| |
+ Summary: Library for accessing USB devices
|
| |
+ Name: libusb1
|
| |
+ Version: 1.0.24
|
| |
+ Release: 3%{?dist}
|
| |
+ Source0: https://github.com/libusb/libusb/releases/download/v%{version}/libusb-%{version}.tar.bz2
|
| |
+ License: LGPLv2+
|
| |
+ URL: http://libusb.info
|
| |
+ BuildRequires: systemd-devel doxygen libtool
|
| |
+ BuildRequires: make
|
| |
+ BuildRequires: gcc
|
| |
+ # libusbx was removed in F34
|
| |
+ Provides: libusbx = %{version}-%{release}
|
| |
+ Obsoletes: libusbx < %{version}-%{release}
|
| |
+
|
| |
+ Patch001: 0001-linux_usbfs-Accept-sysfs-attributes-not-terminated-w.patch
|
| |
+ Patch002: 0001-linux_usbfs-Fix-parsing-of-descriptors-for-multi-con.patch
|
| |
+ Patch003: 0002-linux_usbfs-Gracefully-handle-buggy-devices-with-a-c.patch
|
| |
|
| |
%description
|
| |
- This package provides a way for applications to access USB devices. Note that
|
| |
- this library is not compatible with the original libusb-0.1 series.
|
| |
+ This package provides a way for applications to access USB devices.
|
| |
|
| |
- %package devel
|
| |
- Summary: Development files for libusb
|
| |
- Group: Development/Libraries
|
| |
- Requires: %{name} = %{version}-%{release}
|
| |
- Requires: %{name}-devel-doc = %{version}-%{release}
|
| |
- Requires: pkgconfig
|
| |
+ libusb is a library for USB device access from Linux, macOS,
|
| |
+ Windows, OpenBSD/NetBSD, Haiku and Solaris userspace.
|
| |
+
|
| |
+ libusb is abstracted internally in such a way that it can hopefully
|
| |
+ be ported to other operating systems.
|
| |
+
|
| |
+ %package devel
|
| |
+ Summary: Development files for %{name}
|
| |
+ Requires: %{name}%{?_isa} = %{version}-%{release}
|
| |
+ Provides: libusbx-devel = %{version}-%{release}
|
| |
+ Obsoletes: libusbx-devel < %{version}-%{release}
|
| |
+
|
| |
+ %description devel
|
| |
+ The %{name}-devel package contains libraries and header files for
|
| |
+ developing applications that use %{name}.
|
| |
|
| |
- %description devel
|
| |
- This package contains the header files and libraries needed to develop
|
| |
- applications that use libusb1.
|
| |
|
| |
%package devel-doc
|
| |
- Summary: Development files for libusb
|
| |
- Group: Development/Libraries
|
| |
- Requires: %{name}-devel = %{version}-%{release}
|
| |
- BuildArch: noarch
|
| |
+ Summary: Development files for %{name}
|
| |
+ Requires: libusb1-devel = %{version}-%{release}
|
| |
+ Provides: libusbx-devel-doc = %{version}-%{release}
|
| |
+ Obsoletes: libusbx-devel-doc < %{version}-%{release}
|
| |
+ BuildArch: noarch
|
| |
|
| |
%description devel-doc
|
| |
- This package contains documentation needed to develop applications that
|
| |
- use libusb1.
|
| |
+ This package contains API documentation for %{name}.
|
| |
+
|
| |
+
|
| |
+ %package tests-examples
|
| |
+ Summary: Tests and examples for %{name}
|
| |
+ # The fxload example is GPLv2+, the rest is LGPLv2+, like libusb itself.
|
| |
+ License: LGPLv2+ and GPLv2+
|
| |
+ Requires: %{name}%{?_isa} = %{version}-%{release}
|
| |
+ Provides: libusbx-tests-examples = %{version}-%{release}
|
| |
+ Obsoletes: libusbx-tests-examples < %{version}-%{release}
|
| |
|
| |
- %package static
|
| |
- Summary: Static development files for libusb
|
| |
- Group: Development/Libraries
|
| |
- Requires: %{name}-devel = %{version}-%{release}
|
| |
+ %description tests-examples
|
| |
+ This package contains tests and examples for %{name}.
|
| |
|
| |
- %description static
|
| |
- This package contains static libraries to develop applications that use libusb1.
|
| |
|
| |
%prep
|
| |
- %setup -q -n libusb-1.0.8
|
| |
- %patch1 -p1
|
| |
- %patch2 -p1
|
| |
- %patch3 -p1
|
| |
- %patch4 -p1
|
| |
- %patch5 -p1
|
| |
+ %autosetup -p1 -n libusb-%{version}
|
| |
+ chmod -x examples/*.c
|
| |
+ mkdir -p m4
|
| |
+
|
| |
|
| |
%build
|
| |
- %configure --libdir=/%{_lib}
|
| |
- make CFLAGS="$RPM_OPT_FLAGS"
|
| |
+ %configure --disable-static --enable-examples-build
|
| |
+ %{make_build}
|
| |
pushd doc
|
| |
make docs
|
| |
popd
|
| |
+ pushd tests
|
| |
+ make
|
| |
+ popd
|
| |
+
|
| |
|
| |
%install
|
| |
- make install DESTDIR=$RPM_BUILD_ROOT
|
| |
- rm -f $RPM_BUILD_ROOT/%{_lib}/*.la
|
| |
+ %{make_install}
|
| |
+ mkdir -p $RPM_BUILD_ROOT%{_bindir}
|
| |
+ install -m 755 tests/.libs/stress $RPM_BUILD_ROOT%{_bindir}/libusb-test-stress
|
| |
+ install -m 755 examples/.libs/testlibusb \
|
| |
+ $RPM_BUILD_ROOT%{_bindir}/libusb-test-libusb
|
| |
+ # Some examples are very device-specific / require specific hw and miss --help
|
| |
+ # So we only install a subset of more generic / useful examples
|
| |
+ for i in fxload listdevs xusb; do
|
| |
+ install -m 755 examples/.libs/$i \
|
| |
+ $RPM_BUILD_ROOT%{_bindir}/libusb-example-$i
|
| |
+ done
|
| |
+ rm $RPM_BUILD_ROOT%{_libdir}/*.la
|
| |
|
| |
- # Our snapshot reports itself as 1.0.8, change the pkg-config file version to
|
| |
- # 1.0.9 so that configure checks by apps who need the new 1.0.9 succeed
|
| |
- sed -i 's/1\.0\.8/1.0.9/' %{buildroot}/%{_lib}/pkgconfig/libusb-1.0.pc
|
| |
|
| |
- mkdir -p %{buildroot}%{_libdir}/pkgconfig
|
| |
- mv %{buildroot}/%{_lib}/pkgconfig/* %{buildroot}%{_libdir}/pkgconfig/
|
| |
+ %check
|
| |
+ LD_LIBRARY_PATH=libusb/.libs ldd $RPM_BUILD_ROOT%{_bindir}/libusb-test-stress
|
| |
+ LD_LIBRARY_PATH=libusb/.libs $RPM_BUILD_ROOT%{_bindir}/libusb-test-stress
|
| |
+ LD_LIBRARY_PATH=libusb/.libs $RPM_BUILD_ROOT%{_bindir}/libusb-test-libusb
|
| |
+ LD_LIBRARY_PATH=libusb/.libs $RPM_BUILD_ROOT%{_bindir}/libusb-example-listdevs
|
| |
|
| |
- %post -p /sbin/ldconfig
|
| |
- %postun -p /sbin/ldconfig
|
| |
+
|
| |
+ %ldconfig_scriptlets
|
| |
|
| |
|
| |
%files
|
| |
- %defattr(-,root,root)
|
| |
- %doc AUTHORS COPYING README NEWS ChangeLog
|
| |
- /%{_lib}/*.so.*
|
| |
+ %license COPYING
|
| |
+ %doc AUTHORS README ChangeLog
|
| |
+ %{_libdir}/*.so.*
|
| |
|
| |
%files devel
|
| |
- %defattr(-,root,root)
|
| |
- %{_includedir}/*
|
| |
- /%{_lib}/*.so
|
| |
+ %{_includedir}/libusb-1.0
|
| |
+ %{_libdir}/*.so
|
| |
%{_libdir}/pkgconfig/libusb-1.0.pc
|
| |
|
| |
%files devel-doc
|
| |
- %defattr(-,root,root)
|
| |
- %doc doc/html examples/*.c
|
| |
-
|
| |
- %files static
|
| |
- %defattr(-,root,root)
|
| |
- /%{_lib}/*.a
|
| |
-
|
| |
- %changelog
|
| |
- * Wed Mar 14 2012 Hans de Goede <hdegoede@redhat.com> - 1.0.9-0.6.rc1
|
| |
- - One more small error handling fix
|
| |
-
|
| |
- * Wed Mar 14 2012 Hans de Goede <hdegoede@redhat.com> - 1.0.9-0.5.rc1
|
| |
- - Add some small error handling fixes
|
| |
-
|
| |
- * Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.9-0.4.rc1
|
| |
- - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
|
| |
-
|
| |
- * Fri Sep 16 2011 Hans de Goede <hdegoede@redhat.com> - 1.0.9-0.3.rc1
|
| |
- - Update to upstream 1.0.9-rc1 release
|
| |
-
|
| |
- * Thu Aug 11 2011 Hans de Goede <hdegoede@redhat.com> - 1.0.9-0.2.git212ca37c
|
| |
- - Report version in pkg-config file as 1.0.9
|
| |
-
|
| |
- * Thu Jul 14 2011 Hans de Goede <hdegoede@redhat.com> - 1.0.9-0.1.git212ca37c
|
| |
- - Update to a git snapshot which should be pretty close to the final 1.0.9
|
| |
- - Many bugfixes
|
| |
- - Needed for: http://fedoraproject.org/wiki/Features/UsbNetworkRedirection
|
| |
-
|
| |
- * Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.8-7
|
| |
- - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
|
| |
-
|
| |
- * Wed Jan 26 2011 Jan Vcelak <jvcelak@redhat.com> 1.0.8-6
|
| |
- - package config file has to be in /usr/lib/pkgconfig
|
| |
+ %doc doc/api-1.0 examples/*.c
|
| |
|
| |
- * Tue Jan 25 2011 Jan Vcelak <jvcelak@redhat.com> 1.0.8-5
|
| |
- - move libraries from /usr/lib to /lib (#519716)
|
| |
+ %files tests-examples
|
| |
+ %{_bindir}/libusb-example-fxload
|
| |
+ %{_bindir}/libusb-example-listdevs
|
| |
+ %{_bindir}/libusb-example-xusb
|
| |
+ %{_bindir}/libusb-test-stress
|
| |
+ %{_bindir}/libusb-test-libusb
|
| |
|
| |
- * Sun Nov 07 2010 Dan Horák <dan[at]danny.cz> - 1.0.8-4
|
| |
- - drop the ExcludeArch as it's causing too many troubles
|
| |
|
| |
- * Wed Sep 29 2010 jkeating - 1.0.8-3
|
| |
- - Rebuilt for gcc bug 634757
|
| |
-
|
| |
- * Tue Sep 14 2010 Jan Vcelak <jvcelak@redhat.com> 1.0.8-2
|
| |
- - USB access error messages are now handled by standard logging mechanism
|
| |
- instead of printing to stderr (#628356)
|
| |
-
|
| |
- * Mon May 17 2010 Jindrich Novy <jnovy@redhat.com> 1.0.8-1
|
| |
- - update to 1.0.8 (#592901)
|
| |
-
|
| |
- * Fri Jan 22 2010 Jindrich Novy <jnovy@redhat.com> 1.0.6-2
|
| |
- - put all doxygen and other docs to separate noarch subpackage to avoid
|
| |
- multiarch conflicts (#507980)
|
| |
-
|
| |
- * Wed Dec 02 2009 Jindrich Novy <jnovy@redhat.com> 1.0.6-1
|
| |
- - update to 1.0.6
|
| |
-
|
| |
- * Mon Sep 28 2009 Jindrich Novy <jnovy@redhat.com> 1.0.3-1
|
| |
- - update to 1.0.3
|
| |
-
|
| |
- * Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.2-2
|
| |
- - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
|
| |
-
|
| |
- * Mon Jun 15 2009 Jindrich Novy <jnovy@redhat.com> 1.0.2-1
|
| |
- - update to 1.0.2
|
| |
-
|
| |
- * Wed May 13 2009 Jindrich Novy <jnovy@redhat.com> 1.0.1-1
|
| |
- - update to 1.0.1
|
| |
-
|
| |
- * Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.0-2
|
| |
- - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
|
| |
-
|
| |
- * Mon Dec 15 2008 - Bastien Nocera <bnocera@redhat.com> - 1.0.0-1
|
| |
- - Update to 1.0.0
|
| |
-
|
| |
- * Fri Nov 21 2008 - Bastien Nocera <bnocera@redhat.com> - 0.9.4-1
|
| |
- - Update to 0.9.4
|
| |
-
|
| |
- * Tue Sep 23 2008 Jindrich Novy <jnovy@redhat.com> 0.9.3-0.1
|
| |
- - update to 0.9.3
|
| |
-
|
| |
- * Sun Jul 06 2008 - Bastien Nocera <bnocera@redhat.com> - 0.9.1
|
| |
- - Update to 0.9.1
|
| |
-
|
| |
- * Mon May 26 2008 Jindrich Novy <jnovy@redhat.com> 0.9.0-0.4
|
| |
- - update to official beta
|
| |
-
|
| |
- * Thu May 23 2008 Jindrich Novy <jnovy@redhat.com> 0.9.0-0.3.gitbef33bb
|
| |
- - update comment on how the tarball was created
|
| |
- - use abbreviated git hash within package name to avoid conflicts
|
| |
- - add to %%description that libusb1 is incompatible with libsub-0.1
|
| |
-
|
| |
- * Thu May 22 2008 Jindrich Novy <jnovy@redhat.com> 0.9.0-0.2.gitbef33bb
|
| |
- - add info on how the snapshot tarball was created
|
| |
-
|
| |
- * Wed May 21 2008 Jindrich Novy <jnovy@redhat.com> 0.9.0-0.1.gitbef33bb
|
| |
- - use proper version to denote it is a git snapshot
|
| |
-
|
| |
- * Thu May 15 2008 Jindrich Novy <jnovy@redhat.com> 0.9.0-0.1
|
| |
- - initial packaging
|
| |
+ %changelog
|
| |
+ * Tue Jan 19 18:47:55 CET 2021 Benjamin Berg <bberg@redhat.com> - 1.0.24-3
|
| |
+ - New libusb1 package replacing libusbx
|
| |
+ Resolves: #1918269
|
| |
\ No newline at end of file
|
| |
New libusb1 package, test build and gating