Blame SPECS/tesla-polyglot.spec

602ae2
# Conditionally build groovy or yaml support
602ae2
%bcond_with jp_minimal
602ae2
602ae2
# TODO rename package to takari-polyglot-maven
602ae2
602ae2
Name:          tesla-polyglot
602ae2
Version:       0.2.1
602ae2
Release:       9%{?dist}
602ae2
Summary:       Modules to enable Maven usage in other JVM languages
602ae2
License:       EPL-1.0
602ae2
URL:           https://github.com/takari/maven-polyglot
602ae2
Source0:       https://github.com/takari/polyglot-maven/archive/polyglot-%{version}.tar.gz
602ae2
Source1:       eclipse-1.0.txt
602ae2
602ae2
BuildRequires:  maven-local
602ae2
BuildRequires:  mvn(junit:junit)
602ae2
BuildRequires:  mvn(org.apache.maven:maven-core)
602ae2
BuildRequires:  mvn(org.apache.maven:maven-model)
602ae2
BuildRequires:  mvn(org.apache.maven:maven-model-builder)
602ae2
BuildRequires:  mvn(org.apache.maven:maven-parent:pom:)
602ae2
BuildRequires:  mvn(org.apache.maven:maven-plugin-api)
602ae2
BuildRequires:  mvn(org.apache.maven.plugin-tools:maven-plugin-annotations)
602ae2
BuildRequires:  mvn(org.codehaus.plexus:plexus-component-annotations)
602ae2
BuildRequires:  mvn(org.codehaus.plexus:plexus-component-metadata)
602ae2
BuildRequires:  mvn(org.codehaus.plexus:plexus-utils)
602ae2
BuildRequires:  mvn(org.eclipse.sisu:org.eclipse.sisu.plexus)
602ae2
BuildRequires:  mvn(org.slf4j:slf4j-api)
602ae2
BuildRequires:  mvn(org.apache.maven.plugins:maven-plugin-plugin)
602ae2
602ae2
%if %{without jp_minimal}
602ae2
# Yaml module
602ae2
BuildRequires:  mvn(org.yaml:snakeyaml)
602ae2
# Groovy module
602ae2
BuildRequires:  mvn(org.codehaus.gmavenplus:gmavenplus-plugin)
602ae2
BuildRequires:  mvn(org.codehaus.groovy:groovy)
602ae2
%endif
602ae2
602ae2
BuildArch:     noarch
602ae2
602ae2
ExclusiveArch:  x86_64
602ae2
602ae2
%description
602ae2
Polyglot for Maven is an experimental distribution of Maven
602ae2
that allows the expression of a POM in something other than
602ae2
XML. A couple of the dialects also have the capability to
602ae2
write plugins inline: the Groovy, Ruby and Scala dialects
602ae2
allow this.
602ae2
602ae2
%package atom
602ae2
Summary:       Polyglot Tesla :: Atom
602ae2
602ae2
%description atom
602ae2
Polyglot Tesla :: Atom.
602ae2
602ae2
%package common
602ae2
Summary:       Polyglot Tesla :: Common
602ae2
%if %{with jp_minimal}
602ae2
# Obsolete unbuilt modules when built minimally
602ae2
Obsoletes: %{name}-groovy < %{version}-%{release}
602ae2
Obsoletes: %{name}-yaml < %{version}-%{release}
602ae2
%endif
602ae2
602ae2
%description common
602ae2
Polyglot Tesla :: Common.
602ae2
602ae2
%if %{without jp_minimal}
602ae2
%package groovy
602ae2
Summary:       Polyglot Tesla :: Groovy
602ae2
602ae2
%description groovy
602ae2
Polyglot Tesla :: Groovy.
602ae2
602ae2
%package yaml
602ae2
Summary:       Polyglot Tesla :: YAML
602ae2
602ae2
%description yaml
602ae2
Polyglot Tesla :: YAML.
602ae2
%endif
602ae2
602ae2
%package maven-plugin
602ae2
Summary:       Polyglot Tesla :: Maven Plugin
602ae2
602ae2
%description maven-plugin
602ae2
This package contains Polyglot Tesla Maven Plugin.
602ae2
602ae2
%package translate-plugin
602ae2
Summary:       Polyglot :: Translate Plugin
602ae2
602ae2
%description translate-plugin
602ae2
This package contains Polyglot Translate Plugin.
602ae2
602ae2
%package xml
602ae2
Summary:       Polyglot Tesla :: XML
602ae2
602ae2
%description xml
602ae2
Polyglot Tesla :: XML.
602ae2
602ae2
%package javadoc
602ae2
Summary:       Javadoc for %{name}
602ae2
602ae2
%description javadoc
602ae2
This package contains javadoc for %{name}.
602ae2
602ae2
%prep
602ae2
%setup -q -n polyglot-maven-polyglot-%{version}
602ae2
602ae2
find -name "*.class" -delete
602ae2
find -name "*.jar" -delete
602ae2
602ae2
%pom_remove_parent
602ae2
%pom_xpath_remove "pom:packaging" polyglot-common polyglot-atom polyglot-yaml polyglot-xml polyglot-groovy
602ae2
%pom_xpath_set "pom:packaging" "maven-plugin" polyglot-maven-plugin polyglot-translate-plugin
602ae2
%pom_add_plugin org.apache.maven.plugins:maven-compiler-plugin:3.0 '
602ae2
<configuration>
602ae2
 <source>1.7</source>
602ae2
 <target>1.7</target>
602ae2
 <encoding>UTF-8</encoding>
602ae2
</configuration>'
602ae2
602ae2
# Unavailable build deps/tools
602ae2
%pom_disable_module polyglot-clojure
602ae2
%pom_disable_module polyglot-scala
602ae2
%pom_remove_dep -r :polyglot-scala
602ae2
%pom_disable_module polyglot-ruby
602ae2
%pom_remove_dep -r :polyglot-ruby
602ae2
602ae2
%if %{with jp_minimal}
602ae2
%pom_disable_module polyglot-groovy
602ae2
%pom_remove_dep -r :polyglot-groovy
602ae2
%pom_disable_module polyglot-yaml
602ae2
%pom_remove_dep -r :polyglot-yaml
602ae2
%endif
602ae2
602ae2
%pom_remove_dep rubygems:maven-tools polyglot-ruby
602ae2
# TODO: remove following line once maven-tools gem is in Fedora
602ae2
rm -Rf polyglot-ruby/src/{test,it}
602ae2
%pom_remove_plugin :maven-invoker-plugin polyglot-ruby
602ae2
602ae2
# Unavailable plugin
602ae2
%pom_remove_plugin org.codehaus.groovy:groovy-eclipse-compiler polyglot-groovy
602ae2
%pom_remove_dep org.codehaus.groovy:groovy-eclipse-batch polyglot-groovy
602ae2
%pom_remove_dep org.codehaus.groovy:groovy-eclipse-compiler polyglot-groovy
602ae2
%pom_remove_plugin :maven-compiler-plugin polyglot-groovy
602ae2
# use gmavenplus
602ae2
%pom_add_plugin org.codehaus.gmavenplus:gmavenplus-plugin:1.5 polyglot-groovy "
602ae2
 <executions>
602ae2
  <execution>
602ae2
   <goals>
602ae2
    <goal>generateStubs</goal>
602ae2
    <goal>testGenerateStubs</goal>
602ae2
    
602ae2
    <goal>testCompile</goal-->
602ae2
   </goals>
602ae2
  </execution>
602ae2
 </executions>"
602ae2
602ae2
for p in maven-plugin translate-plugin; do
602ae2
  %pom_add_plugin "org.apache.maven.plugins:maven-plugin-plugin:3.4" polyglot-${p} "
602ae2
  <configuration>
602ae2
    <skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
602ae2
  </configuration>"
602ae2
%pom_xpath_inject "pom:dependency[pom:groupId = 'org.apache.maven']" "<version>3.3.1</version>" polyglot-${p}
602ae2
done
602ae2
602ae2
%pom_xpath_inject "pom:project/pom:dependencies/pom:dependency[pom:groupId = 'org.apache.maven']" '<version>${mavenVersion}</version>'
602ae2
602ae2
# Use web access
602ae2
sed -i '/pyyaml/d' polyglot-yaml/src/test/java/org/sonatype/maven/polyglot/yaml/CompactFormatTest.java
602ae2
602ae2
# com.cedarsoftware:java-util:1.19.3
602ae2
sed -i '/DeepEquals/d' polyglot-xml/src/test/java/org/sonatype/maven/polyglot/xml/TestReaderComparedToDefault.java
602ae2
%pom_remove_dep com.cedarsoftware:java-util polyglot-xml
602ae2
602ae2
# ComparisonFailure
602ae2
rm polyglot-yaml/src/test/java/org/sonatype/maven/polyglot/yaml/SnakeYamlModelReaderTest.java
602ae2
602ae2
cp -p %{SOURCE1} .
602ae2
sed -i 's/\r//' eclipse-1.0.txt
602ae2
602ae2
%mvn_alias ':polyglot-{*}' io.tesla.polyglot:tesla-polyglot-@1
602ae2
%mvn_alias ':polyglot-{*}' org.sonatype.pmaven:pmaven-@1
602ae2
602ae2
%build
602ae2
%mvn_build -s -- -Dproject.build.sourceEncoding=UTF-8
602ae2
602ae2
%install
602ae2
%mvn_install
602ae2
602ae2
%files -f .mfiles-polyglot
602ae2
%doc poms
602ae2
%license eclipse-1.0.txt license-header.txt
602ae2
602ae2
%files atom -f .mfiles-polyglot-atom
602ae2
%files common -f .mfiles-polyglot-common
602ae2
602ae2
%if %{without jp_minimal}
602ae2
%files groovy -f .mfiles-polyglot-groovy
602ae2
%files yaml -f .mfiles-polyglot-yaml
602ae2
%endif
602ae2
602ae2
%files maven-plugin -f .mfiles-polyglot-maven-plugin
602ae2
%files translate-plugin -f .mfiles-polyglot-translate-plugin
602ae2
602ae2
%files xml -f .mfiles-polyglot-xml
602ae2
%doc polyglot-xml/README.md
602ae2
602ae2
%files javadoc -f .mfiles-javadoc
602ae2
%license eclipse-1.0.txt license-header.txt
602ae2
602ae2
%changelog
602ae2
* Tue Nov 12 2019 Jie Kang <jkang@redhat.com> - 0.2.1-9
602ae2
- Remove takari deps in non-boostrap mode
602ae2
602ae2
* Tue Jun 25 2019 Mat Booth <mat.booth@redhat.com> - 0.2.1-8
602ae2
- Add obsoletes for unbuilt modules
602ae2
602ae2
* Tue May 07 2019 Mat Booth <mat.booth@redhat.com> - 0.2.1-7
602ae2
- Restrict to same architectures as Eclipse itself
602ae2
602ae2
* Wed Apr 24 2019 Mat Booth <mat.booth@redhat.com> - 0.2.1-6
602ae2
- Add a bootstrap mode
602ae2
602ae2
* Thu Apr 18 2019 Mat Booth <mat.booth@redhat.com> - 0.2.1-5
602ae2
- Update license tag and general specfile cleanup
602ae2
602ae2
* Wed Feb 20 2019 Mat Booth <mat.booth@redhat.com> - 0.2.1-4
602ae2
- Conditionally build yaml support
602ae2
602ae2
* Sun Feb 03 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.1-3
602ae2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
602ae2
602ae2
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.1-2
602ae2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
602ae2
602ae2
* Fri Jun 08 2018 Mat Booth <mat.booth@redhat.com> - 0.2.1-1
602ae2
- Update to latest release
602ae2
- Conditionally build groovy support
602ae2
602ae2
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.0-2
602ae2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
602ae2
602ae2
* Wed Sep 20 2017 Michael Simacek <msimacek@redhat.com> - 0.2.0-1
602ae2
- Update to upstream version 0.2.0
602ae2
602ae2
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.19-3
602ae2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
602ae2
602ae2
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.19-2
602ae2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
602ae2
602ae2
* Fri Nov 18 2016 Michael Simacek <msimacek@redhat.com> - 0.1.19-1
602ae2
- Update to upstream version 0.1.19
602ae2
602ae2
* Tue Aug 09 2016 gil cattaneo <puntogil@libero.it> 0.1.18-3
602ae2
- add missing build requires: xmvn
602ae2
602ae2
* Sun Jul 03 2016 gil cattaneo <puntogil@libero.it> 0.1.18-2
602ae2
- enable xml module
602ae2
- use gmavenplus-plugin
602ae2
602ae2
* Tue Jun 21 2016 Mikolaj Izdebski <mizdebsk@redhat.com> - 0.1.18-1
602ae2
- Update to upstream version 0.1.18
602ae2
602ae2
* Wed Jun 15 2016 Mikolaj Izdebski <mizdebsk@redhat.com> - 0.1.14-3
602ae2
- Add missing build-requires
602ae2
602ae2
* Fri Feb 05 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.14-2
602ae2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
602ae2
602ae2
* Fri Jan 08 2016 gil cattaneo <puntogil@libero.it> 0.1.14-1
602ae2
- update to 0.1.14
602ae2
- enable (snake)YAML support
602ae2
602ae2
* Sat Jul 18 2015 gil cattaneo <puntogil@libero.it> 0.1.8-4
602ae2
- fix FTBFS rhbz#1240065
602ae2
- disable ruby module rhbz#1234368
602ae2
602ae2
* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1.8-3
602ae2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
602ae2
602ae2
* Tue May 19 2015 Michal Srb <msrb@redhat.com> - 0.1.8-2
602ae2
- Build ruby module
602ae2
602ae2
* Mon Apr 20 2015 gil cattaneo <puntogil@libero.it> 0.1.8-1
602ae2
- update to 0.1.8
602ae2
602ae2
* Mon Apr 20 2015 gil cattaneo <puntogil@libero.it> 0.1.6-2
602ae2
- disable takari-pom support
602ae2
602ae2
* Mon Apr 13 2015 gil cattaneo <puntogil@libero.it> 0.1.6-1
602ae2
- update to 0.1.6
602ae2
602ae2
* Thu Feb 12 2015 gil cattaneo <puntogil@libero.it> 0.1.0-3
602ae2
- introduce license macro
602ae2
602ae2
* Thu Oct 23 2014 gil cattaneo <puntogil@libero.it> 0.1.0-2
602ae2
- add BR on ant-junit
602ae2
- added alias needed by Gradle
602ae2
602ae2
* Sun May 25 2014 gil cattaneo <puntogil@libero.it> 0.1.0-1
602ae2
- initial rpm