# # spec file for package jsoup # # Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # # 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: jsoup Version: 1.11.3 Release: 0 Summary: Java library for working with real-world HTML License: MIT Group: Development/Libraries/Java URL: http://jsoup.org/ Source0: https://github.com/jhy/%{name}/archive/%{name}-%{version}.tar.gz Source1: %{name}-build.xml BuildRequires: ant BuildRequires: fdupes BuildRequires: java-devel >= 1.7 BuildRequires: javapackages-local BuildArch: noarch %description jsoup is a Java library for working with real-world HTML. It provides a very convenient API for extracting and manipulating data, using the best of DOM, CSS, and jquery-like methods. jsoup implements the WHATWG HTML5 specification, and parses HTML to the same DOM as modern browsers do. - scrape and parse HTML from a URL, file, or string - find and extract data, using DOM traversal or CSS selectors - manipulate the HTML elements, attributes, and text - clean user-submitted content against a safe white-list, to prevent XSS attacks - output tidy HTML jsoup is designed to deal with all varieties of HTML found in the wild; from pristine and validating, to invalid tag-soup; jsoup will create a sensible parse tree. %package javadoc Summary: Javadoc for %{name} Group: Documentation/HTML %description javadoc API documentation for %{name}. %prep %setup -q -n %{name}-%{name}-%{version} cp %{SOURCE1} . %pom_remove_plugin :animal-sniffer-maven-plugin %pom_remove_plugin :maven-javadoc-plugin %build %ant -f %{name}-build.xml jar javadoc %install # jar install -dm 0755 %{buildroot}%{_javadir}/%{name} install -pm 0644 target/%{name}-%{version}.jar %{buildroot}%{_javadir}/%{name}/%{name}.jar # pom install -dm 0755 %{buildroot}%{_mavenpomdir}/%{name} install -pm 0644 pom.xml %{buildroot}%{_mavenpomdir}/%{name}/%{name}.pom %add_maven_depmap %{name}/%{name}.pom %{name}/%{name}.jar # javadoc install -dm 0755 %{buildroot}%{_javadocdir} install -pdm 0755 target/site/apidocs %{buildroot}%{_javadocdir}/%{name} %fdupes -s %{buildroot}%{_javadocdir} %files -f .mfiles %doc README.md CHANGES %license LICENSE %files javadoc %license LICENSE %{_javadocdir}/%{name} %changelog