source: rtems-source-builder/source-builder/config/texane-stlink-1.cfg @ ab18d1a

4.104.114.95
Last change on this file since ab18d1a was ab18d1a, checked in by Chris Johns <chrisj@…>, on 11/09/12 at 04:39:39

Version 2 of the patch has --pipe support.

  • Property mode set to 100644
File size: 1.6 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#
25Source0: https://api.github.com/repos/texane/stlink/texane-stlink-%{stlink_version}.tar.gz
26VersionControl0: git clone https://github.com/texane/stlink.git
27Patch0: texane-stlink-3494c11-2.diff
28
29#
30# Prepare the source code.
31#
32%prep
33%setup -q -c -T -n %{name}-%{version}
34%setup -q -D -T -n %{name}-%{version} -a0
35cd texane-stlink-%{stlink_version}
36%{?patch0:%patch0 -p1}
37cd ..
38
39%build
40  export PATH="%{_bindir}:${PATH}"
41
42  cd texane-stlink-%{stlink_version}
43
44  ./autogen.sh
45
46%if "%{_build}" != "%{_host}"
47  CFLAGS_FOR_BUILD="-g -O2 -Wall" \
48%endif
49  CPPFLAGS="-I $SB_TMPPREFIX/include/libusb-1.0" \
50  CFLAGS="$SB_OPT_FLAGS" \
51  LDFLAGS="-L $SB_TMPPREFIX/lib" \
52  ./configure \
53    --build=%{_build} --host=%{_host} \
54    --verbose \
55    --prefix=%{_prefix} --bindir=%{_bindir} \
56    --exec-prefix=%{_exec_prefix} \
57    --includedir=%{_includedir} --libdir=%{_libdir} \
58    --mandir=%{_mandir} --infodir=%{_infodir}
59
60  %{__make} %{?_smp_mflags} all
61
62  cd ..
63
64%install
65  export PATH="%{_bindir}:${PATH}"
66  rm -rf $TB_BUILD_ROOT
67
68  cd texane-stlink-%{stlink_version}
69  %{__make} DESTDIR=$TB_BUILD_ROOT install
70
71  cd ..
Note: See TracBrowser for help on using the repository browser.