diff --git a/build.xml b/build.xml
deleted file mode 100644
index e59aa25..0000000
--- a/build.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/jtidy-build.xml b/jtidy-build.xml
new file mode 100644
index 0000000..8cfe5b2
--- /dev/null
+++ b/jtidy-build.xml
@@ -0,0 +1,111 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/jtidy.changes b/jtidy.changes
index 4bf9f4c..c135f30 100644
--- a/jtidy.changes
+++ b/jtidy.changes
@@ -1,3 +1,9 @@
+-------------------------------------------------------------------
+Sun Mar 20 12:39:53 UTC 2022 - Fridrich Strba
+
+- Build with java source and target levels 8
+- Rewamp and simplify the build system
+
-------------------------------------------------------------------
Mon Oct 29 09:36:38 UTC 2018 - Fridrich Strba
diff --git a/jtidy.jtidy.script b/jtidy.jtidy.script
deleted file mode 100644
index b0c342d..0000000
--- a/jtidy.jtidy.script
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/bin/sh
-#
-# JTidy script
-# JPackage Project
-# $Id: jtidy.jtidy.script,v 1.1 2002/08/30 20:27:06 scop Exp $
-
-# Source functions library
-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
-
-# Configuration
-MAIN_CLASS=org.w3c.tidy.Tidy
-BASE_JARS="jtidy xerces-j2 xml-commons-apis"
-
-# Set parameters
-set_jvm
-set_classpath $BASE_JARS
-set_flags $BASE_FLAGS
-set_options $BASE_OPTIONS
-
-# Let's start
-run "$@"
diff --git a/jtidy.spec b/jtidy.spec
index f3df91a..7166132 100644
--- a/jtidy.spec
+++ b/jtidy.spec
@@ -1,7 +1,7 @@
#
# spec file for package jtidy
#
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# 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
@@ -34,10 +34,7 @@ URL: http://jtidy.sourceforge.net/
# # bnc#501764
# rm jtidy/src/config/clover.license
Source0: jtidy-r813.tar.bz2
-Source1: %{name}.jtidy.script
-Source2: build.xml
-Source3: maven-build.properties
-Source4: maven-build.xml
+Source1: jtidy-build.xml
BuildRequires: ant >= 1.6
BuildRequires: ant-junit
BuildRequires: fdupes
@@ -78,33 +75,19 @@ DOM parser for real-world HTML.
%prep
%setup -q -n %{name}
-cp -p %{SOURCE2} %{SOURCE3} %{SOURCE4} .
-
-sed -i 's/charset="ISO-8859-1"/charset="UTF-8"/' maven-build.xml
+cp -p %{SOURCE1} build.xml
%build
-export MAVEN_REPO_LOCAL=$(pwd)/.m2/repository
-mkdir -p $MAVEN_REPO_LOCAL
-if [ `uname -m` = "ppc64" -o `uname -m` = "ppc64le" ];then
-export ANT_OPTS="-Xss2m"
-else
-export ANT_OPTS="-Xss1m"
-fi
-export CLASSPATH=$(build-classpath junit slf4j xerces-j2 xml-commons-jaxp-1.3-apis):`pwd`/target/classes:`pwd`/target/test-classes
-export OPT_JAR_LIST="junit ant/ant-junit"
+mkdir -p lib
+build-jar-repository -s lib xerces-j2 xml-commons-jaxp-1.3-apis
%{ant} \
- -Dbuild.sysclasspath=only \
- -Dmaven.mode.offline=true \
- -Dmaven.repo.local=$MAVEN_REPO_LOCAL \
- -Dmaven.test.skip=true \
- -Dmaven.test.error.ignore=true \
package javadoc
%install
# jar
install -d -m 0755 %{buildroot}%{_javadir}
-install -m 644 target/jtidy-8.0-SNAPSHOT.jar %{buildroot}%{_javadir}/%{name}.jar
+install -m 644 target/%{name}-%{version}.jar %{buildroot}%{_javadir}/%{name}.jar
# pom
install -d -m 755 %{buildroot}%{_mavenpomdir}
@@ -117,25 +100,17 @@ cp -aL target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name}
%fdupes -s %{buildroot}%{_javadocdir}/%{name}
# shell script
-install -d -m 0755 %{buildroot}%{_bindir}
-install -p -m 0755 %{SOURCE1} %{buildroot}%{_bindir}/%{name}
+%jpackage_script org.w3c.tidy.Tidy "" "" %{name}:xerces-j2:xml-apis %{name} true
# ant.d
install -d -m 0755 %{buildroot}%{_sysconfdir}/ant.d
cat > %{buildroot}%{_sysconfdir}/ant.d/%{name} << EOF
-jtidy xerces-j2 xml-commons-jaxp-1.3-apis
+jtidy xerces-j2 xml-apis
EOF
-%files
-%defattr(0644,root,root,0755)
+%files -f .mfiles
%license LICENSE.txt
%{_javadir}/%{name}.jar
-%{_mavenpomdir}/*
-%if %{defined _maven_repository}
-%{_mavendepmapfragdir}/%{name}
-%else
-%{_datadir}/maven-metadata/%{name}.xml*
-%endif
%config(noreplace) %{_sysconfdir}/ant.d/%{name}
%files javadoc
diff --git a/maven-build.properties b/maven-build.properties
deleted file mode 100644
index ffea032..0000000
--- a/maven-build.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-#Generated by Maven Ant Plugin - DO NOT EDIT THIS FILE!
-#Thu Oct 02 12:28:05 EDT 2008
-project.build.outputDirectory=${maven.build.outputDir}
-project.build.directory=${maven.build.dir}
-maven.test.reports=${maven.build.dir}/test-reports
-maven.build.finalName=jtidy-8.0-SNAPSHOT
-maven.reporting.outputDirectory=${maven.build.dir}/site
-maven.build.testResourceDir.0=src/test/resources
-maven.build.outputDir=${maven.build.dir}/classes
-maven.build.resourceDir.0=src/main/resources
-maven.build.testOutputDir=${maven.build.dir}/test-classes
-maven.repo.local=${user.home}/.m2/repository
-maven.settings.offline=false
-maven.build.dir=target
-maven.settings.interactiveMode=true
-maven.build.testDir.0=src/test/java
-maven.build.srcDir.0=src/main/java
diff --git a/maven-build.xml b/maven-build.xml
deleted file mode 100644
index d1142bc..0000000
--- a/maven-build.xml
+++ /dev/null
@@ -1,322 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- =================================== WARNING ===================================
- JUnit is not present in your $ANT_HOME/lib directory. Tests not executed.
- ===============================================================================
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-