File stlink.spec of Package stlink

#
# spec file for package stlink
#
# Copyright (c) 2015 SUSE LINUX 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/
#


Name:           stlink
Version:        1.1.0
Release:        0
Summary:        STM32 discovery line linux programmer
License:        BSD-3-Clause
Group:          Development/Tools/Debuggers
Url:            https://github.com/texane/stlink
Source0:        https://github.com/texane/stlink/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  gtk3-devel
BuildRequires:  pkg-config
BuildRequires:  udev
BuildRequires:  pkgconfig(libusb-1.0)
Requires:       udev
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
STLINK v1/v2 JTAG/SWD debugging/flashing tool for STM32 microcontrollers.

%package        gui
Summary:        GUI for STM32 discovery line linux programmer
Group:          Development/Tools/Debuggers
Requires:       %{name} = %{version}

%description    gui
STLINK v1/v2 JTAG/SWD debugging/flashing tool for STM32 microcontrollers.

%prep
%setup -q

%build
autoreconf -fi
%configure \
    --with-gtk
make %{?_smp_mflags}

%install
%make_install
install -d %{buildroot}/%{_udevrulesdir}/
install -D -m 0644 49-stlink*.rules %{buildroot}/%{_udevrulesdir}/

%files
%defattr(-,root,root)
%doc COPYING README
%{_bindir}/st-*
%{_udevrulesdir}/49-stlink*

%files gui
%defattr(-,root,root)
%{_bindir}/stlink-gui
%{_datadir}/stlink/

%changelog
openSUSE Build Service is sponsored by