File epubcheck.spec of Package epubcheck
#
# spec file for package epubcheck
#
# Copyright (c) 2025 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: epubcheck
Version: 5.2.1
Release: 0
Summary: Validation tool for EPUB
License: BSD-3-Clause
Group: Productivity/Publishing/XML
URL: https://github.com/w3c/%{name}
Source0: %{url}/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
Source1: %{name}.pod
BuildRequires: fdupes
BuildRequires: javapackages-tools
BuildRequires: maven-local
BuildRequires: mvn(com.fasterxml.jackson.core:jackson-annotations)
BuildRequires: mvn(com.fasterxml.jackson.core:jackson-core)
BuildRequires: mvn(com.fasterxml.jackson.core:jackson-databind)
BuildRequires: mvn(com.google.guava:guava)
BuildRequires: mvn(com.ibm.icu:icu4j)
BuildRequires: mvn(com.jayway.jsonpath:json-path-assert)
BuildRequires: mvn(com.twelvemonkeys.imageio:imageio-jpeg)
BuildRequires: mvn(net.sf.saxon:Saxon-HE:11)
BuildRequires: mvn(nu.validator:galimatias)
BuildRequires: mvn(org.apache.maven.plugins:maven-dependency-plugin)
BuildRequires: mvn(org.apache.maven.plugins:maven-enforcer-plugin)
BuildRequires: mvn(org.apache.maven.plugins:maven-failsafe-plugin)
BuildRequires: mvn(org.apache.xmlgraphics:batik-transcoder)
BuildRequires: mvn(org.codehaus.mojo:xml-maven-plugin)
BuildRequires: mvn(org.relaxng:jing)
BuildRequires: mvn(org.sonatype.oss:oss-parent:pom:)
BuildRequires: mvn(org.w3c.css:sac)
BuildArch: noarch
%description
EPUBCheck is the official conformance checker for EPUB publications. EPUBCheck
can be run as a standalone command-line tool or used as a Java library.
EPUBCheck is open source software, maintained by the DAISY Consortium on behalf
of W3C.
%prep
%autosetup
%pom_remove_plugin org.apache.felix:maven-bundle-plugin
%pom_remove_plugin org.codehaus.mojo:license-maven-plugin
%pom_remove_plugin :maven-assembly-plugin
%pom_xpath_replace 'pom:dependency[pom:artifactId="Saxon-HE"]/pom:version/text()' 11
%pom_xpath_remove 'pom:plugin[pom:artifactId="maven-jar-plugin"]/pom:configuration'
%pom_add_dep com.fasterxml.jackson.core:jackson-annotations
%pom_add_dep com.fasterxml.jackson.core:jackson-core
%pom_add_dep com.fasterxml.jackson.core:jackson-databind
%package javadoc
Summary: API documentation for %{name}
Group: Documentation/HTML
%description javadoc
This package provides %{summary}.
%build
%{mvn_build} -f -- \
-Dproject.build.outputTimestamp=$(date -u -d @${SOURCE_DATE_EPOCH:-$(date +%%s)} +%%Y-%%m-%%dT%%H:%%M:%%SZ)
pod2man --release='%{name} %{version}' --section=1 --center='User Commands' --quotes=none %{SOURCE1} %{name}.1
%install
%mvn_install
%fdupes %{buildroot}%{_javadocdir}/%{name}
build-jar-repository -s %{buildroot}%{_javadir}/%{name} \
commons-compress \
galimatias \
guava \
icu4j \
isorelax \
jackson-{annotations,core,databind} \
jing \
json-path-assert \
relaxngDatatype \
sac \
saxon11 \
twelvemonkeys \
xerces-j2 \
xmlgraphics-batik \
xmlresolver{,data}
%jpackage_script com.adobe.epubcheck.tool.Checker "" "" %{name} %{name} true
install -dm0755 %{buildroot}%{_mandir}/man1
install -Dm0644 %{name}.1 %{buildroot}%{_mandir}/man1/
%files -f .mfiles
%license LICENSE.md
%doc {CHANGELOG,README}.md
%{_javadir}/%{name}
%{_bindir}/%{name}
%{_mandir}/man1/*.1%{?ext_man}
%files javadoc -f .mfiles-javadoc
%license LICENSE.md
%changelog