diff --git a/jtidy.jtidy.script b/jtidy.jtidy.script new file mode 100644 index 0000000000000000000000000000000000000000..29b4ba74b85fa24dc5d7cb99e6bad00da8efdb2b --- /dev/null +++ b/jtidy.jtidy.script @@ -0,0 +1,18 @@ +#!/bin/sh + +MAIN_CLASS=org.w3c.tidy.Tidy +BASE_JARS="jtidy" + +if [ -f /usr/share/java-utils/java-functions ] ; then + . /usr/share/java-utils/java-functions +else + echo "Can't find functions library, aborting" + exit 1 +fi + +set_jvm +set_classpath $BASE_JARS +set_flags $BASE_FLAGS +set_options $BASE_OPTIONS + +run "$@" diff --git a/jtidy.spec b/jtidy.spec new file mode 100644 index 0000000000000000000000000000000000000000..925f5cdb5c552c7e83f46747b8daaf77b2b2653c --- /dev/null +++ b/jtidy.spec @@ -0,0 +1,56 @@ +Name: jtidy +Version: 1.0 +Release: 1 +Epoch: 2 +Summary: HTML syntax checker and pretty printer +License: zlib +URL: http://jtidy.sourceforge.net/ +Source0: https://github.com/%{name}/%{name}/archive/v%{version}.tar.gz +Source1: jtidy.jtidy.script +BuildArch: noarch +BuildRequires: javapackages-local ant mvn(xerces:dom3-xml-apis) +Requires: javapackages-tools + +%description +JTidy is the Java port for HTML Tidy, which is an HTML syntax checker and a nice printer. +JTidy can be used as a tool to clean up misformatted HTML. +In addition, JTidy provides a DOM interface to the documents being processed, +effectively enabling you to use JTidy as a DOM parser for real HTML. + +%package help +Summary: Documentation for jtidy package +Provides: jtidy-javadoc = 2:%{version}-%{release} +Obsoletes: jtidy-javadoc < 2:%{version}-%{release} + +%description help +Documentation for jtidy package. + +%prep +%autosetup -n jtidy-%{version} + +%build +ant -Dant.build.javac.source=1.4 + +%install +%mvn_file : jtidy +%mvn_alias : net.sf.jtidy:jtidy +%mvn_artifact pom.xml target/jtidy-*.jar +%mvn_install -J target/javadoc + +install -d %{buildroot}%{_bindir} +cp -ap %{SOURCE1} %{buildroot}%{_bindir}/jtidy + +install -d %{buildroot}%{_sysconfdir}/ant.d +echo jtidy > %{buildroot}%{_sysconfdir}/ant.d/jtidy + + +%files -f .mfiles +%license LICENSE.txt +%attr(755, root, root) %{_bindir}/* +%config(noreplace) %{_sysconfdir}/ant.d/jtidy + +%files help -f .mfiles-javadoc + +%changelog +* Mon Jan 20 2020 Jiangping Hu 2:1.0-1 +- Package init diff --git a/v1.0.tar.gz b/v1.0.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..6bdc18fe9d143d8ba52d3ba26edd476ecc4ced20 Binary files /dev/null and b/v1.0.tar.gz differ