You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
190 lines
6.3 KiB
190 lines
6.3 KiB
## START: Set by rpmautospec
|
|
## (rpmautospec version 0.6.5)
|
|
## RPMAUTOSPEC: autorelease, autochangelog
|
|
%define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
|
|
release_number = 4;
|
|
base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}"));
|
|
print(release_number + base_release_number - 1);
|
|
}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}}
|
|
## END: Set by rpmautospec
|
|
|
|
Summary: Library for accessing USB devices
|
|
Name: libusb1
|
|
Version: 1.0.27
|
|
Release: %autorelease
|
|
Source0: https://github.com/libusb/libusb/releases/download/v%{version}/libusb-%{version}.tar.bz2
|
|
License: LGPL-2.1-or-later
|
|
URL: http://libusb.info
|
|
BuildRequires: systemd-devel doxygen libtool
|
|
BuildRequires: umockdev-devel
|
|
BuildRequires: make
|
|
BuildRequires: gcc
|
|
# libusbx was removed in F34
|
|
Provides: libusbx = %{version}-%{release}
|
|
Obsoletes: libusbx < %{version}-%{release}
|
|
|
|
%description
|
|
This package provides a way for applications to access USB devices.
|
|
|
|
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}.
|
|
|
|
|
|
%package devel-doc
|
|
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 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}
|
|
|
|
%description tests-examples
|
|
This package contains tests and examples for %{name}.
|
|
|
|
|
|
%prep
|
|
%autosetup -p1 -n libusb-%{version}
|
|
chmod -x examples/*.c
|
|
mkdir -p m4
|
|
sed -i '/AM_LDFLAGS = -static/d' tests/Makefile.am
|
|
|
|
|
|
%build
|
|
%configure --disable-static --enable-examples-build
|
|
%{make_build}
|
|
pushd doc
|
|
make docs
|
|
popd
|
|
pushd tests
|
|
make
|
|
popd
|
|
|
|
|
|
%install
|
|
%{make_install}
|
|
mkdir -p $RPM_BUILD_ROOT%{_bindir}
|
|
install -m 755 tests/.libs/init_context $RPM_BUILD_ROOT%{_bindir}/libusb-test-init_context
|
|
install -m 755 tests/.libs/set_option $RPM_BUILD_ROOT%{_bindir}/libusb-test-set_option
|
|
install -m 755 tests/.libs/stress $RPM_BUILD_ROOT%{_bindir}/libusb-test-stress
|
|
install -m 755 tests/.libs/stress_mt $RPM_BUILD_ROOT%{_bindir}/libusb-test-stress_mt
|
|
install -m 755 tests/.libs/umockdev $RPM_BUILD_ROOT%{_bindir}/libusb-test-umockdev
|
|
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
|
|
|
|
|
|
%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-init_context
|
|
LD_LIBRARY_PATH=libusb/.libs $RPM_BUILD_ROOT%{_bindir}/libusb-test-set_option
|
|
LD_LIBRARY_PATH=libusb/.libs $RPM_BUILD_ROOT%{_bindir}/libusb-test-stress
|
|
LD_LIBRARY_PATH=libusb/.libs $RPM_BUILD_ROOT%{_bindir}/libusb-test-umockdev
|
|
LD_LIBRARY_PATH=libusb/.libs $RPM_BUILD_ROOT%{_bindir}/libusb-test-libusb
|
|
LD_LIBRARY_PATH=libusb/.libs $RPM_BUILD_ROOT%{_bindir}/libusb-example-listdevs
|
|
|
|
|
|
%ldconfig_scriptlets
|
|
|
|
|
|
%files
|
|
%license COPYING
|
|
%doc AUTHORS README ChangeLog
|
|
%{_libdir}/*.so.*
|
|
|
|
%files devel
|
|
%{_includedir}/libusb-1.0
|
|
%{_libdir}/*.so
|
|
%{_libdir}/pkgconfig/libusb-1.0.pc
|
|
|
|
%files devel-doc
|
|
%doc doc/api-1.0 examples/*.c
|
|
|
|
%files tests-examples
|
|
%{_bindir}/libusb-example-fxload
|
|
%{_bindir}/libusb-example-listdevs
|
|
%{_bindir}/libusb-example-xusb
|
|
%{_bindir}/libusb-test-init_context
|
|
%{_bindir}/libusb-test-set_option
|
|
%{_bindir}/libusb-test-stress
|
|
%{_bindir}/libusb-test-stress_mt
|
|
%{_bindir}/libusb-test-umockdev
|
|
%{_bindir}/libusb-test-libusb
|
|
|
|
|
|
%changelog
|
|
## START: Generated by rpmautospec
|
|
* Tue Oct 29 2024 Troy Dawson <tdawson@redhat.com> - 1.0.27-4
|
|
- Bump release for October 2024 mass rebuild:
|
|
|
|
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 1.0.27-3
|
|
- Bump release for June 2024 mass rebuild
|
|
|
|
* Fri May 10 2024 Kate Hsuan <hpa@redhat.com> - 1.0.27-2
|
|
- gating: Change the gating settings for RHEL-10
|
|
|
|
* Mon May 06 2024 Kate Hsuan <hpa@redhat.com> - 1.0.27-1
|
|
- RHEL-35520 Update to release 1.0.27
|
|
|
|
* Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.26-6
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
|
|
|
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.26-5
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
|
|
|
* Tue Sep 19 2023 Miroslav Suchý <msuchy@redhat.com> - 1.0.26-4
|
|
- Migrate to SPDX license
|
|
|
|
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.26-3
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
|
|
|
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.26-2
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
|
|
|
* Fri Sep 30 2022 Kate Hsuan <hpa@redhat.com> 1.0.26-1
|
|
- Update to 1.0.26
|
|
|
|
* Wed Feb 02 2022 Benjamin Berg <bberg@redhat.com> 1.0.25-1
|
|
- Update to 1.0.25
|
|
|
|
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.24-5
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
|
|
|
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.24-4
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
|
|
|
* Tue Jan 19 18:47:55 CET 2021 Benjamin Berg <bberg@redhat.com> - 1.0.24-3
|
|
- New libusb1 package replacing libusbx
|
|
Resolves: #1918269
|
|
|
|
## END: Generated by rpmautospec
|