File stlink.spec of Package stlink+git

Name:           stlink
Version:        master
Release:        0
License:        BSD-3-Clause
Summary:        STLINK v1/v2 JTAG/SWD debugging/flashing tool
Url:            https://github.com/texane/stlink
Group:          Development/Tools/Debuggers
Source:         stlink-master.zip
BuildRequires:  libusb-devel
BuildRequires:  autoconf automake
BuildRequires:  pkg-config
BuildRequires:  unzip
Requires:       udev
Requires(post): udev
Requires(postun): udev
BuildRoot:      %{_tmppath}/%{name}-master-build

%define udev_rules_dir /usr/lib/udev/rules.d

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

%prep
%setup -q

%build
./autogen.sh
%configure
make %{?_smp_mflags}

%install
%make_install
mkdir -p %{buildroot}/%{udev_rules_dir}
cp 49-stlink* %{buildroot}/%{udev_rules_dir}

%post
udevadm control --reload

%postun
udevadm control --reload

%files
%defattr(-,root,root)
%{_bindir}/st-*
%{udev_rules_dir}/49-stlink*

%changelog
* Sun Mar 16 2014 Volker Krause <vkrause@kde.org> 1.0.0+git20140316 
  Initial stlink package based on today's Git.