Sync from SUSE:SLFO:Main xml-stylebook revision 818ec04a798cb8e5738db5787abdda50
This commit is contained in:
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal 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
|
17
_service
Normal file
17
_service
Normal file
@@ -0,0 +1,17 @@
|
||||
<services>
|
||||
<service name="tar_scm" mode="disabled">
|
||||
<param name="scm">svn</param>
|
||||
<param name="url">http://svn.apache.org/repos/asf/xml/stylebook/trunk</param>
|
||||
<param name="revision">313293</param>
|
||||
<param name="version">1.0~b3_xalan2</param>
|
||||
<param name="filename">xml-stylebook</param>
|
||||
<param name="exclude">**/*.jar</param>
|
||||
<param name="exclude">docs/run.bat</param>
|
||||
<param name="exclude">styles/christmas/*.ttf</param>
|
||||
</service>
|
||||
<service name="recompress" mode="disabled">
|
||||
<param name="file">*.tar</param>
|
||||
<param name="compression">xz</param>
|
||||
</service>
|
||||
<service name="set_version" mode="disabled"/>
|
||||
</services>
|
BIN
xml-stylebook-1.0~b3_xalan2.tar.xz
(Stored with Git LFS)
Normal file
BIN
xml-stylebook-1.0~b3_xalan2.tar.xz
(Stored with Git LFS)
Normal file
Binary file not shown.
60
xml-stylebook-build-javadoc.patch
Normal file
60
xml-stylebook-build-javadoc.patch
Normal file
@@ -0,0 +1,60 @@
|
||||
--- build.xml 2024-09-22 12:28:36.683013503 +0200
|
||||
+++ build.xml 2024-09-22 12:30:09.423708245 +0200
|
||||
@@ -54,6 +54,7 @@
|
||||
<property name="build.dir" value="./build"/>
|
||||
<property name="build.src" value="${build.dir}/src"/>
|
||||
<property name="build.dest" value="${build.dir}/classes"/>
|
||||
+ <property name="build.javadoc" value="${build.dir}/javadoc"/>
|
||||
<property name="src.dir" value="./src"/>
|
||||
<property name="bin.dir" value="./bin"/>
|
||||
</target>
|
||||
@@ -62,6 +63,7 @@
|
||||
<mkdir dir="${build.dir}"/>
|
||||
<mkdir dir="${build.src}"/>
|
||||
<mkdir dir="${build.dest}"/>
|
||||
+ <mkdir dir="${build.javadoc}"/>
|
||||
<copy todir="${build.src}">
|
||||
<fileset dir="${src.dir}"/>
|
||||
</copy>
|
||||
@@ -83,14 +85,14 @@
|
||||
|
||||
<!--Compile and Package to work with Xalan-J 2 -->
|
||||
<target name="compile2" depends="prepare">
|
||||
- <javac srcdir="${src.dir}" excludes="org/apache/stylebook/processors/XalanProcessor.java" destdir="${build.dest}" debug="${debug}">
|
||||
+ <javac srcdir="${src.dir}" excludes="org/apache/stylebook/processors/XalanProcessor.java" destdir="${build.dest}" debug="${debug}" classpath="${classpath}">
|
||||
<exclude name="**/org/apache/stylebook/processors/XalanProcessor.java"/>
|
||||
</javac>
|
||||
<copy todir="${build.dest}/org/apache/stylebook/data">
|
||||
<fileset dir="${build.src}/org/apache/stylebook/data"/>
|
||||
</copy>
|
||||
</target>
|
||||
- <target name="package2" depends="compile2">
|
||||
+ <target name="package2" depends="compile2,javadoc">
|
||||
<replace file="${build.dest}/org/apache/stylebook/data/engine.xml" token="XalanProcessor" value="Xalan2Processor"/>
|
||||
<jar jarfile="${bin.dir}/${name}-${version-xalan-2}.jar" basedir="${build.dest}" includes="org/**"/>
|
||||
</target>
|
||||
@@ -99,4 +101,24 @@
|
||||
<deltree dir="${build.dir}"/>
|
||||
</target>
|
||||
|
||||
+ <target name="javadoc" depends="prepare">
|
||||
+ <javadoc destdir="${build.javadoc}"
|
||||
+ additionalparam="-Xdoclint:none"
|
||||
+ classpath="${classpath}"
|
||||
+ packagenames="*"
|
||||
+ noindex="false"
|
||||
+ splitindex="true"
|
||||
+ use="true"
|
||||
+ version="true"
|
||||
+ author="true"
|
||||
+ windowtitle="${name} ${version-xalan-2}"
|
||||
+ doctitle="${name} ${version-xalan-2} JavaDoc">
|
||||
+ <fileset dir="${build.src}">
|
||||
+ <exclude name="**/XalanProcessor.java"/>
|
||||
+ <exclude name="**/stylebook/data/*"/>
|
||||
+ </fileset>
|
||||
+ <link href="/usr/share/javadoc/java" offline="true" packagelistLoc="/usr/share/javadoc/java"/>
|
||||
+ </javadoc>
|
||||
+ </target>
|
||||
+
|
||||
</project>
|
53
xml-stylebook-image-printer.patch
Normal file
53
xml-stylebook-image-printer.patch
Normal file
@@ -0,0 +1,53 @@
|
||||
--- build.xml 2024-09-22 12:25:07.874769227 +0200
|
||||
+++ build.xml 2024-09-22 12:25:21.108202662 +0200
|
||||
@@ -56,9 +56,6 @@
|
||||
<property name="build.dest" value="${build.dir}/classes"/>
|
||||
<property name="src.dir" value="./src"/>
|
||||
<property name="bin.dir" value="./bin"/>
|
||||
- <condition property="sun.codec.present" >
|
||||
- <available classname="com.sun.image.codec.jpeg.JPEGCodec"/>
|
||||
- </condition>
|
||||
</target>
|
||||
|
||||
<target name="prepare" depends="init">
|
||||
@@ -88,7 +85,6 @@
|
||||
<target name="compile2" depends="prepare">
|
||||
<javac srcdir="${src.dir}" excludes="org/apache/stylebook/processors/XalanProcessor.java" destdir="${build.dest}" debug="${debug}">
|
||||
<exclude name="**/org/apache/stylebook/processors/XalanProcessor.java"/>
|
||||
- <exclude name="**/org/apache/stylebook/printers/ImagePrinter.java" unless="sun.codec.present"/>
|
||||
</javac>
|
||||
<copy todir="${build.dest}/org/apache/stylebook/data">
|
||||
<fileset dir="${build.src}/org/apache/stylebook/data"/>
|
||||
--- src/org/apache/stylebook/printers/ImagePrinter.java 2024-09-22 12:25:07.878102586 +0200
|
||||
+++ src/org/apache/stylebook/printers/ImagePrinter.java 2024-09-22 12:25:21.108202662 +0200
|
||||
@@ -8,7 +8,9 @@
|
||||
package org.apache.stylebook.printers;
|
||||
|
||||
import org.apache.stylebook.*;
|
||||
-import com.sun.image.codec.jpeg.*;
|
||||
+import javax.imageio.*;
|
||||
+import javax.imageio.plugins.jpeg.*;
|
||||
+import javax.imageio.stream.*;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.io.PrintStream;
|
||||
@@ -144,11 +146,14 @@
|
||||
}
|
||||
}
|
||||
|
||||
- // Write out image (highest quality for jpeg data)
|
||||
- JPEGEncodeParam jpar=JPEGCodec.getDefaultJPEGEncodeParam(img);
|
||||
- jpar.setQuality(1,true);
|
||||
- JPEGImageEncoder jenc=JPEGCodec.createJPEGEncoder(out,jpar);
|
||||
- jenc.encode(img);
|
||||
+ // Write out image
|
||||
+ ImageWriter encoder =
|
||||
+ (ImageWriter)ImageIO.getImageWritersByFormatName("jpeg").next();
|
||||
+ ImageWriteParam param = encoder.getDefaultWriteParam();
|
||||
+ param.setCompressionMode(ImageWriteParam.MODE_EXPLICIT);
|
||||
+ param.setCompressionQuality(1);
|
||||
+ encoder.setOutput(new MemoryCacheImageOutputStream(out));
|
||||
+ encoder.write(null, new IIOImage(img, null, null), param);
|
||||
out.flush();
|
||||
}
|
||||
|
4
xml-stylebook.changes
Normal file
4
xml-stylebook.changes
Normal file
@@ -0,0 +1,4 @@
|
||||
-------------------------------------------------------------------
|
||||
Sun Sep 22 09:46:03 UTC 2024 - Fridrich Strba <fstrba@suse.com>
|
||||
|
||||
- Initial packaging
|
101
xml-stylebook.spec
Normal file
101
xml-stylebook.spec
Normal file
@@ -0,0 +1,101 @@
|
||||
#
|
||||
# spec file for package xml-stylebook
|
||||
#
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
#
|
||||
# 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: xml-stylebook
|
||||
Version: 1.0~b3_xalan2
|
||||
Release: 0
|
||||
Summary: Apache XML Stylebook
|
||||
License: Apache-1.1
|
||||
URL: https://xml.apache.org/
|
||||
Source0: %{name}-%{version}.tar.xz
|
||||
Patch0: %{name}-image-printer.patch
|
||||
Patch1: %{name}-build-javadoc.patch
|
||||
BuildRequires: ant
|
||||
BuildRequires: dejavu-fonts
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: java-devel >= 1.8
|
||||
BuildRequires: javapackages-local
|
||||
BuildRequires: xerces-j2
|
||||
BuildRequires: xml-commons-apis-bootstrap
|
||||
Requires: xerces-j2
|
||||
Requires: xml-apis
|
||||
BuildArch: noarch
|
||||
|
||||
%description
|
||||
Apache XML Stylebook is a HTML documentation generator.
|
||||
|
||||
%package javadoc
|
||||
Summary: API documentation for %{name}
|
||||
|
||||
%description javadoc
|
||||
%{summary}.
|
||||
|
||||
%package demo
|
||||
Summary: Examples for %{name}
|
||||
Requires: %{name} = %{version}
|
||||
|
||||
%description demo
|
||||
Examples demonstrating the use of %{name}.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch -P 0
|
||||
%patch -P 1
|
||||
|
||||
%build
|
||||
%{ant} \
|
||||
-Dant.build.javac.source=8 -Dant.build.javac.target=8 \
|
||||
-Dversion-xalan-2=%{version} \
|
||||
-Dclasspath=$(build-classpath xml-apis xerces-j2)
|
||||
|
||||
# Build the examples (this serves as a good test suite)
|
||||
pushd docs
|
||||
java -classpath "$(build-classpath xml-apis xerces-j2):../bin/stylebook-%{version}.jar" \
|
||||
org.apache.stylebook.StyleBook "targetDirectory=../results" book.xml ../styles/apachexml
|
||||
popd
|
||||
|
||||
%install
|
||||
# jars
|
||||
install -dm 0755 %{buildroot}%{_javadir}
|
||||
install -pm 0644 bin/stylebook-%{version}.jar \
|
||||
%{buildroot}%{_javadir}/%{name}.jar
|
||||
|
||||
# javadoc
|
||||
install -dm 0755 %{buildroot}%{_javadocdir}/%{name}
|
||||
cp -pr build/javadoc/* %{buildroot}%{_javadocdir}/%{name}
|
||||
%fdupes -s %{buildroot}%{_javadocdir}
|
||||
|
||||
# examples
|
||||
install -dm 0755 %{buildroot}%{_datadir}/%{name}
|
||||
cp -pr docs %{buildroot}%{_datadir}/%{name}
|
||||
cp -pr styles %{buildroot}%{_datadir}/%{name}
|
||||
cp -pr results %{buildroot}%{_datadir}/%{name}
|
||||
%fdupes -s %{buildroot}%{_datadir}/%{name}
|
||||
|
||||
%files
|
||||
%license LICENSE.txt
|
||||
%{_javadir}/%{name}.jar
|
||||
|
||||
%files javadoc
|
||||
%license LICENSE.txt
|
||||
%{_javadocdir}/%{name}
|
||||
|
||||
%files demo
|
||||
%{_datadir}/%{name}
|
||||
|
||||
%changelog
|
Reference in New Issue
Block a user