summaryrefslogtreecommitdiffstats
path: root/config/libusb-1-1.cfg
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2012-10-31 12:09:38 +1100
committerChris Johns <chrisj@rtems.org>2012-10-31 12:09:38 +1100
commit52604491d35d6d6df76f0cec5607455abf2b39b8 (patch)
tree04590d7d213db26aa24e83623e6789c935355c61 /config/libusb-1-1.cfg
parentCreate the sources path if not present and the user has forced. (diff)
downloadrtems-source-builder-52604491d35d6d6df76f0cec5607455abf2b39b8.tar.bz2
Support modules other than bintuls and gcc.
Added support to build autoconf and automake plus other packages such as libusb and the stlink project. This includes support to build a specific github version downloaded from github.
Diffstat (limited to '')
-rw-r--r--config/libusb-1-1.cfg60
1 files changed, 60 insertions, 0 deletions
diff --git a/config/libusb-1-1.cfg b/config/libusb-1-1.cfg
new file mode 100644
index 0000000..cf61b0c
--- /dev/null
+++ b/config/libusb-1-1.cfg
@@ -0,0 +1,60 @@
+#
+# LibUSB 1.xx Version 1.
+#
+# This configuration file configure's, make's and install's libusb.
+#
+
+%ifn %{defined release}
+%error No 'release' defined
+%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
+
+#
+# Prepare the source code.
+#
+%prep
+%setup -q -c -T -n %{name}-%{version}
+%setup -q -D -T -n %{name}-%{version} -a0
+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="$TB_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 $TB_BUILD_ROOT
+
+ cd libusb-%{libusb_version}
+ %{__make} DESTDIR=$TB_BUILD_ROOT install
+
+ cd ..