File dfu-util.spec of Package dfu-util

#
# spec file for package dfu-util
#
# Copyright (c) 2016 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:           dfu-util
Version:        0.9
Release:        0
Summary:        DFU firmware upgrade utility
License:        GPL-2.0
Group:          Hardware/Mobile
Url:            http://dfu-util.sourceforge.net
# official site, but down for quite some time
#Url:		    http://dfu-util.gnumonks.org
Source:         http://dfu-util.sourceforge.net/releases/%{name}-%{version}.tar.gz
Patch0:         0001-Allow-building-against-older-libusb-without-bus-port.patch
BuildRequires:  libusb-devel
%if 0%{?fedora_version} || 0%{?centos_version} || 0%{?mdkversion}
BuildRequires:  libusb1-devel
%endif
%if 0%{?suse_version}
BuildRequires:  pkg-config
%endif
BuildRequires:  autoconf
BuildRequires:  automake
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
This is a host side implementation of the DFU 1.0 and DFU 1.1 specifications of
the USB forum. DFU is intended to download and upload firmware to/from devices
connected over USB. It ranges from small devices like micro-controller boards 
to mobile phones.

%prep
%setup -q
%patch0 -p 1
./autogen.sh

%build
%configure
make %{?_smp_mflags}

%install
make DESTDIR=%{buildroot} install

%files
%defattr(-,root,root)
%{_bindir}/*

%doc %_mandir/man1/%{name}.1.*

%changelog