File apache-commons-jxpath.spec of Package apache-commons-jxpath

# spec file for package apache-commons-jxpath
# Copyright (c) 2017 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

%define base_name       jxpath
%define short_name      commons-%{base_name}
Name:           apache-%{short_name}
Version:        1.3
Release:        0
Summary:        Simple XPath interpreter
License:        Apache-2.0
Group:          Development/Libraries/Java
Url:  {base_name}/
Source1:        %{short_name}.depmap
Patch0:         %{short_name}-mockrunner.patch
Patch1:         build.xml.patch
BuildRequires:  ant
BuildRequires:  apache-commons-beanutils
BuildRequires:  el_api >= 3.0
BuildRequires:  javapackages-tools
BuildRequires:  jdom
BuildRequires:  jsp
BuildRequires:  junit
BuildRequires:  servlet >= 3.0
Requires:       apache-commons-beanutils
Requires:       apache-commons-logging
Requires:       java >= 1.6.0
Requires:       jdom >= 1.0
Provides:       jakarta-%{short_name} = %{version}-%{release}
Obsoletes:      jakarta-%{short_name} < %{version}-%{release}
BuildArch:      noarch

Defines a simple interpreter of an expression language called XPath.
JXPath applies XPath expressions to graphs of objects of all kinds:
JavaBeans, Maps, Servlet contexts, DOM etc, including mixtures thereof.

%setup -q -n %{short_name}-%{version}-src
%patch0 -p1

export CLASSPATH=$(build-classpath \
		   ant-launcher \
                   plexus/ \
                   junit \
                   jdom \
                   jsp \
                   apache-commons-beanutils \
                   target/commons-jxpath.jar \
ant -Dmaven.mode.offline=true jar \
    -lib %{_datadir}/java

install -Dpm 644 target/%{short_name}.jar %{buildroot}%{_javadir}/%{name}-%{version}.jar
pushd %{buildroot}%{_javadir}
for jar in *-%{version}*; do
    ln -sf ${jar} `echo $jar| sed "s|apache-||g"`
    ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`
    ln -sf ${jar} `echo $jar| sed "s|apache-\(.*\)-%{version}|\1|g"`
popd # come back from javadir

%doc LICENSE.txt

openSUSE Build Service is sponsored by