ALT Linux repos
S: | 1.0-alt3_0.35.20100930svn1125jpp11 |
5.0: | 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 |
Group :: Development/Java
RPM: jtidy
Main Changelog Spec Patches Sources Download Gear Bugs and FR Repocop
Packager: Igor Vlasenko <viy at altlinux.ru>
BuildRequires: /proc
BuildRequires: jpackage-compat
# Copyright (c) 2000-2008, 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 with() %{expand:%%{?with_%{1}:1}%%{!?with_%{1}:0}}
%define without() %{expand:%%{?with_%{1}:0}%%{!?with_%{1}:1}}
%define bcond_with() %{expand:%%{?_with_%{1}:%%global with_%{1} 1}}
%define bcond_without() %{expand:%%{!?_without_%{1}:%%global with_%{1} 1}}
%bcond_with maven
%define gcj_support 0
Name: jtidy
Version: 8.0
Release: alt1_0.813.1jpp5
Epoch: 2
Summary: HTML syntax checker and pretty printer
License: BSD
Group: Development/Java
URL: http://jtidy.sourceforge.net/
# svn export -r813 http://svn.sourceforge.net/svnroot/jtidy/trunk/jtidy/ jtidy
Source0: jtidy-r813.tar.bz2
Source1: %{name}.jtidy.script
Source2: build.xml
Source3: maven-build.properties
Source4: maven-build.xml
Requires: xerces-j2
Requires: xml-commons-jaxp-1.3-apis
BuildRequires: ant >= 0:1.6
BuildRequires: ant-junit
BuildRequires: jpackage-utils >= 0:1.5
BuildRequires: slf4j
BuildRequires: xerces-j2
BuildRequires: xml-commons-jaxp-1.3-apis
%if %{gcj_support}
BuildRequires: java-gcj-compat-devel
%else
BuildArch: noarch
%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}
%{__cp} -p %{SOURCE2} %{SOURCE3} %{SOURCE4} .
%build
export MAVEN_REPO_LOCAL=$(pwd)/.m2/repository
mkdir -p $MAVEN_REPO_LOCAL
export ANT_OPTS="-Xss1m"
export CLASSPATH=$(build-classpath junit slf4j xerces-j2 xml-commons-jaxp-1.3-apis):`pwd`/target/classes:`pwd`/target/test-classes
export OPT_JAR_LIST="junit ant/ant-junit"
%{ant} \
-Dbuild.sysclasspath=only \
-Dmaven.mode.offline=true \
-Dmaven.repo.local=$MAVEN_REPO_LOCAL \
-Dmaven.test.skip=true \
-Dmaven.test.error.ignore=true \
package javadoc
%install
%__rm -rf %{buildroot}
# jar
%__mkdir_p %{buildroot}%{_javadir}
%__cp -a target/jtidy-8.0-SNAPSHOT.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 target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name}-%{version}
%__ln_s %{name}-%{version} %{buildroot}%{_javadocdir}/%{name}
# shell script
%__mkdir_p %{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
jtidy xerces-j2 xml-commons-jaxp-1.3-apis
EOF
%if %{gcj_support}
%{_bindir}/aot-compile-rpm
%endif
chmod 755 $RPM_BUILD_ROOT%{_bindir}/*
%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.txt
%{_javadir}/%{name}.jar
%{_javadir}/%{name}-%{version}.jar
%config(noreplace) %{_sysconfdir}/ant.d/%{name}
%if %{gcj_support}
%dir %{_libdir}/gcj/%{name}
%{_libdir}/gcj/%{name}/*
%endif
%files javadoc
%{_javadocdir}/%{name}-%{version}
%{_javadocdir}/%{name}
%files scripts
#%defattr(0755,root,root,0755)
%{_bindir}/*
%changelog
…
Full changelog you can see here
BuildRequires: /proc
BuildRequires: jpackage-compat
# Copyright (c) 2000-2008, 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 with() %{expand:%%{?with_%{1}:1}%%{!?with_%{1}:0}}
%define without() %{expand:%%{?with_%{1}:0}%%{!?with_%{1}:1}}
%define bcond_with() %{expand:%%{?_with_%{1}:%%global with_%{1} 1}}
%define bcond_without() %{expand:%%{!?_without_%{1}:%%global with_%{1} 1}}
%bcond_with maven
%define gcj_support 0
Name: jtidy
Version: 8.0
Release: alt1_0.813.1jpp5
Epoch: 2
Summary: HTML syntax checker and pretty printer
License: BSD
Group: Development/Java
URL: http://jtidy.sourceforge.net/
# svn export -r813 http://svn.sourceforge.net/svnroot/jtidy/trunk/jtidy/ jtidy
Source0: jtidy-r813.tar.bz2
Source1: %{name}.jtidy.script
Source2: build.xml
Source3: maven-build.properties
Source4: maven-build.xml
Requires: xerces-j2
Requires: xml-commons-jaxp-1.3-apis
BuildRequires: ant >= 0:1.6
BuildRequires: ant-junit
BuildRequires: jpackage-utils >= 0:1.5
BuildRequires: slf4j
BuildRequires: xerces-j2
BuildRequires: xml-commons-jaxp-1.3-apis
%if %{gcj_support}
BuildRequires: java-gcj-compat-devel
%else
BuildArch: noarch
%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}
%{__cp} -p %{SOURCE2} %{SOURCE3} %{SOURCE4} .
%build
export MAVEN_REPO_LOCAL=$(pwd)/.m2/repository
mkdir -p $MAVEN_REPO_LOCAL
export ANT_OPTS="-Xss1m"
export CLASSPATH=$(build-classpath junit slf4j xerces-j2 xml-commons-jaxp-1.3-apis):`pwd`/target/classes:`pwd`/target/test-classes
export OPT_JAR_LIST="junit ant/ant-junit"
%{ant} \
-Dbuild.sysclasspath=only \
-Dmaven.mode.offline=true \
-Dmaven.repo.local=$MAVEN_REPO_LOCAL \
-Dmaven.test.skip=true \
-Dmaven.test.error.ignore=true \
package javadoc
%install
%__rm -rf %{buildroot}
# jar
%__mkdir_p %{buildroot}%{_javadir}
%__cp -a target/jtidy-8.0-SNAPSHOT.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 target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name}-%{version}
%__ln_s %{name}-%{version} %{buildroot}%{_javadocdir}/%{name}
# shell script
%__mkdir_p %{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
jtidy xerces-j2 xml-commons-jaxp-1.3-apis
EOF
%if %{gcj_support}
%{_bindir}/aot-compile-rpm
%endif
chmod 755 $RPM_BUILD_ROOT%{_bindir}/*
%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.txt
%{_javadir}/%{name}.jar
%{_javadir}/%{name}-%{version}.jar
%config(noreplace) %{_sysconfdir}/ant.d/%{name}
%if %{gcj_support}
%dir %{_libdir}/gcj/%{name}
%{_libdir}/gcj/%{name}/*
%endif
%files javadoc
%{_javadocdir}/%{name}-%{version}
%{_javadocdir}/%{name}
%files scripts
#%defattr(0755,root,root,0755)
%{_bindir}/*
%changelog
…
Full changelog you can see here