Sophie

Sophie

distrib > Mageia > 9 > armv7hl > media > core-release-src > by-pkgid > fb236886e0cc4b00fe866928be9f2965 > files > 7

nekohtml-1.9.22-6.mga9.src.rpm

# 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.22
Release:        %mkrel 6
Group:          Development/Java
Epoch:          0
Summary:        HTML scanner and tag balancer
License:        ASL 2.0
URL:            http://nekohtml.sourceforge.net/
# No upstream tarball for this release
# svn export svn://svn.code.sf.net/p/nekohtml/code/branches/nekohtml-1.9.22 nekohtml-1.9.22
# find nekohtml-1.9.22 -name '*.jar' -delete
# tar cjf nekohtml-1.9.22.tar.bz2 nekohtml-1.9.22/
Source0:        %{name}-%{version}.tar.bz2
Source2:        nekohtml-component-info.xml
Source3:        https://repo1.maven.org/maven2/net/sourceforge/%{name}/%{name}/%{version}/%{name}-%{version}.pom
Patch0:         0001-Crosslink-javadoc.patch
Patch1:         0002-Jar-paths.patch
# Add proper attributes to MANIFEST.MF file so bundle can be used by other OSGI bundles.
Patch2:         0003-Add-OSGi-attributes.patch

Requires:       xerces-j2
Requires:       xml-commons-apis
# Explicit requires for javapackages-tools since nekohtml-filter script
# uses /usr/share/java-utils/java-functions
Requires:       javapackages-tools
BuildRequires:  javapackages-local
BuildRequires:  ant
BuildRequires:  ant-junit
BuildRequires:  xerces-j2
BuildRequires:  xerces-j2-javadoc
BuildRequires:  xml-commons-apis

BuildArch:      noarch

%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}

%description javadoc
Javadoc for %{name}.

%package demo
Summary:        Demo for %{name}
Requires:       %{name} = %{epoch}:%{version}-%{release}

%description demo
Demonstrations and samples for %{name}.

%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1

find -name "*.jar" -delete
sed -i 's/\r$//g' *.txt doc/*.html

# disable javadoc linting
sed -i -e '/<\/javadoc>/i<arg value="-Xdoclint:none"\/>' build.xml

# cannonization test fails on some whitespace, TODO investigate
rm data/meta/test-meta-encoding3.html

%mvn_alias net.sourceforge.%{name}:%{name} %{name}:%{name}
%mvn_package net.sourceforge.%{name}:%{name}-samples demo
%mvn_file ':{*}' @1

%build
export CLASSPATH=$(build-classpath bcel xerces-j2 xml-commons-apis)
ant -Dcompile.source=1.8 -Dcompile.target=1.8 \
    -Dbuild.sysclasspath=first \
    -Dlib.dir=%{_javadir} \
    -Djar.file=%{name}.jar \
    -Djar.xni.file=%{name}-xni.jar \
    -Djar.samples.file=%{name}-samples.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 test doc
# test - disabled because it makes the build failing

%mvn_artifact %{SOURCE3} %{name}.jar
%mvn_artifact net.sourceforge.%{name}:%{name}-xni:%{version} %{name}-xni.jar
%mvn_artifact net.sourceforge.%{name}:%{name}-samples:%{version} %{name}-samples.jar

%install
%mvn_install -J build/doc/javadoc

# Scripts
%jpackage_script org.cyberneko.html.filters.Writer "" "" "nekohtml:xerces-j2" nekohtml-filter true

%files -f .mfiles
%doc LICENSE.txt README.txt doc/*.html
%{_bindir}/%{name}-filter

%files javadoc -f .mfiles-javadoc

%files demo -f .mfiles-demo




%changelog
* Sun Feb 27 2022 danf <danf> 0:1.9.22-6.mga9
+ Revision: 1786075
+ rebuild (emptylog)

* Mon Sep 07 2020 daviddavid <daviddavid> 0:1.9.22-6.mga8
+ Revision: 1623271
- Remove unneeded dep on bcel
- Allow building against Java 11

* Wed Feb 12 2020 umeabot <umeabot> 0:1.9.22-5.mga8
+ Revision: 1492292
- Mageia 8 Mass Rebuild

* Wed Sep 19 2018 umeabot <umeabot> 0:1.9.22-4.mga7
+ Revision: 1264661
- Mageia 7 Mass Rebuild
+ neoclust <neoclust>
- Second rebuild of the java stack

* Wed Feb 24 2016 neoclust <neoclust> 0:1.9.22-2.mga6
+ Revision: 977742
- First rebuild of the java stack
- sync package nekohtml with fedora

* Tue Feb 09 2016 umeabot <umeabot> 0:1.9.14-16.mga6
+ Revision: 952181
- Mageia 6 Mass Rebuild

* Mon Jan 19 2015 daviddavid <daviddavid> 0:1.9.14-15.mga5
+ Revision: 811490
- use .mfiles generated during build
- add docs on -javadoc and -demo subpackage

* Wed Oct 15 2014 umeabot <umeabot> 0:1.9.14-14.mga5
+ Revision: 750225
- Second Mageia 5 Mass Rebuild

* Tue Sep 16 2014 umeabot <umeabot> 0:1.9.14-13.mga5
+ Revision: 682827
- Mageia 5 Mass Rebuild

* Sat Oct 19 2013 umeabot <umeabot> 0:1.9.14-12.mga4
+ Revision: 535812
- Mageia 4 Mass Rebuild

* Fri Sep 20 2013 dmorgan <dmorgan> 0:1.9.14-11.mga4
+ Revision: 482626
- Rebuild against new javapackages

* Tue Sep 17 2013 dmorgan <dmorgan> 0:1.9.14-10.mga4
+ Revision: 481019
- Clean Spec file

* Sat Aug 03 2013 joequant <joequant> 0:1.9.14-6.mga4
+ Revision: 462958
- remove ant-nodeps and ant-trax
+ umeabot <umeabot>
- 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