2024-05-04 01:52:48 +02:00
|
|
|
#
|
|
|
|
# spec file for package werken-xpath
|
|
|
|
#
|
2024-05-31 15:02:55 +02:00
|
|
|
# Copyright (c) 2024 SUSE LLC
|
2024-05-04 01:52:48 +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.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
%define dotname werken.xpath
|
|
|
|
Name: werken-xpath
|
|
|
|
Version: 0.9.4
|
|
|
|
Release: 0
|
|
|
|
Summary: XPath implementation using JDOM
|
|
|
|
License: Apache-1.1
|
|
|
|
Group: Development/Libraries/Java
|
|
|
|
URL: https://sourceforge.net/projects/werken-xpath/
|
|
|
|
Source0: %{dotname}-%{version}-beta-src.tar.bz2
|
|
|
|
Source1: %{name}-%{version}.pom
|
|
|
|
Patch0: %{name}-ElementNamespaceContext.patch
|
|
|
|
Patch1: %{name}-Partition.patch
|
|
|
|
Patch2: %{name}-ParentStep.patch
|
|
|
|
Patch3: %{name}-NodeTypeStep.patch
|
|
|
|
Patch4: %{name}-UnAbbrStep.patch
|
|
|
|
Patch5: %{name}-StringFunction.patch
|
|
|
|
Patch6: %{name}-Test.patch
|
|
|
|
Patch7: %{name}-Driver.patch
|
|
|
|
Patch8: %{name}-runtests_sh.patch
|
|
|
|
BuildRequires: ant >= 1.6
|
|
|
|
BuildRequires: antlr
|
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: java-devel >= 1.8
|
2024-05-31 15:02:55 +02:00
|
|
|
BuildRequires: javapackages-local >= 6
|
2024-05-04 01:52:48 +02:00
|
|
|
BuildRequires: jdom
|
|
|
|
BuildRequires: xerces-j2
|
|
|
|
BuildRequires: xml-commons-apis
|
|
|
|
Requires: jdom
|
2024-05-31 15:02:55 +02:00
|
|
|
Provides: %{dotname} = %{version}-%{release}
|
|
|
|
Obsoletes: %{dotname} < %{version}
|
2024-05-04 01:52:48 +02:00
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
%description
|
|
|
|
werken.xpath is an implementation of the W3C XPath Recommendation, on
|
|
|
|
top of the JDOM library. It takes as input a XPath expression, and a
|
|
|
|
JDOM tree, and returns a NodeSet (java.util.List) of selected
|
|
|
|
elements. Is is being used in the development of the
|
|
|
|
as-yet-unreleased werken.xslt (eXtensible Stylesheet Language) and the
|
|
|
|
werken.canonical (XML canonicalization) packages.
|
|
|
|
|
|
|
|
%package javadoc
|
|
|
|
Summary: Javadoc for %{name}
|
|
|
|
Group: Documentation/HTML
|
2024-05-31 15:02:55 +02:00
|
|
|
Provides: %{dotname}-javadoc = %{version}-%{release}
|
|
|
|
Obsoletes: %{dotname}-javadoc < %{version}
|
2024-05-04 01:52:48 +02:00
|
|
|
|
|
|
|
%description javadoc
|
|
|
|
werken.xpath is an implementation of the W3C XPath Recommendation, on
|
|
|
|
top of the JDOM library. It takes as input a XPath expression, and a
|
|
|
|
JDOM tree, and returns a NodeSet (java.util.List) of selected
|
|
|
|
elements. Is is being used in the development of the
|
|
|
|
as-yet-unreleased werken.xslt (eXtensible Stylesheet Language) and the
|
|
|
|
werken.canonical (XML canonicalization) packages.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n %{dotname}
|
2024-05-31 15:02:55 +02:00
|
|
|
%patch -P 0 -b .sav
|
|
|
|
%patch -P 1 -b .sav
|
|
|
|
%patch -P 2 -b .sav
|
|
|
|
%patch -P 3 -b .sav
|
|
|
|
%patch -P 4 -b .sav
|
|
|
|
%patch -P 5 -b .sav
|
|
|
|
%patch -P 6 -b .sav
|
|
|
|
%patch -P 7 -b .sav
|
|
|
|
%patch -P 8 -b .sav
|
2024-05-04 01:52:48 +02:00
|
|
|
# remove all binary libs
|
|
|
|
for j in $(find . -name "*.jar"); do
|
|
|
|
mv $j $j.no
|
|
|
|
done
|
|
|
|
|
|
|
|
%build
|
|
|
|
export CLASSPATH=$(build-classpath jdom antlr xerces-j2 xml-commons-apis)
|
2024-05-31 15:02:55 +02:00
|
|
|
%{ant} -Dant.build.javac.source=1.8 -Dant.build.javac.target=1.8 package javadoc compile-test
|
2024-05-04 01:52:48 +02:00
|
|
|
# Note that you'll have to java in PATH for this to work, it is by default
|
|
|
|
# when using a JPackage JVM.
|
|
|
|
CLASSPATH=$CLASSPATH:build/werken.xpath.jar:build/test/classes
|
|
|
|
sh runtests.sh
|
|
|
|
|
|
|
|
%install
|
|
|
|
# jars
|
|
|
|
mkdir -p %{buildroot}%{_javadir}
|
2024-05-31 15:02:55 +02:00
|
|
|
cp -p build/%{dotname}.jar %{buildroot}%{_javadir}/%{name}.jar
|
|
|
|
ln -sf %{name}.jar %{buildroot}%{_javadir}/%{dotname}.jar
|
2024-05-04 01:52:48 +02:00
|
|
|
# pom
|
|
|
|
mkdir -p %{buildroot}%{_mavenpomdir}
|
2024-05-31 15:02:55 +02:00
|
|
|
%{mvn_install_pom} %{SOURCE1} %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
|
|
|
|
%add_maven_depmap JPP-%{name}.pom %{name}.jar
|
2024-05-04 01:52:48 +02:00
|
|
|
|
|
|
|
# javadoc
|
|
|
|
mkdir -p %{buildroot}%{_javadocdir}/%{name}
|
|
|
|
cp -pr build/apidocs/* %{buildroot}%{_javadocdir}/%{name}
|
|
|
|
%fdupes -s %{buildroot}%{_javadocdir}/%{name}
|
|
|
|
|
|
|
|
%files -f .mfiles
|
|
|
|
%{_javadir}/%{dotname}.jar
|
|
|
|
%license LICENSE
|
|
|
|
%doc LIMITATIONS README TODO
|
|
|
|
|
|
|
|
%files javadoc
|
|
|
|
%{_javadocdir}/%{name}
|
|
|
|
|
|
|
|
%changelog
|