%define name	usbutils
%define version	008
%define release	1%{?_dist_release}

Summary:	USB related utilities.
Summary(ja): 	USB 用ユーティリティ
Name:		%{name}
Version:	%{version}
Release: 	%{release}
Source0:	https://www.kernel.org/pub/linux/utils/usb/usbutils/%{name}-%{version}.tar.xz
Patch1:		usbutils-008-hwdata.patch
License:	GPLv2+
Group:		Applications/System
URL:		http://www.linux-usb.org/

Requires:	hwdata

BuildRequires:	libtool
BuildRequires:	libusb1-devel
BuildRequires:	eudev-libudev-devel
BuildRequires:	autoconf

BuildRoot:	%{_tmppath}/%{name}-%{version}-root


%description
The usbutils package contains utilities for inspecting devices 
connected to the USB. 

%description -l ja
このパッケージには USB に接続された各種デバイスの状態を見る為の
ユーティリティが収められています．


%prep

%setup -q
%patch1 -p1 -b .hwdata

%build
autoreconf -if
%configure --sbindir=%{_sbindir} --disable-usbids
make %{?_smp_mflags}


%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root,-)
%{_mandir}/*/*
%{_bindir}/*
%{_datadir}/pkgconfig/usbutils.pc
%doc AUTHORS COPYING ChangeLog NEWS README

%changelog
* Mon May 04 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 008-1
- update to 008
- update Patch1 (usbutils-008-hwdata.patch)
- add BuildRequires: eudev-libudev-devel

* Sun Aug 24 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 007-1
- update to 007
- add BuildRequires: libusb1-devel
- update Patch1 (usbutils-006-hwdata.patch) from fedora

* Wed Oct 06 2010 Shu KONNO <owa@bg.wakwak.com> 0.86-2
- rebuilt with rpm-4.8.1 for pkg-config

* Wed Oct 06 2010 Shu KONNO <owa@bg.wakwak.com> 0.86-2
- rebuilt with rpm-4.8.1 for pkg-config

* Sun Oct 11 2009 Toshiharu Kudoh <toshi.kd2@gmail.com> 0.86-1
- new upstream release
- added %configure --sbindir=%{_sbindir}

* Thu Jul 23 2009 Toshiharu Kudoh <toshi.kd2@gmail.com> 0.84-1vl5
- new upstream release
- changed %files
- added Patch1
- added autoreconf before %build

* Sun Jun 14 2009 Toshiharu Kudoh <toshi.kd2@gmail.com> 0.82-1vl5
- new upstream release
- dropt Patch1
- changed License: GPLv2+
- added BuildRequires:	libtool

* Mon Oct 13 2008 Shu KONNO <owa@bg.wakwak.com> 0.72-1vl5
- applied new versioning policy, spec in utf-8

* Sat Jul 14 2007 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 0.72-0vl1
- initial build for Vine Linux
