Blob Blame History Raw
%global git_tag 6b04c544d33c31b1f3da168d0e606d8d20ed541d

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

# RSE server locations
%global rseserver_install   %{_datadir}/eclipse-rse-server
%global rseserver_java      %{_datadir}/java/eclipse-rse-server
%global rseserver_config    %{_sysconfdir}/sysconfig/rseserver

Name: eclipse-tm-terminal
Version: 4.5.100
Release: 2%{?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
# Use Authen::pam to authenticate clients
Patch1: eclipse-rse-server-auth-pl.patch
# Fix classpath in daemon and server scripts to point
# to install locations
Patch2: eclipse-rse-server-scripts.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

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

%package rse
Summary: Eclipse Remote System Explorer
Recommends: perl-interpreter
Recommends: perl-Authen-PAM

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

%description rse
Remote System Explorer (RSE) is a framework and toolkit in Eclipse Workbench
that allows you to connect and work with a variety of remote systems.

%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
%patch1
%patch2

# 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 tests rse
%pom_disable_module org.eclipse.tm.terminal.test terminal/plugins
%pom_disable_module examples rse
%pom_disable_module org.eclipse.rse.ui.capabilities rse/plugins

# 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
sed -i -e '/index/d' rse/doc/*/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 ":*.rse*" rse
%mvn_package ":*.dstore*" rse
%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

install -d -m 755 %{buildroot}%{rseserver_install}
install -d -m 755 %{buildroot}%{rseserver_java}
install -d -m 755 %{buildroot}%{rseserver_config}

pushd %{buildroot}%{_datadir}/eclipse/droplets/tm-terminal-rse/plugins
unzip -q -o -d %{buildroot}%{rseserver_java} org.eclipse.rse.services.dstore_*.jar dstore_miners.jar
unzip -q -o -d %{buildroot}%{rseserver_java} org.eclipse.dstore.core_*.jar dstore_core.jar
unzip -q -o -d %{buildroot}%{rseserver_java} org.eclipse.dstore.extra_*.jar dstore_extra_server.jar
unzip -q -o -d %{buildroot}%{rseserver_java} org.eclipse.rse.services_*.jar clientserver.jar
# Remove server-specific jar files from plug-ins
jarname=`ls org.eclipse.rse.services.dstore_*.jar`
zip -d $jarname dstore_miners.jar
jarname=`ls org.eclipse.dstore.core_*.jar`
zip -d $jarname dstore_core.jar
jarname=`ls org.eclipse.dstore.extra_*.jar`
zip -d $jarname dstore_extra_server.jar
jarname=`ls org.eclipse.rse.services_*.jar`
zip -d $jarname clientserver.jar
popd

pushd rse/plugins/org.eclipse.rse.services.dstore
pushd serverruntime/scripts/linux
cp *.pl %{buildroot}%{rseserver_install}
popd
pushd serverruntime/data
cp *.properties %{buildroot}%{rseserver_config}
cp *.dat %{buildroot}%{rseserver_install}
popd

%files -f .mfiles

%files rse -f .mfiles-rse
%{rseserver_install}
%{rseserver_java}
%dir %{rseserver_config}
%config(noreplace) %{rseserver_config}/ssl.properties
%config(noreplace) %{rseserver_config}/rsecomm.properties

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

%files sdk -f .mfiles-sdk

%changelog
* 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