2014-07-18 15:26:36 +02:00
|
|
|
#
|
|
|
|
# spec file for package apache-commons-jxpath
|
|
|
|
#
|
2018-05-15 12:43:07 +02:00
|
|
|
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
2014-07-18 15:26:36 +02:00
|
|
|
#
|
|
|
|
# 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.
|
2014-07-18 14:58:35 +02:00
|
|
|
|
2018-10-20 15:03:42 +02:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2014-07-18 15:26:36 +02:00
|
|
|
#
|
2014-07-18 14:58:35 +02:00
|
|
|
|
|
|
|
|
2014-07-18 15:26:36 +02:00
|
|
|
%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
|
2018-10-20 15:03:42 +02:00
|
|
|
URL: http://commons.apache.org/%{base_name}/
|
2014-07-18 15:26:36 +02:00
|
|
|
Source0: http://www.apache.org/dist/commons/%{base_name}/source/%{short_name}-%{version}-src.tar.gz
|
|
|
|
Source1: %{short_name}.depmap
|
|
|
|
Patch0: %{short_name}-mockrunner.patch
|
|
|
|
Patch1: build.xml.patch
|
|
|
|
BuildRequires: ant
|
|
|
|
BuildRequires: apache-commons-beanutils
|
2015-06-04 11:42:17 +02:00
|
|
|
BuildRequires: el_api >= 3.0
|
2018-05-15 12:43:07 +02:00
|
|
|
BuildRequires: java-devel >= 1.8
|
2018-10-20 15:03:42 +02:00
|
|
|
BuildRequires: javapackages-local
|
2014-07-18 15:26:36 +02:00
|
|
|
BuildRequires: javapackages-tools
|
2015-06-04 11:42:17 +02:00
|
|
|
BuildRequires: jdom
|
2014-07-18 15:26:36 +02:00
|
|
|
BuildRequires: jsp
|
|
|
|
BuildRequires: junit
|
2015-06-04 11:42:17 +02:00
|
|
|
BuildRequires: servlet >= 3.0
|
2014-07-18 15:26:36 +02:00
|
|
|
Requires: apache-commons-beanutils
|
|
|
|
Requires: apache-commons-logging
|
2018-05-15 12:43:07 +02:00
|
|
|
Requires: java >= 1.8
|
2015-06-04 11:42:17 +02:00
|
|
|
Requires: jdom >= 1.0
|
2014-07-18 15:26:36 +02:00
|
|
|
Provides: jakarta-%{short_name} = %{version}-%{release}
|
|
|
|
Obsoletes: jakarta-%{short_name} < %{version}-%{release}
|
|
|
|
BuildArch: noarch
|
2014-07-18 14:58:35 +02:00
|
|
|
|
|
|
|
%description
|
|
|
|
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.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n %{short_name}-%{version}-src
|
|
|
|
%patch0 -p1
|
|
|
|
%patch1
|
|
|
|
|
|
|
|
%build
|
|
|
|
export CLASSPATH=$(build-classpath \
|
|
|
|
ant-launcher \
|
|
|
|
plexus/ \
|
|
|
|
junit \
|
|
|
|
jdom \
|
|
|
|
jsp \
|
|
|
|
apache-commons-beanutils \
|
|
|
|
target/commons-jxpath.jar \
|
|
|
|
):target/classes:target/test-classes
|
|
|
|
ant -Dmaven.mode.offline=true jar \
|
2018-05-15 12:48:13 +02:00
|
|
|
-Dant.build.javac.source=8 -Dant.build.javac.target=8 \
|
2014-07-18 15:26:36 +02:00
|
|
|
-lib %{_datadir}/java
|
2018-11-22 23:56:21 +01:00
|
|
|
sed -i "s/@name@/%{short_name}/g" src/conf/MANIFEST.MF
|
|
|
|
sed -i "s/@version@/%{version}/g" src/conf/MANIFEST.MF
|
|
|
|
jar ufm target/%{short_name}.jar src/conf/MANIFEST.MF
|
2014-07-18 14:58:35 +02:00
|
|
|
|
|
|
|
%install
|
2014-07-18 15:26:36 +02:00
|
|
|
install -Dpm 644 target/%{short_name}.jar %{buildroot}%{_javadir}/%{name}-%{version}.jar
|
|
|
|
pushd %{buildroot}%{_javadir}
|
2014-07-18 14:58:35 +02:00
|
|
|
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"`
|
|
|
|
done
|
|
|
|
popd # come back from javadir
|
|
|
|
|
2018-10-20 15:03:42 +02:00
|
|
|
# pom
|
|
|
|
install -d -m 755 %{buildroot}%{_mavenpomdir}/%{last_path_segment}/
|
|
|
|
install -pm 644 pom.xml %{buildroot}%{_mavenpomdir}/%{name}-%{version}.pom
|
|
|
|
%add_maven_depmap %{name}-%{version}.pom %{name}-%{version}.jar
|
|
|
|
|
2014-07-18 14:58:35 +02:00
|
|
|
%files
|
|
|
|
%defattr(0644,root,root,0755)
|
2018-10-20 15:03:42 +02:00
|
|
|
%license LICENSE.txt
|
2014-07-18 14:58:35 +02:00
|
|
|
%{_javadir}/*.jar
|
2018-10-20 15:03:42 +02:00
|
|
|
%{_mavenpomdir}/*
|
|
|
|
%if %{defined _maven_repository}
|
|
|
|
%{_mavendepmapfragdir}/%{name}
|
|
|
|
%else
|
|
|
|
%{_datadir}/maven-metadata/%{name}.xml*
|
|
|
|
%endif
|
2014-07-18 14:58:35 +02:00
|
|
|
|
|
|
|
%changelog
|