bd64b72
# Copyright (c) 2000-2007, JPackage Project
bd64b72
# All rights reserved.
bd64b72
#
bd64b72
# Redistribution and use in source and binary forms, with or without
bd64b72
# modification, are permitted provided that the following conditions
bd64b72
# are met:
bd64b72
#
bd64b72
# 1. Redistributions of source code must retain the above copyright
bd64b72
#    notice, this list of conditions and the following disclaimer.
bd64b72
# 2. Redistributions in binary form must reproduce the above copyright
bd64b72
#    notice, this list of conditions and the following disclaimer in the
bd64b72
#    documentation and/or other materials provided with the
bd64b72
#    distribution.
bd64b72
# 3. Neither the name of the JPackage Project nor the names of its
bd64b72
#    contributors may be used to endorse or promote products derived
bd64b72
#    from this software without specific prior written permission.
bd64b72
#
bd64b72
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
bd64b72
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
bd64b72
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
bd64b72
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
bd64b72
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
bd64b72
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
bd64b72
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
bd64b72
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
bd64b72
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
bd64b72
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
bd64b72
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
bd64b72
#
bd64b72
bd64b72
%define gcj_support 1
bd64b72
bd64b72
Summary:        HTML syntax checker and pretty printer
bd64b72
Name:           jtidy
bd64b72
Version:        1.0
1e54b70
Release:        0.1.r7dev.1jpp.2%{?dist}
bd64b72
Epoch:          2
bd64b72
License:        BSD-Style
bd64b72
URL:            http://jtidy.sourceforge.net/
bd64b72
Source0:        http://download.sf.net/jtidy/jtidy-04aug2000r7-dev.zip
bd64b72
Source1:        %{name}.jtidy.script
bd64b72
Patch0:         %{name}.noapis.patch
bd64b72
Requires:       jaxp_parser_impl
bd64b72
Requires:       xml-commons-apis
bd64b72
Requires:       jpackage-utils
bd64b72
BuildRequires:  ant >= 0:1.6
bd64b72
BuildRequires:  jpackage-utils >= 0:1.5
bd64b72
BuildRequires:       xml-commons-apis
bd64b72
Group:          Text Processing/Markup/HTML
bd64b72
%if ! %{gcj_support}
bd64b72
BuildArch:      noarch
bd64b72
%endif
bd64b72
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
bd64b72
bd64b72
%if %{gcj_support}
bd64b72
BuildRequires:    java-gcj-compat-devel
bd64b72
Requires(post):   java-gcj-compat
bd64b72
Requires(postun): java-gcj-compat
bd64b72
%endif
bd64b72
bd64b72
%description
bd64b72
JTidy is a Java port of HTML Tidy, a HTML syntax checker and pretty
bd64b72
printer. Like its non-Java cousin, JTidy can be used as a tool for
bd64b72
cleaning up malformed and faulty HTML. In addition, JTidy provides a DOM
bd64b72
parser for real-world HTML.
bd64b72
bd64b72
%package javadoc
bd64b72
Group:          Documentation
bd64b72
Summary:        Javadoc for %{name}
bd64b72
Requires(post):   /bin/rm,/bin/ln
bd64b72
Requires(postun): /bin/rm
bd64b72
bd64b72
%description javadoc
bd64b72
Javadoc for %{name}.
bd64b72
bd64b72
%package scripts
bd64b72
Summary:        Utility scripts for %{name}
bd64b72
Group:          Text Processing/Markup/HTML
bd64b72
Requires:       jpackage-utils >= 0:1.5
bd64b72
Requires:       %{name} = %{epoch}:%{version}-%{release}
bd64b72
bd64b72
%description scripts
bd64b72
Utility scripts for %{name}.
bd64b72
bd64b72
%prep
bd64b72
%setup -q -n %{name}-04aug2000r7-dev
bd64b72
%patch0 -p0
bd64b72
# remove all binary libs and javadocs
bd64b72
find . -name "*.jar" -exec %__rm -f {} \;
bd64b72
# correct silly permissions
bd64b72
%__chmod -R go=u-w *
bd64b72
bd64b72
%build
bd64b72
export CLASSPATH=$(build-classpath xml-commons-apis)
bd64b72
%ant jar javadoc
bd64b72
bd64b72
%install
bd64b72
%__rm -rf %{buildroot}
bd64b72
bd64b72
# jar
bd64b72
%__mkdir_p %{buildroot}%{_javadir}
bd64b72
%__cp -ap build/Tidy.jar %{buildroot}%{_javadir}/%{name}-%{version}.jar
bd64b72
# jar versioning
bd64b72
(cd %{buildroot}%{_javadir} && for jar in *-%{version}.jar; do \
bd64b72
%__ln_s ${jar} `echo $jar| %__sed "s|-%{version}||g"`; done)
bd64b72
bd64b72
# javadoc
bd64b72
%__mkdir_p %{buildroot}%{_javadocdir}/%{name}-%{version}
bd64b72
%__cp -ap doc/api/* %{buildroot}%{_javadocdir}/%{name}-%{version}
bd64b72
(cd %{buildroot}%{_javadocdir} && %__ln_s %{name}-%{version} %{name})
bd64b72
bd64b72
# shell script
bd64b72
%__mkdir_p %{buildroot}%{_bindir}
bd64b72
%__cp -ap %{SOURCE1} %{buildroot}%{_bindir}/%{name}
bd64b72
bd64b72
# ant.d
bd64b72
%__mkdir_p %{buildroot}%{_sysconfdir}/ant.d
bd64b72
%__cat > %{buildroot}%{_sysconfdir}/ant.d/%{name} << EOF
bd64b72
jtidy xml-commons-apis
bd64b72
EOF
bd64b72
bd64b72
%if %{gcj_support}
bd64b72
%{_bindir}/aot-compile-rpm
bd64b72
%endif
bd64b72
bd64b72
%clean
bd64b72
%__rm -rf %{buildroot}
bd64b72
bd64b72
%if %{gcj_support}
bd64b72
%post
bd64b72
if [ -x %{_bindir}/rebuild-gcj-db ]
bd64b72
then
bd64b72
  %{_bindir}/rebuild-gcj-db
bd64b72
fi
bd64b72
%endif
bd64b72
bd64b72
%if %{gcj_support}
bd64b72
%postun
bd64b72
if [ -x %{_bindir}/rebuild-gcj-db ]
bd64b72
then
bd64b72
  %{_bindir}/rebuild-gcj-db
bd64b72
fi
bd64b72
%endif
bd64b72
bd64b72
%files
bd64b72
%defattr(0644,root,root,0755)
bd64b72
%doc LICENSE NOTES doc/devel
bd64b72
%{_javadir}/*
bd64b72
%config(noreplace) %{_sysconfdir}/ant.d/%{name}
bd64b72
%if %{gcj_support}
bd64b72
%attr(-,root,root) %{_libdir}/gcj/%{name}
bd64b72
%endif
bd64b72
bd64b72
%files javadoc
bd64b72
%defattr(0644,root,root,0755)
bd64b72
%{_javadocdir}/*
bd64b72
bd64b72
%files scripts
bd64b72
%defattr(0755,root,root,0755)
bd64b72
%{_bindir}/*
bd64b72
bd64b72
%changelog
1e54b70
* Fri Mar 16 2007 Thomas Fitzsimmons <fitzsim@redhat.com> - 2:1.0-0.1.r7dev.1jpp.2
1e54b70
- Remove gnu-crypto build requirement.
1e54b70
bd64b72
* Thu Feb 15 2007 Andrew Overholt <overholt@redhat.com> 2:1.0-0.1.r7dev.1jpp.1
bd64b72
- Don't remove JAXP APIs because we don't ship that version of
bd64b72
  xml-commons-apis anymore.
bd64b72
bd64b72
* Mon Feb 12 2007 Fernando Nasser <fnasser@redhat.com> 1:1.0-0.20000804r7dev.8jpp.1
bd64b72
- Import
bd64b72
bd64b72
* Mon Feb 12 2007 Fernando Nasser <fnasser@redhat.com> 1:1.0-0.20000804r7dev.8jpp
bd64b72
- Fix duplicate requires and missing build requires for xml-commons-apis
bd64b72
bd64b72
* Mon Feb 12 2007 Ralph Apel <r.apel at r-apel.de> 1:1.0-0.20000804r7dev.7jpp
bd64b72
- Add gcj_support option
bd64b72
bd64b72
* Thu Jun 01 2006 Fernando Nasser <fnasser@redhat.org> 1:1.0-0.20000804r7dev.6jpp
bd64b72
- First JPP 1.7 build
bd64b72
bd64b72
* Tue Feb 22 2005 David Walluck <david@jpackage.org> 1:1.0-0.20000804r7dev.5jpp
bd64b72
- add ant conf
bd64b72
- own non-versioned javadoc symlink
bd64b72
- Requires: xml-commons-apis
bd64b72
- use build-classpath
bd64b72
- macros
bd64b72
bd64b72
* Sun Aug 23 2004 Randy Watler <rwatler at finali.com> - 1:1.0-0.20000804r7dev.4jpp
bd64b72
- Rebuild with ant-1.6.2
bd64b72
bd64b72
* Mon May  5 2003 Ville Skyttä <ville.skytta at iki.fi> - 1:1.0-0.20000804r7dev.3jpp
bd64b72
- Fix non-versioned javadoc symlinking.
bd64b72
bd64b72
* Mon Apr 21 2003 Ville Skyttä <ville.skytta at iki.fi> - 1:1.0-0.20000804r7dev.2jpp
bd64b72
- Rebuild for JPackage 1.5.
bd64b72
- Fix Group tags.
bd64b72
- Include non-versioned javadoc symlink.
bd64b72
- Scripts subpackage.
bd64b72
bd64b72
* Fri Aug 30 2002 Ville Skyttä <ville.skytta at iki.fi> 1:1.0-0.20000804r7dev.1jpp
bd64b72
- Change version to 1.0, put revision to release, add Epoch.
bd64b72
- Don't use included DOM and SAX, require jaxp_parser_impl.
bd64b72
- Add non-versioned jar symlink.
bd64b72
- Add shell script.
bd64b72
- Vendor, Distribution tags.
bd64b72
bd64b72
* Mon Jan 21 2002 Guillaume Rousse <guillomovitch@users.sourceforge.net> 20000804-0.r7dev.5jpp
bd64b72
- versioned dir for javadoc
bd64b72
- no dependencies for javadoc package
bd64b72
- section macro
bd64b72
bd64b72
* Mon Dec 17 2001 Guillaume Rousse <guillomovitch@users.sourceforge.net> 20000804-0.r7dev.4jpp
bd64b72
- new versioning scheme
bd64b72
- jar name is now jtidy.jar
bd64b72
- javadoc in javadoc package
bd64b72
bd64b72
* Wed Nov 21 2001 Christian Zoffoli <czoffoli@littlepenguin.org> 04aug2000r7-dev-3jpp
bd64b72
-  new jpp extension
bd64b72
-  compiled with xalan2
bd64b72
bd64b72
* Mon Nov 19 2001 Christian Zoffoli <czoffoli@littlepenguin.org> 04aug2000r7-dev-2jpp
bd64b72
-  fixed changelog
bd64b72
-  fixed license
bd64b72
bd64b72
* Mon Nov 19 2001 Christian Zoffoli <czoffoli@littlepenguin.org> 04aug2000r7-dev-1jpp
bd64b72
-  r7dev
bd64b72
bd64b72
* Mon Nov 19 2001 Christian Zoffoli <czoffoli@littlepenguin.org> 04aug2000r6-1jpp
bd64b72
-  first release