File vusb-analyzer.spec of Package vusb-analyzer

#
# spec file for package vusb-analyzer (Version 1.1)
#
# Copyright (c) 2010 SUSE LINUX Products 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/
#

# norootforbuild


Name:           vusb-analyzer
Version:        1.1
Release:        2
License:        MIT
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Group:          Development/Tools/Other
Source:         %{name}-%{version}.tar.gz
Summary:        A tool for viewing USB trace files from usbmon and other usb dump formats

%if 0%{suse_version} >= 1120
BuildArch:      noarch
%endif

Url:            http://vusb-analyzer.sourceforge.net
BuildRequires:  python-gtk
Requires:       python-gtk
%{py_requires}

%{!?python_sitelib:  %global python_sitelib  %(%__python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}                               
%{!?python_sitearch: %global python_sitearch %(%__python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}                              

%if 0%suse_version >= 1120
%define py_inst_dir %python_sitelib
%else
%define py_inst_dir %python_sitearch
%endif 

%description
The Virtual USB Analyzer is a free and open source tool for visualizing
logs of USB packets, from hardware or software USB sniffer tools.  The
Virtual USB Analyzer is not itself a USB sniffer tool. It is just a user
interface for visualizing logs.

Authors:
--------
    Micah Dowty <micah@vmware.com>

%prep
%setup -q -c %{name}-%{version}

%build

%install
cd vusb-analyzer-1.1
install -d $RPM_BUILD_ROOT/%{_bindir}
install -m 0755 "vusb-analyzer" $RPM_BUILD_ROOT/%{_bindir}
install -d $RPM_BUILD_ROOT/%{py_inst_dir}
cp -a VUsbTools $RPM_BUILD_ROOT/%{py_inst_dir}

%clean
rm -rf "$RPM_BUILD_ROOT"

%files
%defattr(-,root,root)
%{_bindir}/vusb-analyzer
%{py_inst_dir}/VUsbTools

%changelog
openSUSE Build Service is sponsored by