Blob Blame History Raw
%global git_tag 3ba744c9c82dcd8df82263254431180b7db6e93a

# Set this to avoid building CDT and remotes bundles to eliminate
# a circular dep on CDT->tm-terminal->remote->CDT
%bcond_with bootstrap

Name: eclipse-tm-terminal
Version: 4.5.102
Release: 1%{?dist}
Summary: Terminal plug-in for Eclipse

License: EPL-2.0
URL: https://www.eclipse.org/tm/
Source0: https://git.eclipse.org/c/tm/org.eclipse.tm.git/snapshot/org.eclipse.tm-%{git_tag}.tar.xz

Patch0: 0001-Fix-feature-includes.patch

BuildArch: noarch

# Upstream Eclipse no longer supports non-64bit arches
ExcludeArch: s390 %{arm} %{ix86}

BuildRequires: tycho
BuildRequires: tycho-extras
BuildRequires: apache-commons-net
BuildRequires: eclipse-egit
BuildRequires: eclipse-license2
%if %{without bootstrap}
# Needed for additional terminal connectors
BuildRequires: eclipse-cdt
BuildRequires: eclipse-remote
BuildRequires: rxtx >= 2.2-0.15
%endif

# Obsoletes/Provides added in F30
Obsoletes: eclipse-rse < %{version}-%{release}
Obsoletes: eclipse-rse-server < %{version}-%{release}
Obsoletes: %{name}-rse < %{version}-%{release}

%description
An integrated Eclipse View for the local command prompt (console) or
remote hosts (SSH, Telnet, Serial).

%if %{without bootstrap}
%package connectors
Summary: Additional connectors for Terminal plug-in for Eclipse

%description connectors
Additional connectors for Terminal plug-in for Eclipse.
%endif

%package sdk
Summary: Terminal SDK plug-in for Eclipse
Requires: %{name} = %{version}-%{release}
%if %{without bootstrap}
Requires: %{name}-connectors = %{version}-%{release}
%endif

%description sdk
Sources and developer resources for the Terminal plug-in for Eclipse.

%prep
%setup -q -n org.eclipse.tm-%{git_tag}
%patch0 -p1

# Don't need to build repo for RPM builds
%pom_disable_module site
%pom_remove_plugin :target-platform-configuration
%pom_remove_plugin :tycho-packaging-plugin

# Fixup erroneous license info, see: https://bugs.eclipse.org/bugs/show_bug.cgi?id=538094
sed -i -e '/license-feature-version/s/1\.0\.1\.qualifier/0.0.0/' \
  $(find -name feature.xml)

# Don't ship tests, examples, etc
%pom_disable_module org.eclipse.tm.terminal.test terminal/plugins

# Don't build and ship obsolete RSE plugins
%pom_disable_module rse
%pom_disable_module org.eclipse.tm.terminal.view.ui.rse terminal/plugins
%pom_disable_module org.eclipse.tm.terminal.view.rse.feature terminal/features
%pom_disable_module org.eclipse.tm.terminal.view.rse.sdk.feature terminal/features

# When bootstrapping, disable the plugins and features that
# create cyclical dependencies
%if %{with bootstrap}
%pom_disable_module org.eclipse.tm.terminal.connector.process terminal/plugins
%pom_disable_module org.eclipse.tm.terminal.connector.local terminal/plugins
%pom_disable_module org.eclipse.tm.terminal.connector.local.feature terminal/features
%pom_disable_module org.eclipse.tm.terminal.connector.local.sdk.feature terminal/features
%pom_disable_module org.eclipse.tm.terminal.connector.remote terminal/plugins
%pom_disable_module org.eclipse.tm.terminal.connector.remote.feature terminal/features
%pom_disable_module org.eclipse.tm.terminal.connector.remote.sdk.feature terminal/features
%pom_xpath_remove "import[@feature='org.eclipse.tm.terminal.connector.local.sdk.feature']" \
  terminal/features/org.eclipse.tm.terminal.sdk.feature/feature.xml
%endif

# Remove cycles between subpackages
%pom_xpath_remove "import[@feature='org.eclipse.tm.terminal.connector.local.feature']" \
  terminal/features/org.eclipse.tm.terminal.feature/feature.xml

# Fix trying to include non-existent files
sed -i -e "s|feature.properties,\\\|feature.properties|g" terminal/features/org.eclipse.tm.terminal.view.feature/build.properties
sed -i -e "s|p2.inf||g" terminal/features/org.eclipse.tm.terminal.view.feature/build.properties

# Enable serial connector
sed -i -e '/<modules>/s/<!-- Bug 536800 remove from reactor//' -e '/modules>/s/-->//' \
  terminal/{plugins,features}/pom.xml

# No need to install poms
%mvn_package "::pom::" __noinstall
%mvn_package "::jar:sources{,-feature}:" sdk
%mvn_package ":*.sdk.feature" sdk
%mvn_package ":*.sdk" sdk
%mvn_package ":org.eclipse.tm.terminal.connector.{local,process,remote,cdtserial,serial}*" connectors
%mvn_package ":"

%build
%if %{without bootstrap}
%mvn_build -j -- -Pcdtserial,rxtxserial
%else
%mvn_build -j -- -P"!cdtserial,!rxtxserial"
%endif

%install
%mvn_install

%files -f .mfiles

%if %{without bootstrap}
%files connectors -f .mfiles-connectors
%endif

%files sdk -f .mfiles-sdk

%changelog
* Mon Sep 16 2019 Mat Booth <mat.booth@redhat.com> - 4.5.102-1
- Update to latest upstream release
- Retire obsolete RSE plugins

* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 4.5.100-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild

* Thu Mar 14 2019 Mat Booth <mat.booth@redhat.com> - 4.5.100-1
- Update to 2019-03 release
- Update license tag
- Add RSE subpackage and obsolete the old one since the projects
  were merged
- Restrict to same architectures as Eclipse itself

* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 4.4.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild

* Wed Aug 22 2018 Mat Booth <mat.booth@redhat.com> - 4.4.0-4
- Actually update license tag

* Wed Aug 22 2018 Mat Booth <mat.booth@redhat.com> - 4.4.0-3
- Update license tag

* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 4.4.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

* Mon Jun 11 2018 Mat Booth <mat.booth@redhat.com> - 4.4.0-1
- Update to photon release

* Wed Mar 21 2018 Mat Booth <mat.booth@redhat.com> - 4.3.0-1
- Add patch to add API to read TextCanvas content

* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 4.3.0-0.4.gitfa298da
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4.3.0-0.3.gitfa298da
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

* Mon Jun 19 2017 Mat Booth <mat.booth@redhat.com> - 4.3.0-0.2.gitfa298da
- Allow conditionally building against cdt and remote

* Sun Jun 18 2017 Mat Booth <mat.booth@redhat.com> - 4.3.0-0.1.gitfa298da
- Update to Oxygen snapshot

* Fri Mar 31 2017 Mat Booth <mat.booth@redhat.com> - 4.2.0-2
- Build serial port bundles, resolves rhbz#1272785

* Wed Mar 29 2017 Mat Booth <mat.booth@redhat.com> - 4.2.0-1
- Update to latest upstream release

* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4.1.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* Fri Aug 12 2016 Mat Booth <mat.booth@redhat.com> - 4.1.0-3
- Split out remote connecter, which requires CDT via PTP Remote

* Fri Aug 12 2016 Mat Booth <mat.booth@redhat.com> - 4.1.0-2
- Improve bootstrapping mode
- Split out local connecter, which requires CDT
- Add a SDK package for source bundles

* Fri Jul 01 2016 Mat Booth <mat.booth@redhat.com> - 4.1.0-1
- Update to Neon release

* Thu Mar 03 2016 Sopot Cela <scela@redhat.com> - 4.0.0-6.gitcf7ef3f
- Update for Mars.2 release

* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Mon Sep 14 2015 Roland Grunberg <rgrunber@redhat.com> - 4.0.0-4
- Rebuild as an Eclipse p2 Droplet.

* Thu Aug 27 2015 Mat Booth <mat.booth@redhat.com> - 4.0.0-3
- Add bootstrap mode to allow breaking of cyclic dependencies

* Thu Jun 25 2015 Roland Grunberg <rgrunber@redhat.com> - 4.0.0-2
- Rebuild to correct auto-generated requires.

* Wed Jun 24 2015 Alexander Kurtakov <akurtako@redhat.com> 4.0.0-1
- Update to 4.0 final.

* Wed Jun 17 2015 Alexander Kurtakov <akurtako@redhat.com> 4.0.0-0.5.gite58c5d3
- Fix FTBFS - pom/manifest/feature qualifier misalignments.

* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.0.0-0.4.gite58c5d3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Wed Jun 3 2015 Alexander Kurtakov <akurtako@redhat.com> 4.0.0-0.3.gite58c5d3
- New git snapshot.

* Tue Jun 2 2015 Alexander Kurtakov <akurtako@redhat.com> 4.0.0-0.2.git4ea71eb
- Fix review comments.

* Tue Jun 2 2015 Alexander Kurtakov <akurtako@redhat.com> 4.0.0-0.1.git4ea71eb
- Initial packaging