SHA256
1
0
forked from pool/libusb-1_0
libusb-1_0/libusb-1_0.spec

95 lines
2.5 KiB
RPMSpec

#
# spec file for package libusb-1_0
#
# Copyright (c) 2011 SUSE LINUX Products 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/
#
# norootforbuild
Name: libusb-1_0
%define _name libusb
Url: http://www.libusb.org/
License: LGPL-2.1+
Summary: USB Library
Group: System/Libraries
Version: 1.0.8_1.0.9rc3
Release: 1
%define _version f07a4a7
Source: %{_name}-%{version}.tar.bz2
Source2: baselibs.conf
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: libtool pkg-config
%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
License: LGPL-2.1+
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
License: LGPL-2.1+
Summary: USB Library
Group: Development/Libraries/C and C++
Requires: libusb-1_0-0 = %{version} glibc-devel
%description devel
Libusb is a library that allows userspace access to USB devices.
%prep
%setup -q -n %{_name}-%{_version}
%build
mkdir m4 ; autoreconf -f -i
%configure\
--libdir=/%{_lib} \
--disable-static
make %{?jobs:-j%jobs}
%install
%makeinstall
install -d -m 0755 %{buildroot}%{_libdir}
for i in %{buildroot}/%{_lib}/*.so; do
link=$(readlink $i)
ln -s /%{_lib}/$link %{buildroot}%{_libdir}/$(basename $i)
rm $i
done
mv %{buildroot}/%{_lib}/pkgconfig %{buildroot}%{_libdir}
%{__rm} -f %{buildroot}/%{_lib}/*.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 COPYING NEWS README THANKS TODO
/%{_lib}/*.so.*
%files devel
%defattr(-,root,root)
%doc PORTING
%{_includedir}/libusb-1.0
%{_libdir}/*.so
%{_libdir}/pkgconfig/*.pc
%changelog