File lttng-viewer.spec of Package lttng-viewer

# spec file for "lttng-viewer"
# Copyright (c) 2014 silvio
# 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

Name:           lttng-viewer
Version:        2.2.0
Release:        1
License:        Eclipse Public License v1.0
Summary:        Highly efficient tracing tools for Linux
Group:          Development/Libraries/Java
Source0:        %{name}.tar.xz
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  xz
BuildRequires:  java-devel
BuildRequires:  eclipse-linuxtools-kit >= 1
BuildRequires:  mozilla-nss
BuildRequires:  fdupes
ExclusiveArch:  x86_64
Provides:       mvn(org.eclipse.linuxtools.lttng:linuxtools-lttng-parent) == 2.2.0
Requires:       java

LTTng is an Eclipse-based trace viewer and analyzer for many trace types, including LTTng kernel and userspace traces. It is part of the Linux Tools project at Eclipse. This package contains the stand-alone version.

%setup -q -c -n src/lttng-viewer
cp -f %{SOURCE1} .
cp -Rf %{_datadir}/gjp/eclipse-linuxtools-kit ../../kit

cd ../../
sh src/lttng-viewer/

mkdir -p $RPM_BUILD_ROOT/%{_bindir}
mkdir -p $RPM_BUILD_ROOT/%{_libdir}
cp -a org.eclipse.linuxtools-2.2.0/lttng/org.eclipse.linuxtools.tracing.rcp.product/target/products/org.eclipse.linuxtools.tracing.rcp/linux/gtk/x86_64/traceviewer $RPM_BUILD_ROOT/%{_libdir}/%{name}
%fdupes -s $RPM_BUILD_ROOT/%{_libdir}/%{name}
ln -s %{_libdir}/%{name}/traceViewer $RPM_BUILD_ROOT/%{_bindir}/%{name} 

%defattr(-, root, root)
%attr(755,root,root) %dir %{_libdir}/%{name}
%attr(755,root,root) %dir %{_libdir}/%{name}/readme
%attr(755,root,root) %dir %{_libdir}/%{name}/p2
%attr(755,root,root) %dir %{_libdir}/%{name}/configuration
%attr(755,root,root) %dir %{_libdir}/%{name}/plugins
%attr(755,root,root) %dir %{_libdir}/%{name}/features
%doc %{_libdir}/%{name}/readme/readme_eclipse.html
%doc %{_libdir}/%{name}/notice.html
%doc %{_libdir}/%{name}/epl-v10.html