File bluez-hcidump.spec of Package bluez-hcidump

#
# spec file for package bluez-hcidump
#
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2011 B1 Systems GmbH, Vohburg, 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/
#

# norootforbuild


Name:           bluez-hcidump
BuildRequires:  bluez pkgconfig
BuildRequires:  bluez-devel >= 4.70
Url:            http://www.bluez.org
Version:        2.0
Release:        6
Summary:        HCI Dumper for Debugging Bluetooth Connections
License:        GPLv2+
PreReq:         %insserv_prereq
Group:          Development/Tools/Debuggers
AutoReqProv:    on
Source:         http://www.kernel.org/pub/linux/bluetooth/bluez-hcidump-2.0.tar.bz2
Patch:          0001-Fix-compilation-against-latest-BlueZ.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
# not sure if we really need a specific bluez version, or if we need bluez at all
# maybe libbluetooth is enough
%requires_ge    bluez

%description
An HCI dumper for debugging Bluetooth connections for BlueZ.

Authors:
--------
        Marcel Holtmann <marcel@holtmann.org>
        Maxim Krasnyansky <maxk@qualcomm.com>
        Ricky Yuen <ryuen@qualcomm.com>
        Wayne Lee <waynelee@qualcomm.com>
        Takashi Sasai <sasai@sm.sony.co.jp>

%prep
%setup
%if 0%{?suse_version} > 1140
# actually it's 'bluez-devel > 4.90'
%patch -p1
%endif

%build
CFLAGS="$RPM_OPT_FLAGS" ./configure \
	--prefix=/usr \
	--mandir=%{_mandir} \
	--sysconfdir=%{_sysconfdir} \
	--libdir=%{_libdir}
make %{?_smp_mflags} V=1

%install
make DESTDIR=$RPM_BUILD_ROOT mandir=%{_mandir} libdir=%{_libdir} install
mkdir -p $RPM_BUILD_ROOT/%{_sbindir}
cp src/bpasniff $RPM_BUILD_ROOT/%{_sbindir}/bpasniff
cp src/csrsniff $RPM_BUILD_ROOT/%{_sbindir}/csrsniff

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-, root, root)
%{_sbindir}/hcidump
%{_sbindir}/bpasniff
%{_sbindir}/csrsniff
%{_mandir}/man8/hcidump.8.gz
%doc AUTHORS COPYING ChangeLog

%changelog
openSUSE Build Service is sponsored by