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

4.104.114.95
Last change on this file since 1a56a07 was 1a56a07, checked in by Chris Johns <chrisj@…>, on 05/14/13 at 01:08:02

Add bare/config and move the source-builder/config to it.

Rework the RTEMS build set files to point to the new location.

Move the files into devel, this follows the ports naming in
FreeBSD.

Update the macros, defaults, and options to support this.

  • 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#
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 -n %{name}-%{version}
34cd texane-stlink-%{stlink_version}
35%{?patch0:%patch0 -p1}
36cd ..
37
38%build
39  export PATH="%{_bindir}:${PATH}"
40
41  cd texane-stlink-%{stlink_version}
42
43  ./autogen.sh
44
45%if "%{_build}" != "%{_host}"
46  CFLAGS_FOR_BUILD="-g -O2 -Wall" \
47%endif
48  CPPFLAGS="-I $SB_TMPPREFIX/include/libusb-1.0" \
49  CFLAGS="$SB_OPT_FLAGS" \
50  LDFLAGS="-L $SB_TMPPREFIX/lib" \
51  ./configure \
52    --build=%{_build} --host=%{_host} \
53    --verbose \
54    --prefix=%{_prefix} --bindir=%{_bindir} \
55    --exec-prefix=%{_exec_prefix} \
56    --includedir=%{_includedir} --libdir=%{_libdir} \
57    --mandir=%{_mandir} --infodir=%{_infodir}
58
59  %{__make} %{?_smp_mflags} all
60
61  cd ..
62
63%install
64  export PATH="%{_bindir}:${PATH}"
65  rm -rf $SB_BUILD_ROOT
66
67  cd texane-stlink-%{stlink_version}
68  %{__make} DESTDIR=$SB_BUILD_ROOT install
69
70  cd ..
Note: See TracBrowser for help on using the repository browser.