Files
xmlresolverdata/xmlresolverdata.spec

67 lines
2.1 KiB
RPMSpec

#
# spec file for package xmlresolverdata
#
# Copyright (c) 2024 SUSE LLC
#
# 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/
#
Name: xmlresolverdata
Version: 6.0.0
Release: 0
Summary: The standard DTDs, schemas, and URIs that ship with the XML Resolver
License: W3C-20150513
Group: Development/Libraries/Java
URL: https://github.com/xmlresolver/%{name}
Source0: %{url}/archive/refs/tags/%{version}.tar.gz#/%{name}-%{version}.tar.gz
BuildRequires: java-devel >= 1.8
BuildRequires: javapackages-local
BuildRequires: saxon10-scripts
BuildArch: noarch
%description
The standard DTDs, schemas, and URIs that ship with the XML Resolver.
%prep
%setup -q
%build
mkdir -p target/%{name}-%{version}
cp -rfv src/data/* target/%{name}-%{version}
rm target/%{name}-%{version}/manifest.xml
pushd target/%{name}-%{version}
saxon10 \
-s:../../src/data/manifest.xml \
-xsl:../../tools/make-catalog.xsl
popd
mkdir -p tmp/org/
ln -s ../../target/%{name}-%{version} tmp/org/xmlresolver
jar \
%if %{?pkg_vcmp:%pkg_vcmp java-devel >= 17}%{!?pkg_vcmp:0}
--date="$(date -u -d @${SOURCE_DATE_EPOCH:-$(date +%%s)} +%%Y-%%m-%%dT%%H:%%M:%%SZ)" \
%endif
--create --file=target/%{name}-%{version}.jar -C tmp/ .
%install
install -dm0755 %{buildroot}/%{_javadir}/xmlresolver
install -m0644 target/%{name}-%{version}.jar %{buildroot}%{_javadir}/%{name}.jar
%add_maven_depmap org.xmlresolver:xmlresolver::data:%{version} %{name}.jar
%files -f .mfiles
%license src/notices/*
%doc README.md
%changelog