167 lines
5.4 KiB
RPMSpec
167 lines
5.4 KiB
RPMSpec
#
|
|
# spec file for package jline (Version 0.9.94)
|
|
#
|
|
# Copyright (c) 2009 SUSE LINUX Products 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 http://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
%define with() %{expand:%%{?with_%{1}:1}%%{!?with_%{1}:0}}
|
|
%define without() %{expand:%%{?with_%{1}:0}%%{!?with_%{1}:1}}
|
|
%define bcond_with() %{expand:%%{?_with_%{1}:%%global with_%{1} 1}}
|
|
%define bcond_without() %{expand:%%{!?_without_%{1}:%%global with_%{1} 1}}
|
|
%define _without_maven 1
|
|
%bcond_without maven
|
|
%define section free
|
|
%define repo_dir .m2/repository
|
|
|
|
Name: jline
|
|
Version: 0.9.94
|
|
Release: 2
|
|
Summary: Java library for reading and editing user input in console applications
|
|
License: BSD 3-Clause
|
|
Url: http://jline.sourceforge.net/
|
|
Group: Development/Libraries/Java
|
|
Source0: http://download.sourceforge.net/sourceforge/jline/jline-0.9.94.zip
|
|
Source1: CatalogManager.properties
|
|
Source2: jline-build.xml
|
|
Source3: jline-0.9.94.pom
|
|
Requires: /bin/sh
|
|
Requires: /bin/stty
|
|
Requires(post): jpackage-utils
|
|
Requires(postun): jpackage-utils
|
|
BuildRequires: jpackage-utils >= 1.7.2
|
|
BuildRequires: xml-commons-resolver
|
|
%if %with maven
|
|
BuildRequires: maven2
|
|
BuildRequires: maven2-plugin-assembly
|
|
BuildRequires: maven2-plugin-compiler
|
|
BuildRequires: maven2-plugin-install
|
|
BuildRequires: maven2-plugin-jar
|
|
BuildRequires: maven2-plugin-javadoc
|
|
BuildRequires: maven2-plugin-resources
|
|
BuildRequires: maven2-plugin-site
|
|
BuildRequires: maven-release
|
|
BuildRequires: maven-surefire-plugin
|
|
%endif
|
|
BuildRequires: unzip
|
|
BuildRequires: ant
|
|
BuildArch: noarch
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
%description
|
|
JLine is a java library for reading and editing user input in console
|
|
applications. It features tab-completion, command history, password
|
|
masking, customizable keybindings, and pass-through handlers to use to
|
|
chain to other console applications.
|
|
|
|
|
|
|
|
%package demo
|
|
License: BSD 3-Clause
|
|
Summary: Java library for reading and editing user input in console applications
|
|
Group: Development/Libraries/Java
|
|
|
|
%description demo
|
|
JLine is a java library for reading and editing user input in console
|
|
applications. It features tab-completion, command history, password
|
|
masking, customizable keybindings, and pass-through handlers to use to
|
|
chain to other console applications.
|
|
|
|
|
|
|
|
%package javadoc
|
|
License: BSD 3-Clause
|
|
Summary: Java library for reading and editing user input in console applications
|
|
Group: Development/Libraries/Java
|
|
|
|
%description javadoc
|
|
JLine is a java library for reading and editing user input in console
|
|
applications. It features tab-completion, command history, password
|
|
masking, customizable keybindings, and pass-through handlers to use to
|
|
chain to other console applications.
|
|
|
|
|
|
|
|
%prep
|
|
# BEWARE: The jar file META-INF is not under the subdir
|
|
%setup -q -c
|
|
cp -pr %{name}-%{version}/* .
|
|
rm -r %{name}-%{version}
|
|
find -type f -name '*.jar' | xargs -t rm
|
|
# Use locally installed DTDs
|
|
mkdir -p build
|
|
cp -p %{SOURCE1} build/CatalogManager.properties
|
|
cp -p %{SOURCE2} src/build.xml
|
|
%if %without maven
|
|
perl -p -i -e 's|^.*<attribute name="Class-Path".*||' build.xml
|
|
%endif
|
|
|
|
%build
|
|
mkdir -p native
|
|
# Use locally installed DTDs
|
|
export CLASSPATH=`pwd`/build
|
|
cd src/
|
|
%if %with maven
|
|
export MAVEN_REPO_LOCAL=$(pwd)/.m2/repository
|
|
mkdir -p $MAVEN_REPO_LOCAL
|
|
mvn-jpp \
|
|
-e \
|
|
-Dmaven.repo.local=$MAVEN_REPO_LOCAL \
|
|
-Dmaven.test.failure.ignore=true \
|
|
install javadoc:javadoc
|
|
%else
|
|
export CLASSPATH=`pwd`/target/classes:`pwd`/target/test-classes
|
|
export OPT_JAR_LIST=:
|
|
ant -Dant.build.javac.source=1.5 -Dant.build.javac.target=1.5 -Dbuild.sysclasspath=only jar javadoc
|
|
%endif
|
|
|
|
%install
|
|
# jars
|
|
install -d -m 755 $RPM_BUILD_ROOT%{_javadir}
|
|
install -p -m 644 src/target/jline.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
|
|
(cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{version}*; do ln -sf ${jar} ${jar/-%{version}/}; done)
|
|
%add_to_maven_depmap %{name} %{name} %{version} JPP %{name}
|
|
# poms
|
|
install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/maven2/poms
|
|
install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.%{name}.pom
|
|
# javadoc
|
|
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
|
|
cp -pr src/target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}/
|
|
ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name}
|
|
|
|
%clean
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
%post
|
|
%update_maven_depmap
|
|
|
|
%postun
|
|
%update_maven_depmap
|
|
|
|
%files
|
|
%defattr(0644,root,root,0755)
|
|
%{_javadir}/%{name}.jar
|
|
%{_javadir}/%{name}-%{version}.jar
|
|
%{_datadir}/maven2/poms/*
|
|
%config %{_mavendepmapfragdir}/*
|
|
|
|
%files javadoc
|
|
%defattr(0644,root,root,0755)
|
|
%{_javadocdir}/%{name}-%{version}
|
|
%{_javadocdir}/%{name}
|
|
|
|
%changelog
|
|
* Thu May 07 2009 mvyskocil@suse.cz
|
|
- Initial SUSE packaging 0.9.94 from jpp 5.0
|