SHA256
1
0
forked from pool/jtidy
Fridrich Strba 2018-10-29 09:38:58 +00:00 committed by Git OBS Bridge
parent da52f9af22
commit 0a7407ba49
3 changed files with 49 additions and 42 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Mon Oct 29 09:36:38 UTC 2018 - Fridrich Strba <fstrba@suse.com>
- Fix javadoc build
- Package maven artifact
-------------------------------------------------------------------
Fri Sep 8 08:34:01 UTC 2017 - fstrba@suse.com

View File

@ -12,7 +12,7 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
@ -21,16 +21,15 @@
%define bcond_with() %{expand:%%{?_with_%{1}:%%global with_%{1} 1}}
%define bcond_without() %{expand:%%{!?_without_%{1}:%%global with_%{1} 1}}
%define _without_maven 1
%bcond_with maven
%define section free
%bcond_with maven
Name: jtidy
Version: 8.0
Release: 0
Summary: HTML syntax checker and pretty printer
License: BSD-3-Clause
Group: Development/Libraries/Java
Url: http://jtidy.sourceforge.net/
URL: http://jtidy.sourceforge.net/
# svn export -r813 http://svn.sourceforge.net/svnroot/jtidy/trunk/jtidy/ jtidy
# # bnc#501764
# rm jtidy/src/config/clover.license
@ -39,15 +38,15 @@ Source1: %{name}.jtidy.script
Source2: build.xml
Source3: maven-build.properties
Source4: maven-build.xml
Requires: xerces-j2
Requires: xml-commons-apis
BuildRequires: ant >= 1.6
BuildRequires: ant-junit
BuildRequires: javapackages-tools
BuildRequires: fdupes
BuildRequires: javapackages-local
BuildRequires: xerces-j2
BuildRequires: xml-commons-apis
Requires: xerces-j2
Requires: xml-commons-apis
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
JTidy is a Java port of HTML Tidy, a HTML syntax checker and pretty
@ -55,20 +54,15 @@ printer. Like its non-Java cousin, JTidy can be used as a tool for
cleaning up malformed and faulty HTML. In addition, JTidy provides a
DOM parser for real-world HTML.
%package javadoc
Summary: HTML syntax checker and pretty printer
Group: Development/Libraries/Java
# % package javadoc
#License: BSD-3-Clause
#Group: Development/Libraries/Java
#Summary: HTML syntax checker and pretty printer
#
# % description javadoc
#JTidy is a Java port of HTML Tidy, a HTML syntax checker and pretty
#printer. Like its non-Java cousin, JTidy can be used as a tool for
#cleaning up malformed and faulty HTML. In addition, JTidy provides a
#DOM parser for real-world HTML.
%description javadoc
JTidy is a Java port of HTML Tidy, a HTML syntax checker and pretty
printer. Like its non-Java cousin, JTidy can be used as a tool for
cleaning up malformed and faulty HTML. In addition, JTidy provides a
DOM parser for real-world HTML.
%package scripts
Summary: HTML syntax checker and pretty printer
@ -82,11 +76,9 @@ printer. Like its non-Java cousin, JTidy can be used as a tool for
cleaning up malformed and faulty HTML. In addition, JTidy provides a
DOM parser for real-world HTML.
%prep
%setup -q -n %{name}
%{__cp} -p %{SOURCE2} %{SOURCE3} %{SOURCE4} .
cp -p %{SOURCE2} %{SOURCE3} %{SOURCE4} .
sed -i 's/charset="ISO-8859-1"/charset="UTF-8"/' maven-build.xml
@ -106,41 +98,49 @@ export OPT_JAR_LIST="junit ant/ant-junit"
-Dmaven.repo.local=$MAVEN_REPO_LOCAL \
-Dmaven.test.skip=true \
-Dmaven.test.error.ignore=true \
package
# javadoc
package javadoc
%install
# jar
%__mkdir_p %{buildroot}%{_javadir}
%__cp -a target/jtidy-8.0-SNAPSHOT.jar %{buildroot}%{_javadir}/%{name}.jar
install -d -m 0755 %{buildroot}%{_javadir}
install -m 644 target/jtidy-8.0-SNAPSHOT.jar %{buildroot}%{_javadir}/%{name}.jar
# pom
install -d -m 755 %{buildroot}%{_mavenpomdir}
install -pm 644 pom.xml %{buildroot}%{_mavenpomdir}/%{name}.pom
%add_maven_depmap %{name}.pom %{name}.jar -a net.sf.jtidy:%{name}
# javadoc
# % __mkdir_p %{buildroot}%{_javadocdir}/%{name}
# % __cp -a target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name}
install -d -m 0755 %{buildroot}%{_javadocdir}/%{name}
cp -aL target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name}
%fdupes -s %{buildroot}%{_javadocdir}/%{name}
# shell script
%__mkdir_p %{buildroot}%{_bindir}
%__install -p -m 0755 %{SOURCE1} %{buildroot}%{_bindir}/%{name}
install -d -m 0755 %{buildroot}%{_bindir}
install -p -m 0755 %{SOURCE1} %{buildroot}%{_bindir}/%{name}
# ant.d
%__mkdir_p %{buildroot}%{_sysconfdir}/ant.d
%__cat > %{buildroot}%{_sysconfdir}/ant.d/%{name} << EOF
install -d -m 0755 %{buildroot}%{_sysconfdir}/ant.d
cat > %{buildroot}%{_sysconfdir}/ant.d/%{name} << EOF
jtidy xerces-j2 xml-commons-jaxp-1.3-apis
EOF
%clean
%__rm -rf %{buildroot}
%files
%defattr(0644,root,root,0755)
%doc LICENSE.txt
%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
# % defattr(0644,root,root,0755)
# % doc %{_javadocdir}/%{name}
%files javadoc
%defattr(0644,root,root,0755)
%doc %{_javadocdir}/%{name}
%files scripts
%defattr(0755,root,root,0755)

View File

@ -208,7 +208,8 @@
nohelp="false"
nonavbar="false"
serialwarn="false"
charset="ISO-8859-1"
source="6"
encoding="UTF8"
linksource="false"
breakiterator="false"/>
</target>