File boilerpipe.spec of Package boilerpipe
#
# spec file for package boilerpipe
#
# Copyright (c) 2022 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/
#
%global git_hash 2c78035
Name: boilerpipe
Version: 2.0+git20150831.%{git_hash}
Release: 0
Summary: Boilerplate Removal and Fulltext Extraction from HTML pages
License: Apache-2.0
Group: Development/Libraries/Java
URL: https://github.com/kohlschutter/%{name}
Source0: %{url}/tarball/%{git_hash}#/%{name}-%{version}.tar.gz
Source1: https://www.apache.org/licenses/LICENSE-2.0
BuildRequires: fdupes
BuildRequires: maven-local
BuildRequires: mvn(net.sourceforge.nekohtml:nekohtml)
BuildArch: noarch
%description
Boilerplate Removal and Fulltext Extraction from HTML pages.
%package javadoc
Summary: API documentation for %{name}
Group: Documentation/HTML
%description javadoc
API documentation for %{name}.
%prep
%setup -q -n kohlschutter-%{name}-%{git_hash}
cp %{SOURCE1} .
sed -i -e \
's/com\.kohlschutter\.boilerpipe\.org\.cyberneko\.html/org.cyberneko.html/' \
boilerpipe-common/src/main/java/com/kohlschutter/boilerpipe/sax/{BoilerpipeHTMLParser,HTMLHighlighter,ImageExtractor}.java
%pom_disable_module nekohtml
%pom_disable_module nekohtml-relocated
%pom_remove_plugin :maven-source-plugin
%pom_remove_plugin com.mycila:license-maven-plugin
%pom_remove_dep com.kohlschutter.boilerpipe:nekohtml-relocated boilerpipe-common
%pom_add_dep net.sourceforge.nekohtml:nekohtml boilerpipe-common
%build
%{mvn_build} -f -- -Dmaven.compiler.{source,target}=8
%install
%mvn_install
%fdupes %{buildroot}%{_javadocdir}/%{name}
%files -f .mfiles
%license LICENSE
%doc README.md
%files javadoc -f .mfiles-javadoc
%license LICENSE
%changelog