Blob Blame History Raw
%global gittag %{version}.AM2

Name:             eclipse-usage
Version:          4.6.0
Release:          0.1%{?dist}
Summary:          Usage reporting plug-ins for Eclipse
License:          EPL and ASL 2.0
URL:              http://tools.jboss.org/

# Generate tarball with: ./get-jbosstools.sh
Source0:          jbosstools-%{gittag}.tar.xz
Source1:          get-jbosstools.sh

BuildArch:        noarch

BuildRequires:    tycho
BuildRequires:    tycho-extras
BuildRequires:    eclipse-epp-logging
BuildRequires:    maven-install-plugin
BuildRequires:    maven-plugin-build-helper

%description
Usage reporting plug-ins for Eclipse.

%prep
%setup -q -n jbosstools-%{gittag}

# Fix whitespace error in xml declaration
sed -i -e '1s/\t//' jbosstools-build/parent/pom.xml

# Fix perms on license
chmod -x jbosstools-base/foundation/features/org.jboss.tools.foundation.license.feature/license.html

# Remove unnecessary plugins from parent pom
%pom_remove_plugin org.jboss.tools.tycho-plugins:repository-utils jbosstools-build/parent
%pom_remove_plugin org.jacoco:jacoco-maven-plugin jbosstools-build/parent
%pom_remove_plugin org.apache.maven.plugins:maven-enforcer-plugin jbosstools-build/parent
%pom_remove_plugin org.sonatype.plugins:nexus-staging-maven-plugin jbosstools-build/parent
# need BOTH permutations here because we have 1.1 (maven-download-plugin) and 1.2 (download-maven-plugin) in parent pom
%pom_remove_plugin com.googlecode.maven-download-plugin:maven-download-plugin jbosstools-build/parent
%pom_remove_plugin com.googlecode.maven-download-plugin:download-maven-plugin jbosstools-build/parent

# Remove dep on jgit
%pom_xpath_remove "pom:plugin[pom:artifactId='tycho-packaging-plugin']/pom:dependencies" jbosstools-build/parent
%pom_xpath_remove "pom:plugin[pom:artifactId='tycho-packaging-plugin']/pom:configuration/pom:sourceReferences" jbosstools-build/parent
%pom_xpath_set "pom:plugin[pom:artifactId='tycho-packaging-plugin']/pom:configuration/pom:timestampProvider" "default" jbosstools-build/parent

# Disable everything except for usage plugin
%pom_disable_module org.jboss.tools.foundation.feature jbosstools-base/foundation/features
%pom_disable_module org.jboss.tools.foundation.security.linux.feature jbosstools-base/foundation/features
%pom_disable_module org.jboss.tools.foundation.test.feature jbosstools-base/foundation/features
%pom_disable_module plugins jbosstools-base/foundation
%pom_disable_module tests jbosstools-base/foundation
%pom_disable_module org.jboss.tools.usage.test.feature jbosstools-base/usage/features
%pom_disable_module org.jboss.tools.usage.test jbosstools-base/usage/tests

# No need to install poms or license feature
%mvn_package "::pom::" __noinstall
%mvn_package ":org.jboss.tools.foundation.license.feature" __noinstall

%build
pushd jbosstools-build
%mvn_build -j -- install -f parent/pom.xml
popd

%mvn_build -j -- -Dno-target-platform -f jbosstools-base/pom.xml -e

%install
%mvn_install

%files -f .mfiles
%license jbosstools-base/foundation/features/org.jboss.tools.foundation.license.feature/license.html

%changelog
* Tue Jun 12 2018 Mat Booth <mat.booth@redhat.com> - 4.6.0-0.1
- Update to AM2 release of 4.6.0

* Wed Mar 21 2018 Mat Booth <mat.booth@redhat.com> - 4.5.3-0.1
- Update to AM2 release of 4.5.3

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

* Mon Dec 18 2017 Mat Booth <mat.booth@redhat.com> - 4.5.2-0.1
- Update to latest release

* Wed Aug 02 2017 Nick Boldt <nboldt@redhat.com> - 4.5.0-1
- Update to latest release

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

* Tue Jul 04 2017 Nick Boldt <nboldt@redhat.com> - 4.4.4-1
- Update to latest release

* Tue Jan 17 2017 Mat Booth <mat.booth@redhat.com> - 4.4.3-1
- Update to latest release

* Wed Oct 26 2016 Mat Booth <mat.booth@redhat.com> - 4.4.1-3
- Augment the product ID instead of the distro name

* Fri Oct 21 2016 Mat Booth <mat.booth@redhat.com> - 4.4.1-2
- Trim down the source tarball and fix the license tag

* Tue Sep 27 2016 Mat Booth <mat.booth@redhat.com> - 4.4.1-1
- Initial package