mirror of
https://git.rtems.org/rtems-source-builder
synced 2024-10-09 07:15:10 +08:00
61 lines
1.3 KiB
INI
61 lines
1.3 KiB
INI
#
|
|
# LibUSB 1.xx Version 1.
|
|
#
|
|
# This configuration file configure's, make's and install's libusb.
|
|
#
|
|
|
|
%if %{release} == %{nil}
|
|
%define release 1
|
|
%endif
|
|
|
|
Summary: LibUSB v%{libusb_version} for target %{_target} on host %{_host}
|
|
Version: %{libusb_version}
|
|
Release: %{release}
|
|
URL: http://libusb.org/
|
|
BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
|
|
|
|
#
|
|
# Source
|
|
#
|
|
Source0: http://downloads.sourceforge.net/project/libusb/libusb-1.0/libusb-%{libusb_version}/libusb-%{libusb_version}.tar.bz2
|
|
VersionControl0: git clone git://git.libusb.org/libusb.git
|
|
|
|
#
|
|
# Prepare the source code.
|
|
#
|
|
%prep
|
|
%setup -q -c -n %{name}-%{version}
|
|
cd libusb-%{libusb_version}
|
|
%{?patch0:%patch0 -p1}
|
|
cd ..
|
|
|
|
%build
|
|
export PATH="%{_bindir}:${PATH}"
|
|
cd libusb-%{libusb_version}
|
|
|
|
%if "%{_build}" != "%{_host}"
|
|
CFLAGS_FOR_BUILD="-g -O2 -Wall" \
|
|
%endif
|
|
CFLAGS="$SB_OPT_FLAGS" \
|
|
./configure \
|
|
--build=%{_build} --host=%{_host} \
|
|
--verbose --disable-nls \
|
|
--without-included-gettext \
|
|
--prefix=%{_prefix} --bindir=%{_bindir} \
|
|
--exec-prefix=%{_exec_prefix} \
|
|
--includedir=%{_includedir} --libdir=%{_libdir} \
|
|
--mandir=%{_mandir} --infodir=%{_infodir}
|
|
|
|
%{__make} %{?_smp_mflags} all
|
|
|
|
cd ..
|
|
|
|
%install
|
|
export PATH="%{_bindir}:${PATH}"
|
|
rm -rf $SB_BUILD_ROOT
|
|
|
|
cd libusb-%{libusb_version}
|
|
%{__make} DESTDIR=$SB_BUILD_ROOT install
|
|
|
|
cd ..
|