forked from pool/openocd
Hi, This is to fix build for Factory. OBS-URL: https://build.opensuse.org/request/show/254101 OBS-URL: https://build.opensuse.org/package/show/hardware/openocd?expand=0&rev=12
150 lines
4.1 KiB
RPMSpec
150 lines
4.1 KiB
RPMSpec
#
|
|
# spec file for package openocd
|
|
#
|
|
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
|
#
|
|
# All modifications and additions to the file contributed by third parties
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
# upon. The license for this file, and modifications and additions to the
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
# license for the pristine package is not an Open Source License, in which
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
# published by the Open Source Initiative.
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
%if 0%{?suse_version} < 1320
|
|
%define external_jimtcl 0
|
|
%else
|
|
%define external_jimtcl 1
|
|
%endif
|
|
|
|
%define _udevdir %(pkg-config --variable udevdir udev)
|
|
Name: openocd
|
|
Version: 0.8.0
|
|
Release: 0
|
|
Summary: Debugging, in-system programming and boundary-scan testing for embedded devices
|
|
License: GPL-2.0
|
|
Group: Development/Tools/Debuggers
|
|
Url: http://openocd.sourceforge.net/
|
|
Source0: %{name}-%{version}.tar.bz2
|
|
# PATCH-FIX-OPENSUSE fix-jim_cmdproc.patch matwey.kornilov@gmail.com -- fix for jimtcl 0.75
|
|
%if %{external_jimtcl}
|
|
Patch0: fix-jim_cmdproc.patch
|
|
%endif
|
|
BuildRequires: autoconf >= 2.64
|
|
BuildRequires: automake
|
|
BuildRequires: fdupes
|
|
%if %{external_jimtcl}
|
|
BuildRequires: jimtcl-devel
|
|
%endif
|
|
BuildRequires: libftdi1-devel
|
|
BuildRequires: libhidapi-devel
|
|
BuildRequires: libtool
|
|
BuildRequires: libudev-devel
|
|
BuildRequires: libusb-compat-devel
|
|
BuildRequires: makeinfo
|
|
BuildRequires: pkg-config >= 0.23
|
|
BuildRequires: pkgconfig(libusb-1.0)
|
|
BuildRequires: pkgconfig(udev)
|
|
Requires: %{name}-data = %{version}
|
|
Requires(post): udev
|
|
Requires(postun): udev
|
|
|
|
%description
|
|
The Open On-Chip Debugger (OpenOCD) provides debugging, in-system programming
|
|
and boundary-scan testing for embedded devices. Various different boards,
|
|
targets, and interfaces are supported to ease development time.
|
|
|
|
Install OpenOCD if you are looking for an open source solution for hardware
|
|
debugging.
|
|
|
|
%package data
|
|
Summary: Hardware Scripts for OpenOCD
|
|
Group: Development/Tools/Debuggers
|
|
Requires: %{name} = %{version}
|
|
BuildArch: noarch
|
|
|
|
%description data
|
|
The Open On-Chip Debugger (OpenOCD) provides debugging, in-system programming
|
|
and boundary-scan testing for embedded devices.
|
|
This package provides hardware description files and documentation.
|
|
|
|
%prep
|
|
%setup -q
|
|
%if %{external_jimtcl}
|
|
%patch0 -p1
|
|
%endif
|
|
|
|
%build
|
|
#./bootstrap nosubmodule
|
|
%if !%{external_jimtcl}
|
|
# set this explicitely, else the configure from included jimtcl
|
|
# won't find a compiler :(
|
|
export CC=gcc
|
|
%endif
|
|
%configure \
|
|
%if %{external_jimtcl}
|
|
--disable-internal-jimtcl \
|
|
%endif
|
|
--disable-werror \
|
|
--enable-static \
|
|
--disable-shared \
|
|
--disable-doxygen-html \
|
|
--enable-sysfsgpio \
|
|
--enable-ioutil \
|
|
--enable-ftdi \
|
|
--enable-gw16012 \
|
|
--enable-buspirate \
|
|
--enable-ti-icdi \
|
|
--enable-amtjtagaccel \
|
|
--enable-arm-jtag-ew \
|
|
--enable-oocd_trace \
|
|
--enable-osbdm \
|
|
--enable-opendous \
|
|
--enable-aice \
|
|
--enable-remote-bitbang \
|
|
--enable-jlink \
|
|
--enable-rlink \
|
|
--enable-stlink \
|
|
--enable-ulink \
|
|
--enable-cmsis-dap \
|
|
--enable-vsllink
|
|
|
|
make %{?_smp_mflags} V=1
|
|
|
|
%install
|
|
%make_install
|
|
rm -f %{buildroot}%{_infodir}/dir
|
|
rm -f %{buildroot}%{_libdir}/libopenocd.*
|
|
rm -f %{buildroot}%{_datadir}/%{name}/contrib/openocd.udev
|
|
rm -rf %{buildroot}%{_datadir}/%{name}/contrib/libdcc
|
|
mkdir -p %{buildroot}%{_udevdir}/rules.d
|
|
cat contrib/99-openocd.rules | sed -e 's/GROUP="plugdev"/GROUP="users"/' > %{buildroot}%{_udevdir}/rules.d/99-openocd.rules
|
|
%fdupes %{buildroot}
|
|
|
|
%post
|
|
udevadm control --reload
|
|
%install_info --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz
|
|
|
|
%postun
|
|
udevadm control --reload
|
|
%install_info_delete --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz
|
|
|
|
%files
|
|
%defattr(-,root,root,-)
|
|
%doc contrib/libdcc README AUTHORS ChangeLog COPYING
|
|
%{_bindir}/%{name}
|
|
%{_mandir}/man1/*
|
|
%{_infodir}/%{name}.info*.gz
|
|
%{_udevdir}/rules.d/99-openocd.rules
|
|
|
|
%files data
|
|
%defattr(-,root,root,-)
|
|
%{_datadir}/%{name}
|
|
|
|
%changelog
|