diff options
Diffstat (limited to 'bare/config/devel/texane-stlink-1.cfg')
-rw-r--r-- | bare/config/devel/texane-stlink-1.cfg | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/bare/config/devel/texane-stlink-1.cfg b/bare/config/devel/texane-stlink-1.cfg new file mode 100644 index 0000000..9a5d075 --- /dev/null +++ b/bare/config/devel/texane-stlink-1.cfg @@ -0,0 +1,70 @@ +# +# ST-Link Version 1. +# +# This configuration file configure's, make's and install's SL-Link. +# + +%if %{release} == %{nil} +%define release 1 +%endif + +%include %{_configdir}/base.cfg + +%define stlink_version 3494c11 + +Name: texane-stlink-%{stlink_version}-%{release} +Summary: ST-Link v%{stlink_version} for host %{_host} +Version: %{stlink_version} +Release: %{release} +URL: https://github.com/texane/stlink/ +BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n) + +# +# Source +# +Source0: https://api.github.com/repos/texane/stlink/texane-stlink-%{stlink_version}.tar.gz +VersionControl0: git clone https://github.com/texane/stlink.git +Patch0: texane-stlink-3494c11-2.diff + +# +# Prepare the source code. +# +%prep +%setup -q -c -n %{name}-%{version} +cd texane-stlink-%{stlink_version} +%{?patch0:%patch0 -p1} +cd .. + +%build + export PATH="%{_bindir}:${PATH}" + + cd texane-stlink-%{stlink_version} + + ./autogen.sh + +%if "%{_build}" != "%{_host}" + CFLAGS_FOR_BUILD="-g -O2 -Wall" \ +%endif + CPPFLAGS="-I $SB_TMPPREFIX/include/libusb-1.0" \ + CFLAGS="$SB_OPT_FLAGS" \ + LDFLAGS="-L $SB_TMPPREFIX/lib" \ + ./configure \ + --build=%{_build} --host=%{_host} \ + --verbose \ + --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 texane-stlink-%{stlink_version} + %{__make} DESTDIR=$SB_BUILD_ROOT install + + cd .. |