%{?scl:%scl_package jline2}
%{!?scl:%global pkg_name %{name}}
# Exclude generation of osgi() style provides, since they are not
# SCL-namespaced and may conflict with base RHEL packages.
# See: https://bugzilla.redhat.com/show_bug.cgi?id=1045447
%global __provides_exclude ^osgi(.*)$
Name: %{?scl_prefix}jline2
Version: 2.10
Release: 13%{?dist}
Summary: JLine is a Java library for handling console input
Group: Development/Libraries
License: BSD and ASL 2.0
URL: https://github.com/jline/jline2
# git clone git://github.com/jline/jline2.git
# cd jline2/ && git archive --format=tar --prefix=jline-2.10/ jline-2.10 | xz > jline-2.10.tar.xz
Source0: jline-%{version}.tar.xz
BuildArch: noarch
BuildRequires: jpackage-utils
BuildRequires: java-devel
BuildRequires: maven-local
BuildRequires: maven-compiler-plugin
BuildRequires: maven-jar-plugin
BuildRequires: maven-surefire-plugin
BuildRequires: maven-install-plugin
BuildRequires: junit4
BuildRequires: jansi
BuildRequires: fusesource-pom
BuildRequires: maven-surefire-provider-junit4
Requires: jpackage-utils
Requires: java
Requires: jansi
%{?scl:Requires: %scl_runtime}
%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
Requires: jpackage-utils
%description javadoc
This package contains the API documentation for %{name}.
%prep
%{?scl:scl enable %{scl} - << "EOF"}
%setup -q -n jline-%{version}
# 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_xpath_remove "pom:build/pom:pluginManagement/pom:plugins/pom:plugin[pom:artifactId = 'maven-site-plugin']"
# 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.internal"
# Let maven bundle plugin figure out the exports.
%pom_xpath_remove "pom:build/pom:plugins/pom:plugin[pom:artifactId = 'maven-bundle-plugin']/pom:executions/pom:execution/pom:configuration/pom:instructions/pom:Export-Package"
%{?scl:EOF}
%build
%{?scl:scl enable %{scl} - << "EOF"}
%mvn_build
%{?scl:EOF}
%install
%{?scl:scl enable %{scl} - << "EOF"}
%mvn_install
%{?scl:EOF}
%files -f .mfiles
%doc CHANGELOG.md README.md LICENSE.txt
%dir %{_javadir}/%{name}
%files javadoc -f .mfiles-javadoc
%doc LICENSE.txt
%changelog
* Mon Jan 27 2014 Severin Gehwolf - 2.10-13
- Own scl-ized jline2 directory in javadir.
- Resolves: RHBZ#1057169
* Fri Dec 20 2013 Severin Gehwolf 2.10-12
- Don't generate osgi() style provides.
- Resolves: RHBZ#1045447.
* Wed Nov 27 2013 Severin Gehwolf 2.10-11
- Properly enable SCL.
* Wed Nov 06 2013 Severin Gehwolf 2.10-10
- Use xmvn to install to proper SCL-ized location.
* Tue Sep 24 2013 Severin Gehwolf 2.10-9
- Bump release for rebuild.
* Wed Aug 28 2013 Severin Gehwolf 2.10-8
- SCL-ize package.
* Fri Apr 12 2013 Severin Gehwolf 2.10-7
- Remove unneeded animal-sniffer BR.
* Tue Mar 12 2013 Severin Gehwolf 2.10-6
- Fix OSGi metadata. Don't export packages which aren't in this
package. Fixes RHBZ#920756.
* Mon Mar 11 2013 Severin Gehwolf 2.10-5
- Provide %{_javadir}/%{name}.jar symlink. Fix RHBZ#919640.
* Thu Feb 28 2013 Mikolaj Izdebski - 2.10-4
- Install versioned JAR and POM
- Add missing BR: animal-sniffer
- Resolves: rhbz#911559
* Wed Feb 06 2013 Java SIG - 2.10-3
- Update for https://fedoraproject.org/wiki/Fedora_19_Maven_Rebuild
- Replace maven BuildRequires with maven-local
* Fri Feb 01 2013 Marek Goldmann - 2.10-2
- Do not import non-existing org.fusesource.jansi.internal package
* Fri Feb 01 2013 Marek Goldmann - 2.10-1
- Upstream release 2.10
- Removed patches, using pom macros now
* Fri Oct 19 2012 Severin Gehwolf 2.5-7
- Fix OSGi Import-Package header so as to not import non existing
org.fusesource.jansi.internal package.
* Thu Jul 19 2012 Fedora Release Engineering - 2.5-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Fri Jan 13 2012 Fedora Release Engineering - 2.5-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Tue Nov 15 2011 Marek Goldmann 2.5-4
- jline.console.ConsoleReader.back should be protected instead of private [rhbz#751208]
* Wed Sep 21 2011 Marek Goldmann 2.5-3
- Updated license
- Removed unnecessary add_to_maven_depmap
* Thu Sep 08 2011 Marek Goldmann 2.5-2
- Cleaned spec
* Tue May 31 2011 Marek Goldmann 2.5-1
- Initial packaging