Blob Blame History Raw
%{?scl:%scl_package eclipse-linuxtools}
%{!?scl:%global pkg_name %{name}}
%{!?maven_scl:%global maven_scl_prefix   %{nil}}

%global eclipse_dropin   %{_datadir}/eclipse/dropins
%global linuxtools_tag   3.1.0b

Name:           %{?scl_prefix}eclipse-linuxtools
Version:        3.1.0
Release:        0.1.git20140917%{?dist}
Summary:        Linux specific Eclipse plugins

License:        EPL
URL:            http://eclipse.org/linuxtools/
Source0:        http://git.eclipse.org/c/linuxtools/org.eclipse.linuxtools.git/snapshot/org.eclipse.linuxtools-%{linuxtools_tag}.tar.bz2
Patch0:         disable-libhover-lttng.patch
Patch1:         disable-ptp.patch
Patch2:         disable-rdt.patch
Patch4:         add-base-rhel-tools-path.patch
Patch5:         remove-target.patch

BuildRequires: tycho >= 0.20.0
BuildRequires: tycho-extras  
BuildRequires: %{?scl_prefix}eclipse-cdt
BuildRequires: %{?scl_prefix}eclipse-jdt
BuildRequires: %{?scl_prefix}swt-chart
BuildRequires: %{?scl_prefix}eclipse-remote
BuildRequires: %{?scl_prefix}eclipse-license
BuildRequires: %{maven_scl_prefix}maven-clean-plugin
BuildRequires: %{?scl_prefix}eclipse-swtbot
BuildRequires: %{?scl_prefix}eclipse-gef
BuildRequires: %{?scl_prefix}eclipse-remote
BuildRequires: %{maven_scl_prefix}exec-maven-plugin

Requires: %{?scl_prefix}swt-chart

BuildArch: noarch
Obsoletes: %{?scl_prefix}eclipse-linuxprofilingframework < 2.0.0

%description
The Linux Tools project is a two-faceted project. Firstly, it develops tools 
and frameworks for writing tools for Linux developers. Secondly, it provides
a place for Linux distributions to collaboratively overcome issues surrounding 
distribution packaging of Eclipse technology. The project will produce both
best practices and tools related to packaging. 

%package -n %{?scl_prefix}eclipse-changelog

Summary:        Eclipse ChangeLog plug-in
Epoch:          2

%description -n %{?scl_prefix}eclipse-changelog
The Eclipse ChangeLog package contains Eclipse features and plugins that are
useful for ChangeLog maintenance within the Eclipse IDE.  It includes
fragments for parsing C, C++, and Java source files to create more detailed
entries containing function or method names.

%package -n %{?scl_prefix}eclipse-rpm-editor

Summary:  RPM Spec file editor for Eclipse
Requires: rpmlint >= 0.81
Requires: rpmdevtools
Obsoletes: %{?scl_prefix}eclipse-rpmstubby < 3.0.0
Provides: %{?scl_prefix}eclipse-rpmstubby = %{version}-%{release}

%description -n %{?scl_prefix}eclipse-rpm-editor
The Eclipse Spec file Editor package contains Eclipse plugins that are
useful for maintenance of RPM spec files within the Eclipse IDE.

%package -n %{?scl_prefix}eclipse-manpage

Summary:  Man page viewer

%description -n %{?scl_prefix}eclipse-manpage
Plugin providing common interface for displaying a man page in a view or 
fetching its content for embedded display purposes (e.g hover help).

%package -n %{?scl_prefix}eclipse-gcov

Summary:  GCov Integration

%description -n %{?scl_prefix}eclipse-gcov
Functionality to integrate GCov with the Eclipse workbench.

%package -n %{?scl_prefix}eclipse-gprof

Summary:  GProf Integration

%description -n %{?scl_prefix}eclipse-gprof
Functionality to integrate GProf with the Eclipse workbench.

%package -n %{?scl_prefix}eclipse-oprofile

Summary:  Eclipse plugin for OProfile integration
Requires: %{?scl_prefix}oprofile >= 0.9.3

%description -n %{?scl_prefix}eclipse-oprofile
Eclipse plugins to integrate OProfile's profiling capabilities with the CDT.

%package -n %{?scl_prefix}eclipse-perf

Summary:  Eclipse plugin for Perf integration
Requires: perf

%description -n %{?scl_prefix}eclipse-perf
Eclipse plugins to integrate Perf's profiling capabilities with the CDT.

%package -n %{?scl_prefix}eclipse-valgrind

Summary:   Valgrind Tools Integration for Eclipse
Requires:  valgrind

%description -n %{?scl_prefix}eclipse-valgrind
This package for Eclipse allows users to launch their C/C++ Development Tools
projects using the Valgrind tool suite and presents the results in the IDE. 

%package -n %{?scl_prefix}eclipse-systemtap

Summary:   Systemtap Tools Integration for Eclipse
Requires:  systemtap
Obsoletes: %{?scl_prefix}eclipse-callgraph < 2.0.0
Obsoletes: %{?scl_prefix}eclipse-systemtapgui < 2.0.0

%description -n %{?scl_prefix}eclipse-systemtap
Integrate Systemtap's profiling and tracing capabilities with the CDT.

%package -n %{?scl_prefix}eclipse-linuxtools-tests

Summary:  Linux Tools Project Test Bundles
Requires: %{?scl_prefix}eclipse-changelog
Requires: %{?scl_prefix}eclipse-rpmstubby
Requires: %{?scl_prefix}eclipse-rpm-editor
Requires: %{?scl_prefix}eclipse-gcov
Requires: %{?scl_prefix}eclipse-gprof
Requires: %{?scl_prefix}eclipse-oprofile
Requires: %{?scl_prefix}eclipse-perf
Requires: %{?scl_prefix}eclipse-valgrind
Requires: %{?scl_prefix}eclipse-systemtap
Requires: %{?scl_prefix}eclipse-swtbot
Requires: %{?scl_prefix}eclipse-linuxtools
Requires: %{?scl_prefix}eclipse-cdt

%description -n  %{?scl_prefix}eclipse-linuxtools-tests
All test bundles for the Linux Tools project.


%prep
%setup -q -n org.eclipse.linuxtools-%{linuxtools_tag}

%patch0
%patch1
%patch2 -p1
%patch4
%patch5
%pom_remove_plugin org.jacoco:jacoco-maven-plugin
%pom_disable_module lttng
%pom_disable_module libhover

# Do not package swt-chart
sed -i '/org.swtchart/,/<\/iu>/ d' releng/org.eclipse.linuxtools.releng-site/category.xml

#remove tests that fail to compile
rm -fr profiling/org.eclipse.linuxtools.profiling.tests/src/org/eclipse/linuxtools/profiling/tests/AbstractRemoteTest.java
rm -fr perf/org.eclipse.linuxtools.perf.tests/src/org/eclipse/linuxtools/internal/perf/tests/LaunchRemoteTest.java

%build
export MAVEN_OPTS="-XX:CompileCommand=exclude,org/eclipse/tycho/core/osgitools/EquinoxResolver,newState ${MAVEN_OPTS}"
scl enable %{scl} - <<"EOF"
xmvn -o clean verify -Dmaven.test.skip=true -DskipTychoVersionCheck=true
EOF

pushd releng/org.eclipse.linuxtools.releng-site/target/repository/features
for f in `ls -1 . | grep jar$`; do
    unzip $f -d ${f/.jar//};
    rm -fr $f
done
popd

%install
install -d -m 755 %{buildroot}%{eclipse_dropin}

for s in changelog rpmstubby perf valgrind oprofile man rpm gcov gprof systemtap linuxtools; do
mkdir -p %{buildroot}%{eclipse_dropin}/$s/{plugins,features}
done

mkdir -p %{buildroot}%{_javadir}/linuxtools-tests/plugins

pushd releng/org.eclipse.linuxtools.releng-site/target/repository
#changelog
mv ./plugins/*changelog* %{buildroot}%{eclipse_dropin}/changelog/plugins
mv ./features/*changelog* %{buildroot}%{eclipse_dropin}/changelog/features

#rpm
mv ./plugins/*rpm* %{buildroot}%{eclipse_dropin}/rpm/plugins
mv ./features/*rpm* %{buildroot}%{eclipse_dropin}/rpm/features

#man
mv ./plugins/*man* %{buildroot}%{eclipse_dropin}/man/plugins
mv ./features/*man* %{buildroot}%{eclipse_dropin}/man/features

#gcov
mv ./plugins/*gcov* %{buildroot}%{eclipse_dropin}/gcov/plugins
mv ./features/*gcov* %{buildroot}%{eclipse_dropin}/gcov/features

#gprof
mv ./plugins/*gprof* %{buildroot}%{eclipse_dropin}/gprof/plugins
mv ./features/*gprof* %{buildroot}%{eclipse_dropin}/gprof/features

#perf
mv ./plugins/*perf* %{buildroot}%{eclipse_dropin}/perf/plugins
mv ./features/*perf* %{buildroot}%{eclipse_dropin}/perf/features

#valgrind
mv ./plugins/*valgrind* %{buildroot}%{eclipse_dropin}/valgrind/plugins
mv ./features/*valgrind* %{buildroot}%{eclipse_dropin}/valgrind/features

#oprofile
mv ./plugins/*oprofile* %{buildroot}%{eclipse_dropin}/oprofile/plugins
mv ./features/*oprofile* %{buildroot}%{eclipse_dropin}/oprofile/features

#systemtap
mv ./plugins/*systemtap* %{buildroot}%{eclipse_dropin}/systemtap/plugins
mv ./features/*systemtap* %{buildroot}%{eclipse_dropin}/systemtap/features
mv ./plugins/*callgraph* %{buildroot}%{eclipse_dropin}/systemtap/plugins
mv ./features/*callgraph* %{buildroot}%{eclipse_dropin}/systemtap/features

#linuxtools
mv ./plugins/* %{buildroot}%{eclipse_dropin}/linuxtools/plugins
mv ./features/* %{buildroot}%{eclipse_dropin}/linuxtools/features
# Use system swt-chart
ln -s %{_javadir}/swt-chart.jar %{buildroot}%{eclipse_dropin}/linuxtools/plugins

popd

#tests
# We need grep to return non-zero status to skip all non eclipse-test-plugins
set +e
for pom in `find . -name pom.xml`; do
 grep -q '<packaging>eclipse-test-plugin</packaging>' ${pom}
 if [ $? -eq 0 ]; then
   testjar=`ls ${pom/pom.xml/}'target/'*.jar | grep -v sources`
   mv ${testjar} %{buildroot}%{_javadir}/linuxtools-tests/plugins
 fi
done

# Remove .rpm.createrepo.tests
rm -rf %{buildroot}%{_javadir}/linuxtools-tests/plugins/*.rpm.createrepo.tests*

set -e

testjar=`ls profiling/org.eclipse.linuxtools.profiling.tests/target/*.jar | grep -v sources`
mv ${testjar} %{buildroot}%{_javadir}/linuxtools-tests/plugins
testjar=`ls oprofile/org.eclipse.linuxtools.oprofile.tests/target/*.jar | grep -v sources`
mv ${testjar} %{buildroot}%{_javadir}/linuxtools-tests/plugins
testjar=`ls valgrind/org.eclipse.linuxtools.valgrind.tests/target/*.jar | grep -v sources`
mv ${testjar} %{buildroot}%{_javadir}/linuxtools-tests/plugins

### oprofile install.sh stuff ###
pushd %{buildroot}%{eclipse_dropin}/oprofile/plugins
OPROFILECOREVERSION=$(ls . | grep org.eclipse.linuxtools.oprofile.core_ | sed 's/org.eclipse.linuxtools.oprofile.core_//' |sed 's/.jar//')
unzip org.eclipse.linuxtools.oprofile.core_$OPROFILECOREVERSION.jar -d ./org.eclipse.linuxtools.oprofile.core_$OPROFILECOREVERSION
rm -fr org.eclipse.linuxtools.oprofile.core_$OPROFILECOREVERSION.jar
%global corepath %{buildroot}%{eclipse_dropin}/oprofile/plugins/org.eclipse.linuxtools.oprofile.core_$OPROFILECOREVERSION

#create opcontrol wrapper
pushd %{corepath}/natives/linux/scripts
rm -f *.sh
echo '#!/bin/sh' > opcontrol
echo 'exec pkexec %{_bindir}/opcontrol ${1+"$@"}' >> opcontrol
popd

# create DTS 3.0 OProfile policy file
pushd org.eclipse.linuxtools.oprofile.core_$OPROFILECOREVERSION/natives/linux/scripts
cp org.eclipse.linuxtools.oprofile{,-dts3}.policy
sed -i -e 's|/usr/bin/opcontrol|%{_bindir}/opcontrol|' org.eclipse.linuxtools.oprofile-dts3.policy
sed -i -e 's|org.eclipse.linuxtools.oprofile.run-opcontrol|org.eclipse.linuxtools.oprofile-dts3.run-opcontrol|' org.eclipse.linuxtools.oprofile-dts3.policy
popd

#install opcontrol wrapper permission files
install -d -m 755 %{buildroot}%{_root_datadir}/polkit-1/actions
install -D -m 644 \
 org.eclipse.linuxtools.oprofile.core_$OPROFILECOREVERSION/natives/linux/scripts/org.eclipse.linuxtools.oprofile.policy \
%{buildroot}%{_root_datadir}/polkit-1/actions/org.eclipse.linuxtools.oprofile.policy
install -D -m 644 \
 org.eclipse.linuxtools.oprofile.core_$OPROFILECOREVERSION/natives/linux/scripts/org.eclipse.linuxtools.oprofile-dts3.policy \
%{buildroot}%{_root_datadir}/polkit-1/actions/org.eclipse.linuxtools.oprofile-dts3.policy

#remove installed files
rm -f org.eclipse.linuxtools.oprofile.core_$OPROFILECOREVERSION/natives/linux/scripts/org.eclipse.linuxtools.oprofile{,-dts3}.policy

popd


%files
%{eclipse_dropin}/linuxtools

%files -n %{?scl_prefix}eclipse-changelog
%{eclipse_dropin}/changelog

%files -n %{?scl_prefix}eclipse-rpm-editor
%{eclipse_dropin}/rpm

%files -n %{?scl_prefix}eclipse-manpage
%{eclipse_dropin}/man

%files -n %{?scl_prefix}eclipse-gcov
%{eclipse_dropin}/gcov

%files -n %{?scl_prefix}eclipse-gprof
%{eclipse_dropin}/gprof

%files -n %{?scl_prefix}eclipse-oprofile
%{eclipse_dropin}/oprofile
%attr(755, root, root) %{eclipse_dropin}/oprofile/plugins/org.eclipse.linuxtools.oprofile.core_*/natives/linux/scripts/opcontrol
%{_root_datadir}/polkit-1/actions/org.eclipse.linuxtools.oprofile.policy
%{_root_datadir}/polkit-1/actions/org.eclipse.linuxtools.oprofile-dts3.policy

%files -n %{?scl_prefix}eclipse-perf
%{eclipse_dropin}/perf

%files -n %{?scl_prefix}eclipse-valgrind
%{eclipse_dropin}/valgrind

%files -n %{?scl_prefix}eclipse-systemtap
%{eclipse_dropin}/systemtap

%files -n %{?scl_prefix}eclipse-linuxtools-tests
%{_javadir}/linuxtools-tests

%changelog
* Fri Sep 19 2014 Roland Grunberg <rgrunber@redhat.com> - 3.1.0-0.1.git20140917
- Update Linux Tools to 3.1.0 RC4.

* Fri Sep 19 2014 Roland Grunberg <rgrunber@redhat.com> - 3.0.0-5
- Disable XDG_DATA_DIRS when Base RHEL Tools enabled.
- Resolves: rhbz#1134011

* Mon Aug 18 2014 Jeff Johnston <jjohnstn@redhat.com> - 3.0.0-4.7
- Fix systemtap chart to use similar fix made previously for piecharts
- Resolves rhbz#1112608

* Tue Aug 12 2014 Roland Grunberg <rgrunber@redhat.com> - 3.0.0-4.6
- Eclipse OProfile should use opcontrol from DTS 3.0.

* Mon Aug 11 2014 Jeff Johnston <jjohnstn@redhat.com> - 3.0.0-4.5
- Fix missing tool path messages reported in rhbz#1127619.

* Mon Aug 11 2014 Roland Grunberg <rgrunber@redhat.com> - 3.0.0-4.4
- Fix additional issues reported against rhbz#1116387.
- Fix bug in GCov plugin's annotation model.

* Wed Aug 06 2014 Jeff Johnston <jjohnstn@redhat.com> 3.0.0-4.3
- Add additional fixes to pie chart code to save and restore fonts
- Needed for rhbz#1112608

* Thu Jul 24 2014 Sami Wagiaalla <swagiaal@redhat.com> 3.0.0-4.2
- Add missing requirements to tests package.

* Tue Jul 22 2014 Roland Grunberg <rgrunber@redhat.com> - 3.0.0-4.1
- Fail gracefully when no events exist.

* Mon Jul 21 2014 Roland Grunberg <rgrunber@redhat.com> - 3.0.0-4
- Fix timer-mode failure.
- Fix location of polkit policy file.
- Resolves: rhbz#1116387.

* Wed Jul 09 2014 Jeff Johnston <jjohnstn@redhat.com> 3.0.0-3
- Add fix for rhbz#1112608

* Mon Jun 30 2014 Alexander Kurtakov <akurtako@redhat.com> 3.0.0-2.1
- Update to final 3.0 with path for rhbz#1112694.

* Fri Jun 6 2014 Sami Wagiaalla <swagiaal@redhat.com> 3.0.0-0.3.git20140509
- Add a 'Requires' on eclipse-swtbot to linuxtools-tests.
- Do not package createrepo tests.

* Thu May 29 2014 Roland Grunberg <rgrunber@redhat.com> - 3.0.0-0.2.git20140509
- Add manual R: to %%{?scl_prefix}swt-chart.

* Thu May 22 2014 Jeff Johnston <jjohnstn@redhat.com> 3.0.0-0.1.git20140509
- Update to Linux Tools 3.0 from Luna M7

* Thu Dec 12 2013 Alexander Kurtakov <akurtako@redhat.com> 2.2.0-2
- Bump release to rebuild.

* Thu Dec 12 2013 Alexander Kurtakov <akurtako@redhat.com> 2.2.0-1
- Update to Linux Tools 2.2.0.

* Mon Dec 02 2013 Jeff Johnston <jjohnstn@redhat.com> 2.1.0-4
- Fix systemtap to recognize Linux Tools path for local execution
- Resolves rhbz#1027331

* Tue Nov 19 2013 Jeff Johnston <jjohnstn@redhat.com> 2.1.0-3
- Add a base RHEL tools path using tools.launch.core
- Resolves #1027331

* Mon Oct 14 2013 Alexander Kurtakov <akurtako@redhat.com> 2.1.0-2
- Require swt-chart.

* Mon Oct 7 2013 Roland Grunberg <rgrunber@redhat.com> 2.1.0-1
- Update to 2.1.0.

* Thu Jun 27 2013 Alexander Kurtakov <akurtako@redhat.com> 2.0.0-1
- Final 2.0.0 release.

* Fri Jun 07 2013 Sami Wagiaalla <swagiaal@redhat.com> 2.0.0-0.9.git6428ae8
- Update to RC3.

* Thu Jun 06 2013 Roland Grunberg <rgrunber@redhat.com> 2.0.0-0.8.git7648994
- Add information on how to use DTS 2.0 OProfile.

* Thu May 09 2013 Roland Grunberg <rgrunber@redhat.com> 2.0.0-0.7.git7648994
- Remove unnecessary installation scripts.
- Resolves #911014.

* Thu May 09 2013 Sami Wagiaalla <swagiaal@redhat.com> 2.0.0-0.7.git7648994
- Update to a new snapshot.
- Disable test modules which depend on ptp.

* Tue Apr 23 2013 Roland Grunberg <rgrunber@redhat.com> 2.0.0-0.6.gitd67d6da
- Create another OProfile policy file to be used for DTS 2.0.

* Mon Apr 22 2013 Sami Wagiaalla <swagiaal@redhat.com> 2.0.0-0.5.gitd67d6da
- Update to a new snapshot containing fix for bz 948724.

* Mon Apr 22 2013 Roland Grunberg <rgrunber@redhat.com> 2.0.0-0.4.gita645f32
- Use OProfile from SCL root.

* Thu Apr 11 2013 Alexander Kurtakov <akurtako@redhat.com> 2.0.0-0.3.gita645f32
- New snapshot containing fix for building with Ant 1.9.

* Wed Apr 10 2013 Alexander Kurtakov <akurtako@redhat.com> 2.0.0-0.2.gitaa6d235
- SCL-ize.
- Update to newer snapshot.

* Wed Mar 27 2013 Alexander Kurtakov <akurtako@redhat.com> 2.0.0-0.1.git95aacfe
- Update to 2.0.0 prerelease for Kepler compatibility.
- Changelog no longer has it's own release as the version bumped.

* Wed Feb 13 2013 Roland Grunberg <rgrunber@redhat.com> 1.2.0-3
- Build as noarch.

* Thu Jan 24 2013 Roland Grunberg <rgrunber@redhat.com> 1.2.0-3
- Properly package PolicyKit for Eclipse OProfile.

* Fri Dec 7 2012 Roland Grunberg <rgrunber@redhat.com> 1.2.0-2
- Make changes to build in SCL environment.
- Disable bundles that depend on Eclipse PTP, and SWTBot.

* Fri Nov 23 2012 Roland Grunberg <rgrunber@redhat.com> 1.2.0-1
- Update to 1.2.0 upstream release.
- Disable jacoco-maven-plugin.

* Fri Oct 5 2012 Roland Grunberg <rgrunber@redhat.com> 1.1.1-3
- Synchronize release number for subpackages and rebuild.

* Fri Oct 5 2012 Roland Grunberg <rgrunber@redhat.com> 1.1.1-2
- Bump release to avoid conflicting with previous build.

* Tue Oct 2 2012 Roland Grunberg <rgrunber@redhat.com> 1.1.1-1
- Update to 1.1.1 upstream release.

* Wed Aug 8 2012 Alexander Kurtakov <akurtako@redhat.com> 1.1.0-1
- Initial packaging.