Blame SPECS/tesla-polyglot.spec

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