Fridrich Strba 2019-11-12 17:57:25 +00:00 committed by Git OBS Bridge
commit ad8a667703
9 changed files with 385 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

111
0002-Jar-paths.patch Normal file
View File

@ -0,0 +1,111 @@
From 03b255b50250861a630cd72cb3fae30c7f0f5987 Mon Sep 17 00:00:00 2001
From: Michael Simacek <msimacek@redhat.com>
Date: Tue, 14 Jul 2015 11:20:59 +0200
Subject: [PATCH 2/3] Jar paths
---
build.xml | 20 +++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)
diff --git a/build.xml b/build.xml
index d36f42b..1f00059 100644
--- a/build.xml
+++ b/build.xml
@@ -54,7 +54,7 @@
<property name="maven-staging-repository-url" value="https://oss.sonatype.org/service/local/staging/deploy/maven2/" />
<!-- DEPENDENCIES -->
- <available property='bcel.available' file='${lib.dir}/bcel-5.2.jar' />
+ <available property='bcel.available' file='${lib.dir}/bcel.jar' />
<property name="xerces.version" value="2.9.1"/>
@@ -83,7 +83,7 @@
source='${compile.source}' target='${compile.target}'
includeAntRuntime='false'>
<classpath>
- <fileset dir='${lib.dir}/xerces-@{xercesVersion}' includes='*.jar' />
+ <fileset dir='${lib.dir}' includes='xerces-j2.jar' />
</classpath>
<src path='${src.dir}' />
<src path='${build.src.dir}' />
@@ -94,7 +94,7 @@
source='${compile.source}' target='${compile.target}'
includeAntRuntime='false'>
<classpath>
- <fileset dir='${lib.dir}/xerces-@{xercesVersion}' includes='*.jar' />
+ <fileset dir='${lib.dir}' includes='xerces-j2.jar' />
</classpath>
<src path='${src.dir}' />
<src path='${build.src.dir}' />
@@ -108,12 +108,14 @@
unless="compile.skip">
<mkdir dir="${build.classes.dir}"/>
+ <!--
<compileWith xercesVersion="2.0.2" bridge="2_0"/>
<compileWith xercesVersion="2.1.0" bridge="2_1"/>
<compileWith xercesVersion="2.2.1" bridge="2_2"/>
<compileWith xercesVersion="2.3.0" bridge="2_3"/>
<compileWith xercesVersion="2.8.1" bridge="2_3"/>
<compileWith xercesVersion="2.9.1" bridge="2_3"/>
+ -->
<compileWith xercesVersion="2.10.0" bridge="2_3"/>
<copy todir="${build.classes.dir}">
@@ -236,7 +238,7 @@ public class Version {
<java classname='org.apache.tools.ant.Main'>
<classpath>
<pathelement path='${java.class.path}' />
- <pathelement location='${lib.dir}/bcel-5.2.jar' />
+ <pathelement location='${lib.dir}/bcel.jar' />
</classpath>
<arg value='x-minimal' />
</java>
@@ -277,7 +279,7 @@ public class Version {
source='${compile.source}' target='${compile.target}'
includeAntRuntime='true'>
<classpath>
- <fileset dir='${lib.dir}' includes='xml-apis.jar,xerces*.jar, junit*.jar' />
+ <fileset dir='${lib.dir}' includes='xml-commons-apis.jar,xerces-j2.jar, junit.jar' />
<pathelement location='${build.classes.dir}' />
</classpath>
<src path='${src.test.dir}' />
@@ -298,8 +300,8 @@ public class Version {
<classpath>
<pathelement path='${build.test-classes.dir}'/>
<pathelement location='${build.classes.dir}' />
- <fileset dir='${lib.dir}' includes='junit*.jar' />
- <fileset dir='${lib.dir}/xerces-@{xercesVersion}' includes='*.jar' />
+ <fileset dir='${lib.dir}' includes='junit.jar' />
+ <fileset dir='${lib.dir}' includes='xerces-j2.jar' />
</classpath>
<formatter type="xml"/>
@@ -318,13 +320,13 @@ public class Version {
<mkdir dir="${build.dir}/junit"/>
<testWith xercesVersion="2.11.0"/>
+ <!--
<testWith xercesVersion="2.10.0"/>
<testWith xercesVersion="2.9.1"/>
<testWith xercesVersion="2.8.1"/>
<testWith xercesVersion="2.3.0"/>
<testWith xercesVersion="2.2.1"/>
<testWith xercesVersion="minimal"/>
- <!--
<testWith xercesVersion="2.1.0"/>
<testWith xercesVersion="2.0.2"/>
-->
@@ -397,7 +399,7 @@ public class Version {
</target>
<target name="-defineMavenAntTasks">
- <path id="maven-ant-tasks.classpath" path="lib/maven-ant-tasks-2.1.3.jar" />
+ <path id="maven-ant-tasks.classpath" path="lib/maven-ant-tasks.jar" />
<typedef resource="org/apache/maven/artifact/ant/antlib.xml" uri="urn:maven-artifact-ant"
classpathref="maven-ant-tasks.classpath" />
<artifact:pom id="maven.project" file="pom.xml" />
--
2.1.0

View File

@ -0,0 +1,27 @@
From 1cbc54dc98b762c4ba3b1daffc2cf5a1116732ef Mon Sep 17 00:00:00 2001
From: Michael Simacek <msimacek@redhat.com>
Date: Tue, 14 Jul 2015 11:21:21 +0200
Subject: [PATCH 3/3] Add OSGi attributes
---
build.xml | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/build.xml b/build.xml
index 1f00059..194b0bf 100644
--- a/build.xml
+++ b/build.xml
@@ -129,6 +129,10 @@
<jar jarfile='${jar.file}'>
<manifest>
<attribute name="Built-By" value="${author}"/>
+ <attribute name="Bundle-SymbolicName" value="${package}" />
+ <attribute name="Bundle-Version" value="${version}" />
+ <attribute name="Export-Package" value="org.cyberneko.html,org.cyberneko.html.filters,org.cyberneko.html.parsers,org.cyberneko.html.xercesbridge" />
+ <attribute name="Import-Package" value="org.apache.xerces.util,org.apache.xerces.xni,org.apache.xerces.xni.parser,org.apache.xerces.impl" />
<section name="org/cyberneko/html/">
<attribute name="Specification-Title" value="Hyper-Text Markup Language (HTML)" />
<attribute name="Specification-Version" value="4.01" />
--
2.1.0

45
nekohtml-1.9.22.pom Normal file
View File

@ -0,0 +1,45 @@
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>net.sourceforge.nekohtml</groupId>
<artifactId>nekohtml</artifactId>
<name>Neko HTML</name>
<description>An HTML parser and tag balancer.</description>
<version>1.9.22</version>
<url>http://nekohtml.sourceforge.net/</url>
<licenses>
<license>
<name>The Apache Software License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
</license>
</licenses>
<scm>
<url>http://nekohtml.svn.sourceforge.net/viewvc/nekohtml/</url>
</scm>
<dependencies>
<dependency>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
<version>2.11.0</version>
</dependency>
</dependencies>
<developers>
<developer>
<name>Andy Clark</name>
</developer>
<developer>
<name>Marc Guillemot</name>
<id>mguillem</id>
<email>mguillem@users.sourceforge.net</email>
<url>http://mguillem.wordpress.com/</url>
<timezone>+1</timezone>
</developer>
</developers>
<distributionManagement>
<repository>
<id>nexus-releases</id>
<name>Nexus Release Repository</name>
<url>http://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>
</project>

3
nekohtml-1.9.22.tar.xz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:5e4e704d801d38d1407b415d3ed0a75e5b4f5f676e1e17c1e1248b226de9507f
size 129868

View File

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="">
<component id="nekohtml"
licenseType=""
version="@VERSION@"
tag="@TAG@"
description=""
>
<artifact id="nekohtml.jar"/>
<export>
<include input="nekohtml.jar"/>
</export>
</component>
</project>

23
nekohtml-filter.sh Normal file
View File

@ -0,0 +1,23 @@
#!/bin/sh
#
# nekohtml filter script
# JPackage Project <http://www.jpackage.org/>
# Source functions library
if [ -f /usr/share/java-utils/java-functions ] ; then
. /usr/share/java-utils/java-functions
else
echo "Can't find functions library, aborting"
exit 1
fi
# Configuration
MAIN_CLASS=org.cyberneko.html.filters.Writer
BASE_JARS="nekohtml xerces-j2"
# Set parameters
set_jvm
set_classpath $BASE_JARS
# Let's start
run "$@"

4
nekohtml.changes Normal file
View File

@ -0,0 +1,4 @@
-------------------------------------------------------------------
Tue Nov 12 17:56:43 UTC 2019 - Fridrich Strba <fstrba@suse.com>
- Initial packaging of nekohtml 1.9.22

130
nekohtml.spec Normal file
View File

@ -0,0 +1,130 @@
#
# spec file for package nekohtml
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2000-2009, JPackage Project
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: nekohtml
Version: 1.9.22
Release: 0
Summary: HTML scanner and tag balancer
License: Apache-2.0
Group: Development/Libraries/Java
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.xz nekohtml-1.9.22/
Source0: %{name}-%{version}.tar.xz
Source2: nekohtml-component-info.xml
Source3: http://central.maven.org/maven2/net/sourceforge/%{name}/%{name}/%{version}/%{name}-%{version}.pom
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
BuildRequires: ant
BuildRequires: ant-junit
BuildRequires: bcel
BuildRequires: fdupes
BuildRequires: javapackages-local
BuildRequires: xerces-j2 >= 2.7.1
BuildRequires: xml-apis
BuildRequires: xmvn-install
BuildRequires: xmvn-resolve
Requires: bcel
Requires: xerces-j2 >= 2.7.1
Requires: xml-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}
Group: Documentation/HTML
%description javadoc
Javadoc for %{name}.
%package demo
Summary: Demo for %{name}
Group: Development/Libraries/Java
Requires: %{name} = %{version}-%{release}
%description demo
Demonstrations and samples for %{name}.
%prep
%setup -q
%patch1 -p1
%patch2 -p1
find -name "*.jar" -delete
sed -i 's/\r$//g' *.txt doc/*.html
# 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-apis)
%{ant} \
-Dcompile.source=1.6 -Dcompile.target=1.6 \
-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 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
%fdupes -s %{buildroot}%{_javadocdir}
# Scripts
%jpackage_script org.cyberneko.html.filters.Writer "" "" "nekohtml:xerces-j2" nekohtml-filter true
%files -f .mfiles
%license LICENSE.txt
%doc README.txt doc/*.html
%{_bindir}/%{name}-filter
%files javadoc -f .mfiles-javadoc
%files demo -f .mfiles-demo
%changelog