# Copyright (c) 2000-2009, 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. # Name: nekohtml Version: 1.9.14 Release: %mkrel 5 Epoch: 0 Summary: HTML scanner and tag balancer License: ASL 2.0 URL: http://nekohtml.sourceforge.net/ Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz # http://www.jpackage.org/cgi-bin/viewvc.cgi/*checkout*/rpms/devel/nekohtml/nekohtml-filter.sh?root=jpackage&content-type=text%2Fplain Source1: %{name}-filter.sh Source2: nekohtml-component-info.xml Source3: http://repo1.maven.org/maven2/net/sourceforge/nekohtml/nekohtml/1.9.14/nekohtml-1.9.14.pom # http://repo1.maven.org/maven2/nekohtml/xercesMinimal/1.9.6.2/xercesMinimal-1.9.6.2.pom Source4: xercesMinimal-1.9.14.pom Patch0: %{name}-crosslink.patch Patch1: %{name}-jars.patch Patch2: nekohtml-x-minimal.patch Group: Development/Java Requires: bcel Requires: jpackage-utils >= 0:1.6 Requires: xerces-j2 >= 0:2.7.1 Requires: xml-commons-jaxp-1.3-apis BuildRequires: jpackage-utils BuildRequires: ant BuildRequires: ant-apache-bcel BuildRequires: ant-junit BuildRequires: ant-nodeps BuildRequires: java-javadoc BuildRequires: bcel BuildRequires: bcel-javadoc BuildRequires: xerces-j2 >= 0:2.7.1 BuildRequires: xerces-j2-javadoc BuildRequires: xercesjarv BuildRequires: xml-commons-jaxp-1.3-apis BuildRequires: java-rpmbuild BuildArch: noarch BuildRequires: java-devel >= 1.6.0 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root %description NekoHTML is a simple HTML scanner and tag balancer that enables application programmers to parse HTML documents and access the information using standard XML interfaces. The parser can scan HTML files and "fix up" many common mistakes that human (and computer) authors make in writing HTML documents. NekoHTML adds missing parent elements; automatically closes elements with optional end tags; and can handle mismatched inline element tags. NekoHTML is written using the Xerces Native Interface (XNI) that is the foundation of the Xerces2 implementation. This enables you to use the NekoHTML parser with existing XNI tools without modification or rewriting code. %package javadoc Summary: Javadoc for %{name} Group: Development/Java %description javadoc Javadoc for %{name}. %package demo Summary: Demo for %{name} Group: Development/Java Requires: %{name} = %{epoch}:%{version}-%{release} %description demo Demonstrations and samples for %{name}. %package xni Summary: xni jar for %{name} Group: Development/Java Requires: %{name} = %{version}-%{release} %description xni XNI jars for %{name}. %prep %setup -q %patch0 -p1 %patch1 -p1 %patch2 -p0 %{_bindir}/find . -name "*.jar" | %{_bindir}/xargs -t %{__rm} %{__perl} -pi -e 's/\r$//g' *.txt doc/*.html %{__rm} -r doc/javadoc ln -sf $(build-classpath xerces-j2) lib/ %build export CLASSPATH=$(build-classpath bcel xerces-j2 xercesjarv) export OPT_JAR_LIST="`%{__cat} %{_sysconfdir}/ant.d/{junit,apache-bcel}` ant/ant-nodeps xalan-j2 xalan-j2-serializer" %{ant} \ -Dbuild.sysclasspath=first \ -Dlib.dir=%{_javadir} \ -Djar.file=%{name}-%{version}.jar \ -Djar.xni.file=%{name}-xni-%{version}.jar \ -Djar.samples.file=%{name}-samples-%{version}.jar \ -Dbcel.javadoc=%{_javadocdir}/bcel \ -Dj2se.javadoc=%{_javadocdir}/java \ -Dxni.javadoc=%{_javadocdir}/xerces-j2-xni \ -Dxerces.javadoc=%{_javadocdir}/xerces-j2-impl \ clean jar jar-xni minimal x-minimal doc # test - disabled because it makes the build failing %install rm -rf $RPM_BUILD_ROOT # Jars install -d -m 755 $RPM_BUILD_ROOT%{_javadir} install -p -m 644 %{name}{,-samples,-xni}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/ ln -s %{name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}.jar ln -s %{name}-samples-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-samples.jar ln -s %{name}-xni-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-xni.jar # build require for shrinkwrap-resolver-impl-maven install -p -m 644 build/lib/xercesMinimal.jar $RPM_BUILD_ROOT%{_javadir}/ # Scripts install -Dpm 755 %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}/%{name}-filter # Javadocs install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} cp -a build/doc/javadoc/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name} # POM install -d -m 755 $RPM_BUILD_ROOT%{_mavenpomdir} install -pm 644 %{SOURCE3} $RPM_BUILD_ROOT%{_mavenpomdir}/JPP-%{name}.pom install -pm 644 %{SOURCE4} $RPM_BUILD_ROOT%{_mavenpomdir}/JPP-xercesMinimal.pom # DEPMAP %add_maven_depmap JPP-%{name}.pom %{name}.jar %add_maven_depmap JPP-xercesMinimal.pom xercesMinimal.jar %post %update_maven_depmap %postun %update_maven_depmap %files %doc LICENSE.txt README.txt doc/*.html %attr(755,root,root) %{_bindir}/%{name}-filter %{_javadir}/%{name}-%{version}.jar %{_javadir}/%{name}.jar %{_javadir}/xercesMinimal.jar %{_mavenpomdir}/* %{_mavendepmapfragdir}/* %files javadoc %{_javadocdir}/%{name}-%{version} %{_javadocdir}/%{name} %files demo %{_javadir}/%{name}-samples-%{version}.jar %{_javadir}/%{name}-samples.jar %files xni %defattr(0644,root,root,0755) %{_javadir}/%{name}-xni-%{version}.jar %{_javadir}/%{name}-xni.jar %changelog * Sat Jan 12 2013 umeabot <umeabot> 0:1.9.14-5.mga3 + Revision: 360894 - Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild * Wed Jan 09 2013 solbu <solbu> 0:1.9.14-4.mga3 + Revision: 343323 - Fix BuildRequires * Thu Aug 11 2011 gil <gil> 0:1.9.14-3.mga2 + Revision: 132719 - added maven2 poms + dmorgan <dmorgan> - Clean spec file * Tue Feb 01 2011 dmorgan <dmorgan> 0:1.9.14-2.mga1 + Revision: 45980 - Split xni ( from sshaw ) * Wed Jan 19 2011 dmorgan <dmorgan> 0:1.9.14-1.mga1 + Revision: 24642 - Add buildrequire - Add missing patches - New version ( Fedora ) * Tue Jan 18 2011 dmorgan <dmorgan> 0:1.9.6.1-0.0.4.mga1 + Revision: 21884 - imported package nekohtml