packages java-tidy.spec
      Pages: < 1 >  DOWNLOAD      
%define        rel  r7
%define        tidy_ver 1.0
%define        javahome   %{_jvmdir}/jdk
Name:          java-tidy
Version:       04aug2000
Release:       3mamba
Summary:       HTML syntax checker and pretty printer.
Group:         System/Libraries/Java
Vendor:        openmamba
Distribution:  openmamba
Packager:      Silvan Calarco <silvan.calarco@...>
Source1:       java-tidy.script
Patch0:        java-tidy-04aug2000-noapis.patch
License:       zlib
BuildRequires: apache-ant
BuildRequires: apache-ant-junit
%if "%{stage1}" != "1"
BuildRequires: java-slf4j
BuildRequires: jpackage-utils
BuildRequires: xerces-j2
BuildRequires: xml-commons-apis
Requires:      jpackage-utils
Requires:      xerces-j2
Requires:      xml-commons-apis
BuildRoot:     %{_tmppath}/%{name}-%{version}-root

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 interface to the document that is being processed, which effectively makes you able to use JTidy as a DOM parser for real-world HTML.

JTidy was written by Andy Quick, who later stepped down from the maintainer position. Now JTidy is maintained by a group of volunteers.

%package javadoc
Group:          Documentation
Summary:        Javadoc for %{name}

%description javadoc
JTidy - HTML syntax checker and pretty printer.

This package contains API documentation for %{name}.

%package scripts
Summary:        Utility scripts for %{name}
Group:          Applications/Web
Requires:       %{name} = %{version}-%{release}

%description scripts
JTidy - HTML syntax checker and pretty printer.

This package contains utility scripts for %{name}.

%package gcj
Summary:       GCJ %{name} support
Group:         System/Libraries/Java
BuildRequires: java-gcj-compat
BuildRequires: libgcj4-devel
Requires:      %{name} = %{?epoch:%epoch:}%{version}-%{release}
Requires:      java-gcj-compat
Requires:      jpackage-utils

%description gcj
JTidy - HTML syntax checker and pretty printer.

This package contains GCJ %{name} support.


%setup -q -n jtidy-%{version}%{rel}-dev
%patch0 -p1
sed -i "s:enum:mune:" src/org/w3c/tidy/

find . -name "*.jar" -exec rm -f {} \;

chmod -R go=u-w *


export JAVA_HOME=%javahome
export MAVEN_REPO_LOCAL=$PWD/.m2/repository
export ANT_OPTS="-Xss1m"
export CLASSPATH=""
%if "%{stage1}" != "1"
CLASSPATH=$CLASSPATH:$(build-classpath slf4j xerces-j2 xml-commons-jaxp-1.3-apis):$PWD/target/classes
CLASSPATH=$CLASSPATH:$(build-classpath xerces-j2 xml-commons-jaxp-1.3-apis):$PWD/target/classes
CLASSPATH=$CLASSPATH:$(build-classpath junit ant/ant-junit):$PWD/target/test-classes
export OPT_JAR_LIST="junit "

ant \
   -Dbuild.sysclasspath=only \
   -Dmaven.mode.offline=true \
   -Dmaven.repo.local=$MAVEN_REPO_LOCAL \
   -Dmaven.test.skip=true \

[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"

mkdir -p %{buildroot}%{_javadir}
mkdir -p %{buildroot}%{_mavenpomdir}
cp -ap build/Tidy.jar %{buildroot}%{_javadir}/jtidy-%{tidy_ver}.jar

%add_to_maven_depmap jtidy jtidy 4aug2000r7-dev JPP jtidy
install -m 644 %{SOURCE2} %{buildroot}%{_mavenpomdir}/JPP-jtidy-4aug2000r7-dev.pom

  cd %{buildroot}%{_javadir}
  for jar in *-%{tidy_ver}.jar; do
    ln -s ${jar} `echo $jar| sed "s|-%{tidy_ver}||g"`

mkdir -p %{buildroot}%{_javadocdir}/jtidy-%{tidy_ver}
cp -ap doc/api/* %{buildroot}%{_javadocdir}/jtidy-%{tidy_ver}

  cd %{buildroot}%{_javadocdir} 
  ln -s jtidy-%{tidy_ver} jtidy

mkdir -p %{buildroot}%{_bindir}
install -m 755 %{S:1} %{buildroot}%{_bindir}/jtidy

mkdir -p  %{buildroot}%{_sysconfdir}/ant.d
cat > %{buildroot}%{_sysconfdir}/ant.d/jtidy << EOF
jtidy xml-commons-apis


[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"



%config(noreplace) %{_sysconfdir}/ant.d/jtidy
%doc LICENSE NOTES doc/devel

%files javadoc

%files scripts

%post gcj
if [ -x %{_bindir}/rebuild-gcj-db ]; then

%postun gcj
if [ -x %{_bindir}/rebuild-gcj-db ]; then

%files gcj

* Sat Mar 12 2011 gil <puntogil@...> 04aug2000-3mamba
- rebuilt with java-gcj-compat support

* Mon Jun 29 2009 gil <puntogil@...> 04aug2000-2mamba
- added java-slf4j support

* Wed Feb 25 2009 gil <puntogil@...> 04aug2000-1mamba
- package created by autospec