source: rtems-source-builder/bare/config/devel/texane-stlink-1.cfg @ 0ffee19

4.104.114.95
Last change on this file since 0ffee19 was 0ffee19, checked in by Chris Johns <chrisj@…>, on 06/15/14 at 05:40:34

sb: Add support for building RTEMS 3rd party packages.

Remove the 'opt' from various macros and shell variables.

Add pkgconfig to the checks to make it clear the check is a
pkgconfig check.

Add NTP support as the first package to be built using the RSB.

Split the RTEMS URL's out from the base bset file into a separate
file that be included by other files.

Add an RTEMS BSP configuration file to help abstract the process
of building 3rd party packages.

Clean the cross and canadian cross support up so we can cleanly support
cross and canadian cross building.

Refactor the pkgconfig support and clean up the PC file handling of
loading modules.

Add support for %{?..} to return false if a macro is %{nil}.

Add %{pkgconfig ..} support to allow better control of access RTEMS
pkgconfig files.

  • Property mode set to 100644
File size: 1.5 KB
Line 
1#
2# ST-Link Version 1.
3#
4# This configuration file configure's, make's and install's SL-Link.
5#
6
7%if %{release} == %{nil}
8%define release 1
9%endif
10
11%include %{_configdir}/base.cfg
12
13%define stlink_version 3494c11
14
15Name:      texane-stlink-%{stlink_version}-%{release}
16Summary:   ST-Link v%{stlink_version} for host %{_host}
17Version:   %{stlink_version}
18Release:   %{release}
19URL:       https://github.com/texane/stlink/
20BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
21
22#
23# Source
24#
25%source set stlink https://api.github.com/repos/texane/stlink/texane-stlink-%{stlink_version}.tar.gz
26%patch add stlink texane-stlink-3494c11-2.diff
27
28#
29# Prepare the source code.
30#
31%prep
32  %source setup stlink -q -c -n %{name}-%{version}
33  cd texane-stlink-%{stlink_version}
34  %patch setup stlink -p1
35  cd ..
36
37%build
38  export PATH="%{_bindir}:${PATH}"
39
40  cd texane-stlink-%{stlink_version}
41
42  ./autogen.sh
43
44%if "%{_build}" != "%{_host}"
45  CFLAGS_FOR_BUILD="-g -O2 -Wall" \
46%endif
47  CPPFLAGS="-I $SB_TMPPREFIX/include/libusb-1.0" \
48  CFLAGS="$SB_CFLAGS" \
49  LDFLAGS="-L $SB_TMPPREFIX/lib" \
50  ./configure \
51    --build=%{_build} --host=%{_host} \
52    --verbose \
53    --prefix=%{_prefix} --bindir=%{_bindir} \
54    --exec-prefix=%{_exec_prefix} \
55    --includedir=%{_includedir} --libdir=%{_libdir} \
56    --mandir=%{_mandir} --infodir=%{_infodir}
57
58  %{__make} %{?_smp_mflags} all
59
60  cd ..
61
62%install
63  export PATH="%{_bindir}:${PATH}"
64  rm -rf $SB_BUILD_ROOT
65
66  cd texane-stlink-%{stlink_version}
67  %{__make} DESTDIR=$SB_BUILD_ROOT install
68
69  cd ..
Note: See TracBrowser for help on using the repository browser.