[jline] Package jline 2.x as jline. Resolves RHBZ#1022915.

jerboaa jerboaa at fedoraproject.org
Tue Oct 29 16:22:48 UTC 2013


commit 19cb1f58b3f0ce38ad0af1aa6b0ad9b13a0dfc48
Author: Severin Gehwolf <sgehwolf at redhat.com>
Date:   Tue Oct 29 17:21:11 2013 +0100

    Package jline 2.x as jline. Resolves RHBZ#1022915.
    
    This is part of a large effort to make jline 1.x a compat package rather than
    jline 2.x. See RHBZ#1022897.
    
    Also switch to xmvn.

 .gitignore                   |    1 +
 CatalogManager.properties    |   61 -------------
 jline-0.9.94-crosslink.patch |   12 ---
 jline.spec                   |  197 +++++++++++++++---------------------------
 sources                      |    2 +-
 5 files changed, 72 insertions(+), 201 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e68e8af..8f3975c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
 jline-0.9.94.zip
 jline-1.0.zip
+/jline-2.10.tar.xz
diff --git a/jline.spec b/jline.spec
index 6d30369..7bc510c 100644
--- a/jline.spec
+++ b/jline.spec
@@ -1,145 +1,88 @@
-# Copyright (c) 2000-2005, JPackage Project
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# 1. Redistributions of source code must retain the above copyright
-#    notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-#    notice, this list of conditions and the following disclaimer in the
-#    documentation and/or other materials provided with the
-#    distribution.
-# 3. Neither the name of the JPackage Project nor the names of its
-#    contributors may be used to endorse or promote products derived
-#    from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-
-Name:           jline
-Version:        1.0
-Release:        5%{?dist}
-Summary:        Java library for reading and editing user input in console applications
-License:        BSD
-URL:            http://jline.sourceforge.net/
-Group:          Development/Libraries
-Source0:        http://download.sourceforge.net/sourceforge/jline/jline-%{version}.zip
-Source1:        CatalogManager.properties
-Patch1:         %{name}-0.9.94-crosslink.patch
-
-Requires:      bash
-# for /bin/stty
-Requires:      coreutils
-Requires:      jpackage-utils
-
-BuildRequires: jpackage-utils
-BuildRequires: maven-local
-BuildRequires: maven-assembly-plugin
-BuildRequires: maven-compiler-plugin
-BuildRequires: maven-install-plugin
-BuildRequires: maven-jar-plugin
-BuildRequires: maven-javadoc-plugin
-BuildRequires: maven-resources-plugin
-BuildRequires: maven-site-plugin
-BuildRequires: maven-surefire-plugin
-BuildRequires: maven-surefire-provider-junit
-BuildRequires: java-javadoc
-
-BuildArch:     noarch
+Name:             jline
+Version:          2.10
+Release:          9%{?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
+Obsoletes: jline2 < %{version}-%{release}
+Provides: jline2 = %{version}-%{release}
 
 %description
-JLine is a java library for reading and editing user input in console
-applications. It features tab-completion, command history, password
-masking, configurable key-bindings, and pass-through handlers to use to
-chain to other console applications.
-
-%package        demo
-Summary:        Demos for %{name}
-Group:          Documentation
-Requires:       %{name} = %{version}-%{release}
-
-%description    demo
-Demonstrations and samples for %{name}.
-
-%package        javadoc
-Summary:        Javadoc for %{name}
-Group:          Documentation
-Requires:       java-javadoc
-
-%description    javadoc
-Javadoc for %{name}.
+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
+Obsoletes: jline2-javadoc < %{version}-%{release}
+Provides: jline2-javadoc = %{version}-%{release}
+
+%description javadoc
+This package contains the API documentation for %{name}.
 
 %prep
-%setup -q
-%patch1 -p1
+%setup -q -n jline-%{version}
 
-# Make sure upstream hasn't sneaked in any jars we don't know about
-find -name '*.class' -exec rm -f '{}' \;
-find -name '*.jar' -exec rm -f '{}' \;
+# 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 pre-built Windows-only binary artifacts
-rm src/src/main/resources/jline/jline*.dll
+# 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']"
 
-# Use locally installed DTDs
-mkdir build
-cp -p %{SOURCE1} build/
+# 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" "<Import-Package>javax.swing;resolution:=optional,!org.fusesource.jansi.internal</Import-Package>"
 
-%build
-# Use locally installed DTDs
-export CLASSPATH=%{_builddir}/%{name}-%{version}/build
-
-cd src/
+# 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"
 
-mvn-rpmbuild install javadoc:javadoc
+%build
+%mvn_build
 
 %install
-# jars
-install -pD -T -m 644 src/target/%{name}-%{version}.jar \
-  %{buildroot}%{_javadir}/%{name}.jar
+%mvn_install
 
-# javadoc
-install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}
-cp -pr src/target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name}
+%files -f .mfiles
 
-# demo
-install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/%{name}
-cp -pr examples %{buildroot}%{_datadir}/%{name}
-
-# pom
-install -pD -T -m 644 src/pom.xml %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
-%add_maven_depmap JPP-%{name}.pom %{name}.jar
-
-%pre javadoc
-# workaround for rpm bug, can be removed in F-17
-[ $1 -gt 1 ] && [ -L %{_javadocdir}/%{name} ] && \
-rm -rf $(readlink -f %{_javadocdir}/%{name}) %{_javadocdir}/%{name} || :
-
-%files
-%{_javadir}/%{name}.jar
-%{_mavendepmapfragdir}/*
-%{_mavenpomdir}/*
-%doc LICENSE.txt src/src/main/resources/jline/keybindings.properties
-
-%files demo
-%{_datadir}/%{name}
-
-%files javadoc
-%doc LICENSE.txt
-%{_javadocdir}/*
+%files javadoc -f .mfiles-javadoc
 
 %changelog
+* Tue Oct 29 2013 Severin Gehwolf <sgehwolf at redhat.com> - 2.10-9
+- Package jline 2.x as jline. Resolves RHBZ#1022915.
+- Part of a large effort to make jline1 a compat package rather than jline2.
+  See RHBZ#1022897.
+- Switch to xmvn.
+
 * Sat Aug 03 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.0-5
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
 
diff --git a/sources b/sources
index 4e9f774..a016557 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-811dc1c8a351a2e928524bd79eb9e798  jline-1.0.zip
+621dd4d65e5b67b1468f2666a7fa1fb8  jline-2.10.tar.xz


More information about the scm-commits mailing list