Репозитории ALT
S: | 1.0-alt3_0.35.20100930svn1125jpp11 |
5.1: | 8.0-alt1_0.813.1jpp5 |
4.1: | 1.0-alt2_0.20000804r7dev.8jpp1.7 |
4.0: | 1.0-alt2_0.20000804r7dev.8jpp1.7 |
3.0: | 1.0-alt0.2 |
Группа :: Разработка/Java
Пакет: jtidy
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
BuildRequires: /proc
BuildRequires: jpackage-1.4-compat
# Copyright (c) 2000-2007, JPackage Project
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the
# distribution.
# 3. Neither the name of the JPackage Project nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
%define gcj_support 0
Summary: HTML syntax checker and pretty printer
Name: jtidy
Version: 1.0
Release: alt2_0.20000804r7dev.8jpp1.7
Epoch: 1
License: BSD-style
URL: http://jtidy.sourceforge.net/
Source0: http://download.sf.net/jtidy/jtidy-04aug2000r7-dev.tar.bz2
Source1: %{name}.jtidy.script
Patch0: %{name}.noapis.patch
Requires: jaxp_parser_impl
Requires: xml-commons-apis
BuildRequires: ant >= 0:1.6
BuildRequires: jpackage-utils >= 0:1.5
BuildRequires: xml-commons-apis
Group: Development/Java
%if ! %{gcj_support}
BuildArch: noarch
%endif
%if %{gcj_support}
BuildRequires: gnu-crypto
BuildRequires: java-gcj-compat-devel
Requires(post): java-gcj-compat
Requires(postun): java-gcj-compat
%endif
%description
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 javadoc
Group: Development/Documentation
Summary: Javadoc for %{name}
%description javadoc
Javadoc for %{name}.
%package scripts
Summary: Utility scripts for %{name}
Group: Development/Java
Requires: jpackage-utils >= 0:1.5
Requires: %{name} = %{epoch}:%{version}-%{release}
%description scripts
Utility scripts for %{name}.
%prep
%setup -q -n %{name}-04aug2000r7-dev
%patch0 -p0
# remove all binary libs, javadocs, and included JAXP API sources
find . -name "*.jar" -exec %__rm -f {} \;
%__rm -rf doc/api src/org/xml src/org/w3c/dom
# correct silly permissions
%__chmod -R go=u-w *
%build
export CLASSPATH=$(build-classpath xml-commons-apis)
%ant jar javadoc
%install
%__rm -rf %{buildroot}
# jar
%__mkdir_p %{buildroot}%{_javadir}
%__cp -a build/Tidy.jar %{buildroot}%{_javadir}/%{name}-%{version}.jar
# jar versioning
(cd %{buildroot}%{_javadir} && for jar in *-%{version}.jar; do \
%__ln_s ${jar} `echo $jar| %__sed "s|-%{version}||g"`; done)
# javadoc
%__mkdir_p %{buildroot}%{_javadocdir}/%{name}-%{version}
%__cp -a doc/api/* %{buildroot}%{_javadocdir}/%{name}-%{version}
(cd %{buildroot}%{_javadocdir} && %__ln_s %{name}-%{version} %{name})
# shell script
%__mkdir_p %{buildroot}%{_bindir}
%__cp -a %{SOURCE1} %{buildroot}%{_bindir}/%{name}
# ant.d
%__mkdir_p %{buildroot}%{_sysconfdir}/ant.d
%__cat > %{buildroot}%{_sysconfdir}/ant.d/%{name} << EOF
jtidy xml-commons-apis
EOF
%if %{gcj_support}
export CLASSPATH=$(build-classpath gnu-crypto)
%{_bindir}/aot-compile-rpm
%endif
chmod 755 $RPM_BUILD_ROOT%{_bindir}/*
%clean
%__rm -rf %{buildroot}
%post javadoc
%__rm -f %{_javadocdir}/%{name}
%__ln_s %{name}-%{version} %{_javadocdir}/%{name}
%postun javadoc
if [ $1 -eq 0 ]; then
%__rm -f %{_javadocdir}/%{name}
fi
%if %{gcj_support}
%post
if [ -x %{_bindir}/rebuild-gcj-db ]
then
%{_bindir}/rebuild-gcj-db
fi
%endif
%if %{gcj_support}
%postun
if [ -x %{_bindir}/rebuild-gcj-db ]
then
%{_bindir}/rebuild-gcj-db
fi
%endif
%files
%doc LICENSE NOTES doc/devel
%{_javadir}/*
%config(noreplace) %{_sysconfdir}/ant.d/%{name}
%if %{gcj_support}
%{_libdir}/gcj/%{name}
%endif
%files javadoc
%dir %{_javadocdir}/%{name}-%{version}
%{_javadocdir}/%{name}-%{version}/*
%ghost %dir %{_javadocdir}/%{name}
%files scripts
#%defattr(0755,root,root,0755)
%{_bindir}/*
%changelog
…
Полный changelog можно просмотреть здесь
BuildRequires: jpackage-1.4-compat
# Copyright (c) 2000-2007, JPackage Project
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the
# distribution.
# 3. Neither the name of the JPackage Project nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
%define gcj_support 0
Summary: HTML syntax checker and pretty printer
Name: jtidy
Version: 1.0
Release: alt2_0.20000804r7dev.8jpp1.7
Epoch: 1
License: BSD-style
URL: http://jtidy.sourceforge.net/
Source0: http://download.sf.net/jtidy/jtidy-04aug2000r7-dev.tar.bz2
Source1: %{name}.jtidy.script
Patch0: %{name}.noapis.patch
Requires: jaxp_parser_impl
Requires: xml-commons-apis
BuildRequires: ant >= 0:1.6
BuildRequires: jpackage-utils >= 0:1.5
BuildRequires: xml-commons-apis
Group: Development/Java
%if ! %{gcj_support}
BuildArch: noarch
%endif
%if %{gcj_support}
BuildRequires: gnu-crypto
BuildRequires: java-gcj-compat-devel
Requires(post): java-gcj-compat
Requires(postun): java-gcj-compat
%endif
%description
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 javadoc
Group: Development/Documentation
Summary: Javadoc for %{name}
%description javadoc
Javadoc for %{name}.
%package scripts
Summary: Utility scripts for %{name}
Group: Development/Java
Requires: jpackage-utils >= 0:1.5
Requires: %{name} = %{epoch}:%{version}-%{release}
%description scripts
Utility scripts for %{name}.
%prep
%setup -q -n %{name}-04aug2000r7-dev
%patch0 -p0
# remove all binary libs, javadocs, and included JAXP API sources
find . -name "*.jar" -exec %__rm -f {} \;
%__rm -rf doc/api src/org/xml src/org/w3c/dom
# correct silly permissions
%__chmod -R go=u-w *
%build
export CLASSPATH=$(build-classpath xml-commons-apis)
%ant jar javadoc
%install
%__rm -rf %{buildroot}
# jar
%__mkdir_p %{buildroot}%{_javadir}
%__cp -a build/Tidy.jar %{buildroot}%{_javadir}/%{name}-%{version}.jar
# jar versioning
(cd %{buildroot}%{_javadir} && for jar in *-%{version}.jar; do \
%__ln_s ${jar} `echo $jar| %__sed "s|-%{version}||g"`; done)
# javadoc
%__mkdir_p %{buildroot}%{_javadocdir}/%{name}-%{version}
%__cp -a doc/api/* %{buildroot}%{_javadocdir}/%{name}-%{version}
(cd %{buildroot}%{_javadocdir} && %__ln_s %{name}-%{version} %{name})
# shell script
%__mkdir_p %{buildroot}%{_bindir}
%__cp -a %{SOURCE1} %{buildroot}%{_bindir}/%{name}
# ant.d
%__mkdir_p %{buildroot}%{_sysconfdir}/ant.d
%__cat > %{buildroot}%{_sysconfdir}/ant.d/%{name} << EOF
jtidy xml-commons-apis
EOF
%if %{gcj_support}
export CLASSPATH=$(build-classpath gnu-crypto)
%{_bindir}/aot-compile-rpm
%endif
chmod 755 $RPM_BUILD_ROOT%{_bindir}/*
%clean
%__rm -rf %{buildroot}
%post javadoc
%__rm -f %{_javadocdir}/%{name}
%__ln_s %{name}-%{version} %{_javadocdir}/%{name}
%postun javadoc
if [ $1 -eq 0 ]; then
%__rm -f %{_javadocdir}/%{name}
fi
%if %{gcj_support}
%post
if [ -x %{_bindir}/rebuild-gcj-db ]
then
%{_bindir}/rebuild-gcj-db
fi
%endif
%if %{gcj_support}
%postun
if [ -x %{_bindir}/rebuild-gcj-db ]
then
%{_bindir}/rebuild-gcj-db
fi
%endif
%files
%doc LICENSE NOTES doc/devel
%{_javadir}/*
%config(noreplace) %{_sysconfdir}/ant.d/%{name}
%if %{gcj_support}
%{_libdir}/gcj/%{name}
%endif
%files javadoc
%dir %{_javadocdir}/%{name}-%{version}
%{_javadocdir}/%{name}-%{version}/*
%ghost %dir %{_javadocdir}/%{name}
%files scripts
#%defattr(0755,root,root,0755)
%{_bindir}/*
%changelog
…
Полный changelog можно просмотреть здесь