[findbugs] Generate HTML manual (using xsltproc) and include in main package
richardfearn
richardfearn at fedoraproject.org
Tue Jul 8 13:01:26 UTC 2014
commit 4113c5472fe834c03d2ef2d50a7d0b15ca58419d
Author: Richard Fearn <richardfearn at gmail.com>
Date: Tue Jul 8 14:00:26 2014 +0100
Generate HTML manual (using xsltproc) and include in main package
findbugs-manual.patch | 49 +++++++++++++++++++++++++++++++++++++++++++++++++
findbugs.spec | 21 ++++++++++++++++-----
2 files changed, 65 insertions(+), 5 deletions(-)
---
diff --git a/findbugs-manual.patch b/findbugs-manual.patch
new file mode 100644
index 0000000..193b81f
--- /dev/null
+++ b/findbugs-manual.patch
@@ -0,0 +1,49 @@
+diff --git a/build.properties b/build.properties
+index 27f21f8..8395dc2 100644
+--- a/build.properties
++++ b/build.properties
+@@ -11,7 +11,7 @@ source.findbugs.jar = src/java/,\
+ # Set this to the directory containing the DocBook Modular XSL Stylesheets
+ # from http://docbook.sourceforge.net/projects/xsl/
+
+-xsl.stylesheet.home =${local.software.home}/docbook-xsl-1.76.1
++xsl.stylesheet.home =/usr/share/sgml/docbook/xsl-stylesheets-1.78.1
+
+ # Set this to the directory containing the svnant Ant jars. These are
+ # needed for the srcdist target and to get the svn revision number
+diff --git a/build.xml b/build.xml
+index 1cba081..60ad6d1 100644
+--- a/build.xml
++++ b/build.xml
+@@ -855,24 +855,16 @@
+ -->
+ <target name="generatemanual" unless="manual.uptodate">
+ <echo>Generating HTML version of manual</echo>
+- <echo>Running saxon: ${saxon.home}/saxon.jar</echo>
+- <java fork="true" dir="${docoutput.dir}" failonerror="true" classname="com.icl.saxon.StyleSheet" >
+- <classpath>
+- <pathelement location="${saxon.home}/saxon.jar"/>
+- <pathelement path="${java.class.path}"/>
+- </classpath>
+- <arg value="manual.xml" />
++ <echo>Running xsltproc</echo>
++ <exec dir="${docoutput.dir}" failonerror="true" executable="xsltproc">
+ <arg value="manual.xsl" />
+- </java>
++ <arg value="manual.xml" />
++ </exec>
+
+- <java fork="true" dir="${docoutput.dir}/ja" failonerror="true" classname="com.icl.saxon.StyleSheet" >
+- <classpath>
+- <pathelement location="${saxon.home}/saxon.jar"/>
+- <pathelement path="${java.class.path}"/>
+- </classpath>
+- <arg value="../manual_ja.xml" />
++ <exec dir="${docoutput.dir}/ja" failonerror="true" executable="xsltproc">
+ <arg value="../manual.xsl" />
+- </java>
++ <arg value="../manual_ja.xml" />
++ </exec>
+ </target>
+
+ <!--
diff --git a/findbugs.spec b/findbugs.spec
index 124bf28..d2b9edb 100644
--- a/findbugs.spec
+++ b/findbugs.spec
@@ -2,7 +2,7 @@
Name: findbugs
Version: 3.0.0
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Find bugs in Java code
Group: Development/Languages
@@ -38,6 +38,8 @@ Patch1: findbugs-fedora.patch
# no Class-Path attribute in its manifest (bug #1080682)
Patch2: findbugs-ant-task-classpath.patch
+Patch3: findbugs-manual.patch
+
BuildArch: noarch
BuildRequires: findbugs-bcel
@@ -57,6 +59,11 @@ BuildRequires: objectweb-asm
BuildRequires: perl
BuildRequires: tex(latex)
BuildRequires: texlive-preprint
+
+# For generating HTML version of manual using xsltproc
+BuildRequires: libxslt
+BuildRequires: docbook-style-xsl
+
Requires: findbugs-bcel
Requires: apache-commons-lang
Requires: java >= 1:1.6.0
@@ -107,6 +114,7 @@ README.fedora for more information.
%patch0 -p1
%patch1 -p1
%patch2 -p1
+%patch3 -p1
cp -p %{SOURCE2} README.fedora
@@ -117,8 +125,8 @@ rm -f lib/*.jar
rm -f src/gui/edu/umd/cs/findbugs/gui2/OSXAdapter.java
%build
-# Build the class files
-ant
+# Build the class files and docs
+ant docs build
# Build the javadocs
ant apiJavadoc
@@ -179,7 +187,7 @@ for i in findbugs findbugs-bcel dom4j jaxen objectweb-asm/asm-debug-all jsr-305
done
# Remove now unnecessary build-only manual files so %%doc doesn't get them
-rm -f src/doc/manual*.xml src/doc/manual*.xsl
+rm -f build/doc/manual*.xml build/doc/manual*.xsl
# Install poms
mkdir -p $RPM_BUILD_ROOT%{_mavenpomdir}
@@ -196,7 +204,7 @@ cp %{SOURCE6} $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.ant-ant-%{name}.pom
%files -f .mfiles
%doc licenses/LICENSE.txt design/DecouplingFromBCEL.txt design/VisitingAndCaching.txt
%doc README.txt "design/eclipse findbugs plugin features.sxw"
-%doc design/architecture/architecture.pdf src/doc
+%doc design/architecture/architecture.pdf build/doc
%{_bindir}/*
%{_datadir}/%{name}
@@ -212,6 +220,9 @@ cp %{SOURCE6} $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.ant-ant-%{name}.pom
%{_javadir}/findbugs-tools.jar
%changelog
+* Tue Jul 08 2014 Richard Fearn <richardfearn at gmail.com> - 3.0.0-2
+- Generate HTML manual (using xsltproc) and include in main package
+
* Tue Jul 08 2014 Richard Fearn <richardfearn at gmail.com> - 3.0.0-1
- Update to 3.0.0 (bug #1116843)
More information about the scm-commits
mailing list