# # spec file for package jline # # Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # Name: jline Version: 2.14.6 Release: 0 Summary: JLine is a Java library for handling console input License: BSD-2-Clause Group: Development/Libraries/Java URL: https://github.com/jline/jline2 Source0: https://github.com/jline/jline2/archive/jline-%{version}.tar.gz Source1: %{name}-build.xml BuildRequires: ant BuildRequires: fdupes BuildRequires: hawtjni-runtime BuildRequires: jansi BuildRequires: jansi-native BuildRequires: javapackages-local BuildRequires: mvn(org.sonatype.oss:oss-parent:pom:) Requires: mvn(org.fusesource.jansi:jansi) Requires: mvn(org.sonatype.oss:oss-parent:pom:) BuildArch: noarch %description JLine is a Java library for handling console input. It is similar in functionality to BSD editline and GNU readline. People familiar with the readline/editline capabilities for modern shells (such as bash and tcsh) will find most of the command editing features of JLine to be familiar. %package javadoc Summary: Javadocs for %{name} Group: Documentation/HTML %description javadoc This package contains the API documentation for %{name}. %prep %setup -q -n jline2-jline-%{version} ln -s %{SOURCE1} build.xml mkdir -p lib # Remove maven-shade-plugin usage %pom_remove_plugin "org.apache.maven.plugins:maven-shade-plugin" # Remove animal sniffer plugin in order to reduce deps %pom_remove_plugin "org.codehaus.mojo:animal-sniffer-maven-plugin" # Remove unavailable and unneeded deps %pom_xpath_remove "pom:build/pom:extensions" %pom_remove_plugin :maven-site-plugin %pom_remove_plugin :maven-enforcer-plugin %pom_remove_plugin :maven-javadoc-plugin # Makes the build fail on deprecation warnings from jansi %pom_xpath_remove 'pom:arg[text()="-Werror"]' # Do not import non-existing internal package %pom_xpath_remove "pom:build/pom:plugins/pom:plugin[pom:artifactId = 'maven-bundle-plugin']/pom:executions/pom:execution/pom:configuration/pom:instructions/pom:Import-Package" %pom_xpath_inject "pom:build/pom:plugins/pom:plugin[pom:artifactId = 'maven-bundle-plugin']/pom:executions/pom:execution/pom:configuration/pom:instructions" "javax.swing;resolution:=optional,org.fusesource.jansi,!org.fusesource.jansi.internal" # Be sure to export jline.internal, but not org.fusesource.jansi. # See https://bugzilla.redhat.com/show_bug.cgi?id=1317551 %pom_xpath_set "pom:build/pom:plugins/pom:plugin[pom:artifactId = 'maven-bundle-plugin']/pom:executions/pom:execution/pom:configuration/pom:instructions/pom:Export-Package" "jline.*;-noimport:=true" # For some reason these directories do not exist, failing compilation due to -Werror mkdir -p target/generated-sources/annotations mkdir -p target/generated-test-sources/test-annotations # nondeterministic find -name TerminalFactoryTest.java -delete %build build-jar-repository -s lib jansi jansi-native hawtjni/hawtjni-runtime %ant package javadoc %install # jar install -dm 0755 %{buildroot}%{_javadir}/%{name} install -pm 0644 target/%{name}-%{version}.jar %{buildroot}%{_javadir}/%{name}/%{name}.jar # pom install -dm 0755 %{buildroot}%{_mavenpomdir}/%{name} install -pm 0644 pom.xml %{buildroot}%{_mavenpomdir}/%{name}/%{name}.pom %add_maven_depmap %{name}/%{name}.pom %{name}/%{name}.jar # javadoc install -dm 0755 %{buildroot}%{_javadocdir}/%{name} cp -pr target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name}/ %fdupes -s %{buildroot}%{_javadocdir} %files -f .mfiles %files javadoc %{_javadocdir}/%{name} %changelog