From 1bd0f826ff5f07042e1c63edc3ce9ec70a61bc24666708764d7efaed64ec751e Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Tue, 24 Sep 2024 09:54:35 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/Java:packages/kxml?expand=0&rev=11 --- .gitattributes | 23 +++++++++ .gitignore | 1 + 0001-Unbundle-xpp3-classes.patch | 34 ++++++++++++ create-tarball.sh | 21 ++++++++ kxml-2.3.0-OSGI-MANIFEST.MF | 12 +++++ kxml-2.3.0-clean.tar.xz | 3 ++ kxml-2.3.0-fix_build.patch | 55 ++++++++++++++++++++ kxml.changes | 28 ++++++++++ kxml.spec | 89 ++++++++++++++++++++++++++++++++ kxml2-2.3.0.pom | 32 ++++++++++++ kxml2-min-2.3.0.pom | 32 ++++++++++++ 11 files changed, 330 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 0001-Unbundle-xpp3-classes.patch create mode 100644 create-tarball.sh create mode 100644 kxml-2.3.0-OSGI-MANIFEST.MF create mode 100644 kxml-2.3.0-clean.tar.xz create mode 100644 kxml-2.3.0-fix_build.patch create mode 100644 kxml.changes create mode 100644 kxml.spec create mode 100644 kxml2-2.3.0.pom create mode 100644 kxml2-min-2.3.0.pom diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -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 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/0001-Unbundle-xpp3-classes.patch b/0001-Unbundle-xpp3-classes.patch new file mode 100644 index 0000000..2314cef --- /dev/null +++ b/0001-Unbundle-xpp3-classes.patch @@ -0,0 +1,34 @@ +From 4163fd75bd60cf559cfb677194a8bfbef2b60f98 Mon Sep 17 00:00:00 2001 +From: Mikolaj Izdebski +Date: Tue, 19 Jan 2016 10:35:19 +0100 +Subject: [PATCH] Unbundle xpp3 classes + +--- + build.xml | 4 ---- + 1 file changed, 4 deletions(-) + +diff --git a/build.xml b/build.xml +index 780e516..bbc4536 100644 +--- a/build.xml ++++ b/build.xml +@@ -41,8 +41,6 @@ + + + +- +- + + + + + +- +- + + + +-- +2.5.0 + diff --git a/create-tarball.sh b/create-tarball.sh new file mode 100644 index 0000000..18e3dc7 --- /dev/null +++ b/create-tarball.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +if [ $# -ne 1 ]; then + echo "Usage: ./create-tarball VERSION" + exit 1 +fi + +VERSION=${1} +NAME="kxml" + +wget https://downloads.sourceforge.net/sourceforge/${NAME}/${NAME}2-src-${VERSION}.zip +unzip -d ${NAME}-${VERSION} ${NAME}2-src-${VERSION}.zip +rm ${NAME}2-src-${VERSION}.zip + +( cd ${NAME}-${VERSION} + find . -name "*.jar" -delete + rm -Rf bin/ dist/* www/ samples_midp/ samples/ contrib/ +) + +tar cJvf ${NAME}-${VERSION}-clean.tar.xz ./${NAME}-${VERSION} + diff --git a/kxml-2.3.0-OSGI-MANIFEST.MF b/kxml-2.3.0-OSGI-MANIFEST.MF new file mode 100644 index 0000000..79a4d22 --- /dev/null +++ b/kxml-2.3.0-OSGI-MANIFEST.MF @@ -0,0 +1,12 @@ +Bundle-SymbolicName: org.kxml2 +Export-Package: org.kxml2.io;version="2.3.0", + org.kxml2.kdom;version="2.3.0", + org.kxml2.wap;version="2.3.0", + org.kxml2.syncml;version="2.3.0", + org.kxml2.wml;version="2.3.0", + org.kxml2.wv;version="2.3.0" +Import-Package: org.xmlpull.v1 +Bundle-Version: 2.3.0 +Bundle-Vendor: fedoraproject.org +Bundle-Name: kxml2-2.3.0 +Bundle-ManifestVersion: 2 diff --git a/kxml-2.3.0-clean.tar.xz b/kxml-2.3.0-clean.tar.xz new file mode 100644 index 0000000..41a8b13 --- /dev/null +++ b/kxml-2.3.0-clean.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:12e8212666bb90465a6dd7698f54282a0203cb668c28976f2f861d346924015f +size 29940 diff --git a/kxml-2.3.0-fix_build.patch b/kxml-2.3.0-fix_build.patch new file mode 100644 index 0000000..f0ba26e --- /dev/null +++ b/kxml-2.3.0-fix_build.patch @@ -0,0 +1,55 @@ +diff -urEbwB kxml-2.3.0/build.xml kxml-2.3.0.new/build.xml +--- kxml-2.3.0/build.xml 2006-06-22 18:31:10.000000000 +0200 ++++ kxml-2.3.0.new/build.xml 2018-11-22 14:49:47.427183267 +0100 +@@ -4,21 +4,29 @@ + + + ++ ++ + + + + + +- ++ doctitle="kxml API"> ++ ++ ++ ++ ++ ++ + + + +@@ -48,9 +56,15 @@ + ++ target="${javac.target}" ++ source="${javac.source}" ++ debuglevel="none"> ++ ++ ++ ++ ++ ++ + + + diff --git a/kxml.changes b/kxml.changes new file mode 100644 index 0000000..845dc0e --- /dev/null +++ b/kxml.changes @@ -0,0 +1,28 @@ +------------------------------------------------------------------- +Tue Sep 24 09:54:28 UTC 2024 - Fridrich Strba + +- Use SOURCE_DATE_EPOCH for reproducible builds + +------------------------------------------------------------------- +Wed Feb 21 14:28:34 UTC 2024 - Fridrich Strba + +- Use %patch -P N instead of deprecated %patchN. + +------------------------------------------------------------------- +Thu Apr 7 17:26:43 UTC 2022 - Fridrich Strba + +- Fetch the sources using https instead of http protocol + * fixes bsc#1182284 +- Create *.tar.xz instead of *.tar.gz + +------------------------------------------------------------------- +Wed Mar 23 07:07:25 UTC 2022 - Fridrich Strba + +- Modified patch: + * kxml-2.3.0-fix_build.patch + + specify java source and target levels 1.8 + +------------------------------------------------------------------- +Fri May 3 14:51:56 UTC 2019 - Fridrich Strba + +- Initial packaging of kxml 2.3.0 diff --git a/kxml.spec b/kxml.spec new file mode 100644 index 0000000..a9dadb5 --- /dev/null +++ b/kxml.spec @@ -0,0 +1,89 @@ +# +# spec file for package kxml +# +# Copyright (c) 2024 SUSE LLC +# Copyright (c) 2000-2008, 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: kxml +Version: 2.3.0 +Release: 0 +Summary: Small XML pull parser +License: MIT +Group: Development/Libraries/Java +URL: http://kxml.sourceforge.net/ +# ./create-tarball.sh %%{version} +Source0: %{name}-%{version}-clean.tar.xz +Source1: https://repo1.maven.org/maven2/net/sf/kxml/kxml2/%{version}/kxml2-%{version}.pom +Source2: https://repo1.maven.org/maven2/net/sf/kxml/kxml2-min/%{version}/kxml2-min-%{version}.pom +Source3: %{name}-%{version}-OSGI-MANIFEST.MF +Source100: create-tarball.sh +Patch0: 0001-Unbundle-xpp3-classes.patch +Patch1: kxml-2.3.0-fix_build.patch +BuildRequires: ant +BuildRequires: fdupes +BuildRequires: java-devel >= 1.8 +BuildRequires: javapackages-local +BuildRequires: xmvn-install +BuildRequires: xmvn-resolve +BuildRequires: xpp3 >= 1.1.3.1 +Requires: xpp3 >= 1.1.3.1 +BuildArch: noarch + +%description +kXML is a small XML pull parser, specially designed for constrained +environments such as Applets, Personal Java or MIDP devices. + +%package javadoc +Summary: Javadoc for %{name} +Group: Documentation/HTML + +%description javadoc +API documentation for %{name}. + +%prep +%setup -q +%patch -P 0 -p1 +%patch -P 1 -p1 + +%build +mkdir -p lib +build-jar-repository -s lib xpp3 +%{ant} + +jar \ +%if %{?pkg_vcmp:%pkg_vcmp java-devel >= 17}%{!?pkg_vcmp:0} + --date="$(date -u -d @${SOURCE_DATE_EPOCH:-$(date +%%s)} +%%Y-%%m-%%dT%%H:%%M:%%SZ)" \ +%endif + --update --file=dist/%{name}2-%{version}.jar --manifest=%{SOURCE3} + +%{mvn_artifact} %{SOURCE1} dist/%{name}2-%{version}.jar +%{mvn_artifact} %{SOURCE2} dist/%{name}2-min-%{version}.jar + +# Compat symlinks +%{mvn_file} :kxml2 kxml/kxml2 kxml +%{mvn_file} :kxml2-min kxml/kxml2-min kxml-min + +%install +%mvn_install -J www/kxml2/javadoc +%fdupes -s %{buildroot}%{_javadocdir} + +%files -f .mfiles +%license license.txt + +%files javadoc -f .mfiles-javadoc +%license license.txt + +%changelog diff --git a/kxml2-2.3.0.pom b/kxml2-2.3.0.pom new file mode 100644 index 0000000..4788eb9 --- /dev/null +++ b/kxml2-2.3.0.pom @@ -0,0 +1,32 @@ + + 4.0.0 + net.sf.kxml + kxml2 + 2.3.0 + jar + kXML 2 is a small XML pull parser based on the common XML pull API + http://kxml.sourceforge.net/ + kXML is a small XML pull parser, specially designed for constrained environments such as Applets, Personal Java or MIDP devices. In contrast to kXML 1, kXML 2 is based on the common XML pull API. + + + BSD style + http://kxml.cvs.sourceforge.net/viewvc/kxml/kxml2/license.txt?view=markup + repo + The license applies to the kXML2 classes (all classes below the org.kxml2 package). + + + Public Domain + http://creativecommons.org/licenses/publicdomain + repo + The license applies to the XmlPull API (all classes directly in the org.xmlpull.v1 package) + + + + http://kxml.cvs.sourceforge.net/viewvc/kxml/kxml2/ + + + Stefan Haustein, Oberhausen, Rhld., Germany + http://kxml.sourceforge.net/ + + + diff --git a/kxml2-min-2.3.0.pom b/kxml2-min-2.3.0.pom new file mode 100644 index 0000000..058a0a0 --- /dev/null +++ b/kxml2-min-2.3.0.pom @@ -0,0 +1,32 @@ + + 4.0.0 + net.sf.kxml + kxml2-min + 2.3.0 + jar + kXML 2 is a small XML pull parser based on the common XML pull API + http://kxml.sourceforge.net/ + kXML is a small XML pull parser, specially designed for constrained environments such as Applets, Personal Java or MIDP devices. In contrast to kXML 1, kXML 2 is based on the common XML pull API. This archive contains only the kXML 2 parser. + + + BSD style + http://kxml.cvs.sourceforge.net/viewvc/kxml/kxml2/license.txt?view=markup + repo + The license applies to the kXML2 classes (all classes below the org.kxml2 package). + + + Public Domain + http://creativecommons.org/licenses/publicdomain + repo + The license applies to the XmlPull API (all classes directly in the org.xmlpull.v1 package) + + + + http://kxml.cvs.sourceforge.net/viewvc/kxml/kxml2/ + + + Stefan Haustein, Oberhausen, Rhld., Germany + http://kxml.sourceforge.net/ + + +