libusb-1_0/libusb-1_0.spec
2024-02-29 15:58:38 +08:00

75 lines
1.8 KiB
RPMSpec

#
# spec file for package libusb-1_0
#
# Copyright (c) 2022-2023 ZhuningOS
#
%define _name libusb
%define debug_package_requires libusb-1_0-0 = %{version}-%{release}
Name: libusb-1_0
Version: 1.0.24
Release: 150400.3.3.1
Summary: USB Library
License: LGPL-2.1-or-later
Group: System/Hardware
URL: http://libusb.info/
Source: https://github.com/libusb/libusb/releases/download/v%{version}/libusb-%{version}.tar.bz2
Source1: baselibs.conf
# PATCH-FIX-UPSTREAM
Patch1: 0001-fix-descriptor-parsing.patch
# PATCH-FIX-UPSTREAM
Patch2: 0002-gracefully-handle-buggy-config0-devices.patch
BuildRequires: dos2unix
BuildRequires: pkgconfig
BuildRequires: pkgconfig(libudev)
%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
%autosetup -p1 -n %{_name}-%{version}
dos2unix NEWS
%build
%configure \
--with-pic \
--disable-silent-rules \
--disable-static
make %{?_smp_mflags}
%install
%make_install
find %{buildroot} -type f -name "*.la" -delete -print
%post -n libusb-1_0-0 -p /sbin/ldconfig
%postun -n libusb-1_0-0 -p /sbin/ldconfig
%files -n libusb-1_0-0
%license COPYING
%doc AUTHORS ChangeLog NEWS README TODO
%{_libdir}/*.so.*
%files devel
%doc PORTING
%{_includedir}/libusb-1.0
%{_libdir}/*.so
%{_libdir}/pkgconfig/*.pc
%changelog