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 http://bugs.opensuse.org/
#

Name:           lttng-viewer
Version:        2.2.0
Release:        1
License:        Eclipse Public License v1.0
Summary:        Highly efficient tracing tools for Linux
Url:            https://lttng.org/
Group:          Development/Libraries/Java
Source0:        %{name}.tar.xz
Source1:        build.sh
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

%description
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.

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

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

%install
export NO_BRP_CHECK_BYTECODE_VERSION=true
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} 

%files
%defattr(-, root, root)
%{_bindir}/%{name}
%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
%{_libdir}/%{name}/p2/*
%{_libdir}/%{name}/configuration/*
%{_libdir}/%{name}/plugins/*
%{_libdir}/%{name}/features/*
%{_libdir}/%{name}/traceViewer
%{_libdir}/%{name}/traceViewer.ini
%{_libdir}/%{name}/.eclipseproduct
%{_libdir}/%{name}/artifacts.xml
%{_libdir}/%{name}/icon.xpm

%changelog