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 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) # license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative. # 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_with() %{expand:%%{?_with_%{1}:%%global with_%{1} 1}}
%define bcond_without() %{expand:%%{!?_without_%{1}:%%global with_%{1} 1}} %define bcond_without() %{expand:%%{!?_without_%{1}:%%global with_%{1} 1}}
%define _without_maven 1 %define _without_maven 1
%bcond_with maven
%define section free %define section free
%bcond_with maven
Name: jtidy Name: jtidy
Version: 8.0 Version: 8.0
Release: 0 Release: 0
Summary: HTML syntax checker and pretty printer Summary: HTML syntax checker and pretty printer
License: BSD-3-Clause License: BSD-3-Clause
Group: Development/Libraries/Java 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 # svn export -r813 http://svn.sourceforge.net/svnroot/jtidy/trunk/jtidy/ jtidy
# # bnc#501764 # # bnc#501764
# rm jtidy/src/config/clover.license # rm jtidy/src/config/clover.license
@ -39,15 +38,15 @@ Source1: %{name}.jtidy.script
Source2: build.xml Source2: build.xml
Source3: maven-build.properties Source3: maven-build.properties
Source4: maven-build.xml Source4: maven-build.xml
Requires: xerces-j2
Requires: xml-commons-apis
BuildRequires: ant >= 1.6 BuildRequires: ant >= 1.6
BuildRequires: ant-junit BuildRequires: ant-junit
BuildRequires: javapackages-tools BuildRequires: fdupes
BuildRequires: javapackages-local
BuildRequires: xerces-j2 BuildRequires: xerces-j2
BuildRequires: xml-commons-apis BuildRequires: xml-commons-apis
Requires: xerces-j2
Requires: xml-commons-apis
BuildArch: noarch BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description %description
JTidy is a Java port of HTML Tidy, a HTML syntax checker and pretty 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 cleaning up malformed and faulty HTML. In addition, JTidy provides a
DOM parser for real-world HTML. DOM parser for real-world HTML.
%package javadoc
Summary: HTML syntax checker and pretty printer
Group: Development/Libraries/Java
%description javadoc
# % package javadoc JTidy is a Java port of HTML Tidy, a HTML syntax checker and pretty
#License: BSD-3-Clause printer. Like its non-Java cousin, JTidy can be used as a tool for
#Group: Development/Libraries/Java cleaning up malformed and faulty HTML. In addition, JTidy provides a
#Summary: HTML syntax checker and pretty printer 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 %package scripts
Summary: HTML syntax checker and pretty printer 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 cleaning up malformed and faulty HTML. In addition, JTidy provides a
DOM parser for real-world HTML. DOM parser for real-world HTML.
%prep %prep
%setup -q -n %{name} %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 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.repo.local=$MAVEN_REPO_LOCAL \
-Dmaven.test.skip=true \ -Dmaven.test.skip=true \
-Dmaven.test.error.ignore=true \ -Dmaven.test.error.ignore=true \
package package javadoc
# javadoc
%install %install
# jar # jar
%__mkdir_p %{buildroot}%{_javadir} install -d -m 0755 %{buildroot}%{_javadir}
%__cp -a target/jtidy-8.0-SNAPSHOT.jar %{buildroot}%{_javadir}/%{name}.jar 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 # javadoc
# % __mkdir_p %{buildroot}%{_javadocdir}/%{name} install -d -m 0755 %{buildroot}%{_javadocdir}/%{name}
# % __cp -a target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name} cp -aL target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name}
%fdupes -s %{buildroot}%{_javadocdir}/%{name}
# shell script # shell script
%__mkdir_p %{buildroot}%{_bindir} install -d -m 0755 %{buildroot}%{_bindir}
%__install -p -m 0755 %{SOURCE1} %{buildroot}%{_bindir}/%{name} install -p -m 0755 %{SOURCE1} %{buildroot}%{_bindir}/%{name}
# ant.d # ant.d
%__mkdir_p %{buildroot}%{_sysconfdir}/ant.d install -d -m 0755 %{buildroot}%{_sysconfdir}/ant.d
%__cat > %{buildroot}%{_sysconfdir}/ant.d/%{name} << EOF cat > %{buildroot}%{_sysconfdir}/ant.d/%{name} << EOF
jtidy xerces-j2 xml-commons-jaxp-1.3-apis jtidy xerces-j2 xml-commons-jaxp-1.3-apis
EOF EOF
%clean
%__rm -rf %{buildroot}
%files %files
%defattr(0644,root,root,0755) %defattr(0644,root,root,0755)
%doc LICENSE.txt %license LICENSE.txt
%{_javadir}/%{name}.jar %{_javadir}/%{name}.jar
%{_mavenpomdir}/*
%if %{defined _maven_repository}
%{_mavendepmapfragdir}/%{name}
%else
%{_datadir}/maven-metadata/%{name}.xml*
%endif
%config(noreplace) %{_sysconfdir}/ant.d/%{name} %config(noreplace) %{_sysconfdir}/ant.d/%{name}
# % files javadoc %files javadoc
# % defattr(0644,root,root,0755) %defattr(0644,root,root,0755)
# % doc %{_javadocdir}/%{name} %doc %{_javadocdir}/%{name}
%files scripts %files scripts
%defattr(0755,root,root,0755) %defattr(0755,root,root,0755)

View File

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