96b9e4c
Summary:        Library for accessing USB devices
96b9e4c
Name:           libusbx
5684853
Version:        1.0.23
baffb7e
Release:        2%{?dist}
d295876
# upstream libusbx has merged back with libusb and is now called libusb again
88c706d
# but we already have a libusb package for the old libusb-compat-0.1, renaming
88c706d
# that to libusb-compat while at the same time giving this its name is a bit
88c706d
# tricky, lets stick with the libusbx name for now
5684853
Source0:        https://github.com/libusb/libusb/releases/download/v%{version}/libusb-%{version}.tar.bz2
96b9e4c
License:        LGPLv2+
d295876
URL:            http://libusb.info
4bebf73
BuildRequires:  systemd-devel doxygen libtool
30f1413
BuildRequires: make
96b9e4c
Provides:       libusb1 = %{version}-%{release}
96b9e4c
Obsoletes:      libusb1 <= 1.0.9
96b9e4c
96b9e4c
%description
96b9e4c
This package provides a way for applications to access USB devices.
96b9e4c
96b9e4c
Libusbx is a fork of the original libusb, which is a fully API and ABI
96b9e4c
compatible drop in for the libusb-1.0.9 release. The libusbx fork was
96b9e4c
started by most of the libusb-1.0 developers, after the original libusb
96b9e4c
project did not produce a new release for over 18 months.
96b9e4c
96b9e4c
Note that this library is not compatible with the original libusb-0.1 series,
96b9e4c
if you need libusb-0.1 compatibility install the libusb package.
96b9e4c
96b9e4c
96b9e4c
%package        devel
96b9e4c
Summary:        Development files for %{name}
96b9e4c
Requires:       %{name}%{?_isa} = %{version}-%{release}
96b9e4c
Provides:       libusb1-devel = %{version}-%{release}
96b9e4c
Obsoletes:      libusb1-devel <= 1.0.9
96b9e4c
96b9e4c
%description    devel
96b9e4c
The %{name}-devel package contains libraries and header files for
96b9e4c
developing applications that use %{name}.
96b9e4c
96b9e4c
96b9e4c
%package devel-doc
96b9e4c
Summary:        Development files for %{name}
96b9e4c
Provides:       libusb1-devel-doc = %{version}-%{release}
96b9e4c
Obsoletes:      libusb1-devel-doc <= 1.0.9
96b9e4c
BuildArch:      noarch
96b9e4c
96b9e4c
%description devel-doc
96b9e4c
This package contains API documentation for %{name}.
96b9e4c
96b9e4c
4317b66
%package        tests-examples
4317b66
Summary:        Tests and examples for %{name}
4317b66
Requires:       %{name}%{?_isa} = %{version}-%{release}
4317b66
4317b66
%description tests-examples
4317b66
This package contains tests and examples for %{name}.
4317b66
4317b66
96b9e4c
%prep
5684853
%autosetup -p1 -n libusb-%{version}
4317b66
chmod -x examples/*.c
88c706d
mkdir -p m4
96b9e4c
96b9e4c
96b9e4c
%build
96b9e4c
%configure --disable-static --enable-examples-build
5684853
%{make_build}
96b9e4c
pushd doc
96b9e4c
make docs
96b9e4c
popd
4317b66
pushd tests
4317b66
make
4317b66
popd
96b9e4c
96b9e4c
96b9e4c
%install
5684853
%{make_install}
4317b66
mkdir -p $RPM_BUILD_ROOT%{_bindir}
4317b66
install -m 755 tests/.libs/stress $RPM_BUILD_ROOT%{_bindir}/libusb-test-stress
4317b66
install -m 755 examples/.libs/testlibusb \
4317b66
    $RPM_BUILD_ROOT%{_bindir}/libusb-test-libusb
4317b66
# Some examples are very device-specific / require specific hw and miss --help
4317b66
# So we only install a subset of more generic / useful examples
4317b66
for i in fxload listdevs xusb; do
4317b66
    install -m 755 examples/.libs/$i \
4317b66
        $RPM_BUILD_ROOT%{_bindir}/libusb-example-$i
4317b66
done
96b9e4c
rm $RPM_BUILD_ROOT%{_libdir}/*.la
96b9e4c
96b9e4c
4317b66
%check
4317b66
LD_LIBRARY_PATH=libusb/.libs ldd $RPM_BUILD_ROOT%{_bindir}/libusb-test-stress
4317b66
LD_LIBRARY_PATH=libusb/.libs $RPM_BUILD_ROOT%{_bindir}/libusb-test-stress
4317b66
LD_LIBRARY_PATH=libusb/.libs $RPM_BUILD_ROOT%{_bindir}/libusb-test-libusb
4317b66
LD_LIBRARY_PATH=libusb/.libs $RPM_BUILD_ROOT%{_bindir}/libusb-example-listdevs
4317b66
4317b66
f09dd86
%ldconfig_scriptlets
96b9e4c
96b9e4c
96b9e4c
%files
4e66b08
%license COPYING
88c706d
%doc AUTHORS README ChangeLog
96b9e4c
%{_libdir}/*.so.*
96b9e4c
96b9e4c
%files devel
96b9e4c
%{_includedir}/libusb-1.0
96b9e4c
%{_libdir}/*.so
96b9e4c
%{_libdir}/pkgconfig/libusb-1.0.pc
96b9e4c
96b9e4c
%files devel-doc
96b9e4c
%doc doc/html examples/*.c
96b9e4c
4317b66
%files tests-examples
4317b66
%{_bindir}/libusb-example-fxload
4317b66
%{_bindir}/libusb-example-listdevs
4317b66
%{_bindir}/libusb-example-xusb
4317b66
%{_bindir}/libusb-test-stress
4317b66
%{_bindir}/libusb-test-libusb
4317b66
96b9e4c
96b9e4c
%changelog
baffb7e
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.23-2
baffb7e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
baffb7e
5684853
* Thu Mar 26 2020 Peter Robinson <pbrobinson@fedoraproject.org> - 1.0.23-1
5684853
- Update to 1.0.23
5684853
c5b6e87
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.22-5
c5b6e87
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
c5b6e87
c55252a
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.22-4
c55252a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
c55252a
4317b66
* Wed Mar 13 2019 Hans de Goede <hdegoede@redhat.com> - 1.0.22-3
4317b66
- Add tests and examples to a new tests-examples subpackage, so that these
4317b66
  can be used for the upcoming gating stuff
4317b66
- Add %%check using some of the tests/examples
4317b66
6f872f6
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.22-2
6f872f6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
6f872f6
Victor Toso cbd5348
* Tue Aug 07 2018 Victor Toso <victortoso@redhat.com> - 1.0.22-1
Victor Toso cbd5348
- Update to 1.0.22
Victor Toso cbd5348
304a518
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.21-7
304a518
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
304a518
272020c
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.21-6
272020c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
272020c
f09dd86
* Sat Feb 03 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.0.21-5
f09dd86
- Switch to %%ldconfig_scriptlets
f09dd86
4179dfa
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.21-4
4179dfa
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
4179dfa
3b31740
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.21-3
3b31740
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
3b31740
1d447b1
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.21-2
1d447b1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
1d447b1
88c706d
* Wed Oct 26 2016 Hans de Goede <hdegoede@redhat.com> - 1.0.21-1
88c706d
- Update to the final 1.0.21 upstream release
88c706d
169fa54
* Wed Aug 10 2016 Hans de Goede <hdegoede@redhat.com> - 1.0.21-0.2.rc2
169fa54
- Update to 1.0.21-rc2 upstream release
169fa54
- Add a bunch of locking fixes which are pending upstream
169fa54
4bebf73
* Tue Feb 23 2016 Hans de Goede <hdegoede@redhat.com> - 1.0.21-0.1.git448584a
4bebf73
- Update to a pre 1.0.21 git snapshot to bring in libusb_interrupt_event_handler
4bebf73
  which chromium needs (rhbz#1270324)
4bebf73
64432c3
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.20-2
64432c3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
64432c3
73cc7d3
* Thu Sep 24 2015 Hans de Goede <hdegoede@redhat.com> - 1.0.20-1
73cc7d3
- Update to 1.0.20 (rhbz#1262817)
73cc7d3
4e66b08
* Tue Jun 16 2015 Peter Robinson <pbrobinson@fedoraproject.org> 1.0.19-3
4e66b08
- Use %%license
4e66b08
83780d7
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.19-2
83780d7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
83780d7
1e569d4
* Fri Jun 13 2014 Hans de Goede <hdegoede@redhat.com> - 1.0.19-1
1e569d4
- Update to 1.0.19 final
1e569d4
644995d
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.19-0.3.rc2
644995d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
644995d
f4710bb
* Fri May 30 2014 Hans de Goede <hdegoede@redhat.com> - 1.0.19-0.2.rc2
f4710bb
- Update to 1.0.19-rc2
f4710bb
fc69c78
* Mon May 19 2014 Hans de Goede <hdegoede@redhat.com> - 1.0.19-0.1.rc1
fc69c78
- Update to 1.0.19-rc1
fc69c78
d295876
* Sat Mar  8 2014 Hans de Goede <hdegoede@redhat.com> - 1.0.18-1
d295876
- Update to 1.0.18 release (rhbz#1058000)
d295876
4c56e5a
* Fri Sep  6 2013 Hans de Goede <hdegoede@redhat.com> - 1.0.17-1
4c56e5a
- Update to 1.0.17 final release
4c56e5a
acdf679
* Wed Aug 28 2013 Hans de Goede <hdegoede@redhat.com> - 1.0.17-0.1.rc1
acdf679
- New upstream 1.0.17-rc1 release
acdf679
bec67d9
* Tue Jul 30 2013 Hans de Goede <hdegoede@redhat.com> - 1.0.16-3
bec67d9
- Fix another libusb_exit deadlock (rhbz#985484)
bec67d9
5ca63c4
* Fri Jul 19 2013 Hans de Goede <hdegoede@redhat.com> - 1.0.16-2
5ca63c4
- Fix libusb_exit sometimes (race) deadlocking on exit (rhbz#985484)
5ca63c4
a636700
* Thu Jul 11 2013 Hans de Goede <hdegoede@redhat.com> - 1.0.16-1
a636700
- New upstream 1.0.16 final release
a636700
821350c
* Sat Jul  6 2013 Hans de Goede <hdegoede@redhat.com> - 1.0.16-0.2.rc3
821350c
- New upstream 1.0.16-rc3 release
821350c
ef83b1b
* Mon Jul  1 2013 Hans de Goede <hdegoede@redhat.com> - 1.0.16-0.1.rc2
ef83b1b
- New upstream 1.0.16-rc2 release
ef83b1b
1925ee1
* Fri Apr 19 2013 Hans de Goede <hdegoede@redhat.com> - 1.0.15-2
1925ee1
- Replace tarbal with upstream re-spun tarbal which fixes line-ending and
1925ee1
  permission issues
1925ee1
dd43a18
* Wed Apr 17 2013 Hans de Goede <hdegoede@redhat.com> - 1.0.15-1
dd43a18
- Upgrade to 1.0.15 (rhbz#952575)
dd43a18
d6cc68e
* Tue Apr  2 2013 Hans de Goede <hdegoede@redhat.com> - 1.0.14-3
d6cc68e
- Drop devel-doc Requires from the devel package (rhbz#947297)
d6cc68e
4acc596
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.14-2
4acc596
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
4acc596
6f59945
* Wed Sep 26 2012 Hans de Goede <hdegoede@redhat.com> - 1.0.14-1
6f59945
- Upgrade to 1.0.14
6f59945
e272650
* Mon Sep 24 2012 Hans de Goede <hdegoede@redhat.com> - 1.0.13-1
e272650
- Upgrade to 1.0.13
e272650
d105f36
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.11-3
d105f36
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
d105f36
96b9e4c
* Wed May 23 2012 Hans de Goede <hdegoede@redhat.com> - 1.0.11-2
96b9e4c
- Fix URL to actually point to libusbx
96b9e4c
- Improve description to explain the relation between libusbx and libusb
96b9e4c
- Build the examples (to test linking, they are not packaged)
96b9e4c
96b9e4c
* Tue May 22 2012 Hans de Goede <hdegoede@redhat.com> - 1.0.11-1
96b9e4c
- New libusbx package, replacing libusb1
96b9e4c
- Switching to libusbx upstream as that actually does releases (hurray)
96b9e4c
- Drop all patches (all upstream)
96b9e4c
- Drop -static subpackage (there are no packages using it)