diff --git a/tagsoup-1.2.1-src.zip b/tagsoup-1.2.1-src.zip new file mode 100644 index 0000000..a4cd045 Binary files /dev/null and b/tagsoup-1.2.1-src.zip differ diff --git a/tagsoup-1.2.1.pom b/tagsoup-1.2.1.pom new file mode 100644 index 0000000..014c64a --- /dev/null +++ b/tagsoup-1.2.1.pom @@ -0,0 +1,25 @@ + + 4.0.0 + org.ccil.cowan.tagsoup + tagsoup + TagSoup + 1.2.1 + jar + TagSoup is a SAX-compliant parser written in Java that, instead of parsing well-formed or valid XML, parses HTML as it is found in the wild: poor, nasty and brutish, though quite often far from short. TagSoup is designed for people who have to process this stuff using some semblance of a rational application design. By providing a SAX interface, it allows standard XML tools to be applied to even the worst HTML. TagSoup also includes a command-line processor that reads HTML files and can generate either clean HTML or well-formed XML that is a close approximation to XHTML. + http://home.ccil.org/~cowan/XML/tagsoup/ + + + Apache License 2.0 + http://www.apache.org/licenses/LICENSE-2.0.txt + repo + + + + http://home.ccil.org/~cowan/tagsoup/tagsoup-1.2.1-src.zip + + + + John Cowan + + + diff --git a/tagsoup.spec b/tagsoup.spec new file mode 100644 index 0000000..b85954d --- /dev/null +++ b/tagsoup.spec @@ -0,0 +1,63 @@ +Name: tagsoup +Version: 1.2.1 +Release: 18 +Summary: A SAX-compliant HTML parser written in Java +License: Apache-2.0 +URL: https://vrici.lojban.org/~cowan/XML/tagsoup +Source0: http://vrici.lojban.org/~cowan/XML/tagsoup/%{name}-%{version}-src.zip +Source1: https://repo1.maven.org/maven2/org/ccil/cowan/tagsoup/tagsoup/1.2.1/tagsoup-1.2.1.pom + +BuildArch: noarch +BuildRequires: javapackages-local ant-apache-xalan2 ant xalan-j2 +Requires: jpackage-utils >= 0:1.6 + +Provides: %{name}-javadoc = %{version}-%{release} +Obsoletes: %{name}-javadoc < %{version}-%{release} + +%description +TagSoup is designed as a parser, not a whole application; it isn't +intended to permanently clean up bad HTML, as HTML Tidy does, only +to parse it on the fly. Therefore, it does not convert presentation +HTML to CSS or anything similar. It does guarantee well-structured +results: tags will wind up properly nested, default attributes +will appear appropriately, and so on. + +%package_help + +%prep +%autosetup -n %{name}-%{version} -p1 + +find -name '*.class' | xargs rm -f +find -name '*.jar' | xargs rm -f + +%build +export CLASSPATH=$(build-classpath xalan-j2-serializer xalan-j2) +ant -Dtagsoup.version=%{version} -Dj2se.apiurl=%{_javadocdir}/java \ + dist docs-api + +%install +%mvn_file : tagsoup +%mvn_artifact %{SOURCE1} dist/lib/%{name}-%{version}.jar + +%mvn_install -J docs/api + +install -Dd -m 0755 %{buildroot}%{_mandir}/man1 +install -m 0644 tagsoup.1 %{buildroot}%{_mandir}/man1 + +%files +%defattr(-,root,root) +%doc +%license LICENSE +%{_datadir}/java/* +%{_datadir}/javadoc/* +%{_datadir}/maven-poms/* +%{_datadir}/maven-metadata/* + +%files help +%defattr(-,root,root) +%doc +%{_mandir}/man1/* + +%changelog +* Mon Feb 17 2020 lingsheng - 1.2.1-18 +- Package init