diff --git a/debian/doc/findbugs.1 b/debian/doc/findbugs.1
deleted file mode 100644
index caa7232..0000000
--- a/debian/doc/findbugs.1
+++ /dev/null
@@ -1,41 +0,0 @@
-.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.40.11.
-.TH FINDBUGS "1" "August 2013" "findbugs 2.0.2" "User Commands"
-.SH NAME
-findbugs \- manual page for findbugs 2.0.2
-.SH DESCRIPTION
-FindBugs version 2.0.2, http://findbugs.sourceforge.net
-Command line options
-fb analyze Perform FindBugs Analysis
-fb filter Filter analysis results
-fb gui Launch FindBugs GUI
-fb help Provide help for commands
-fb list Convert analysis results to textual form
-fb set Set project configuration/options
-fb version List FindBugs version
-fb history history List details from multi\-version analysis results
-fb merge history Combine analysis results from different versions of software to produce multi\-version analysis results
-fb union history Merge analysis results from disjoint components
-fb addMessages poweruser add msgs (e.g., textual descriptions of bugs) to analysis results
-fb dis utility Disassemble a class file
-.SS "General options:"
-.TP
-\fB\-jvmArgs\fR args
-Pass args to JVM
-.TP
-\fB\-maxHeap\fR size
-Maximum Java heap size in megabytes (default=768)
-.TP
-\fB\-javahome\fR
-Specify location of JRE
-.SH "SEE ALSO"
-The full documentation for
-.B findbugs
-is maintained as a Texinfo manual. If the
-.B info
-and
-.B findbugs
-programs are properly installed at your site, the command
-.IP
-.B info findbugs
-.PP
-should give you access to the complete manual.
diff --git a/debian/findbugs.manpages b/debian/findbugs.manpages
index c25d8e6..2ff69e1 100644
--- a/debian/findbugs.manpages
+++ b/debian/findbugs.manpages
@@ -1 +1 @@
-debian/doc/findbugs.1
+debian/findbugs.1
diff --git a/debian/patches/0008-new-findbugs-help-options.patch b/debian/patches/0008-new-findbugs-help-options.patch
new file mode 100644
index 0000000..e41870a
--- /dev/null
+++ b/debian/patches/0008-new-findbugs-help-options.patch
@@ -0,0 +1,125 @@
+Index: findbugs-2.0.2/src/java/edu/umd/cs/findbugs/ShowHelp.java
+===================================================================
+--- findbugs-2.0.2.orig/src/java/edu/umd/cs/findbugs/ShowHelp.java 2013-08-29 21:05:56.000000000 +0800
++++ findbugs-2.0.2/src/java/edu/umd/cs/findbugs/ShowHelp.java 2013-08-29 21:07:43.893829925 +0800
+@@ -18,52 +18,59 @@
+ */
+ package edu.umd.cs.findbugs;
+
+-import java.util.TreeSet;
+
+ /**
+ * Show command line help.
+- *
++ *
+ * @author David Hovemeyer
+ */
+ public class ShowHelp {
+-
++
+ public static void main(String[] args) {
+
+ System.out.println("FindBugs version " + Version.RELEASE + ", " + Version.WEBSITE);
+-
++
+ DetectorFactoryCollection.instance();
+- System.out.println("Command line options");
+-
++ //System.out.println("Command line options");
++
++ /*
+ TreeSet cmds = new TreeSet();
+- for(Plugin p : Plugin.getAllPlugins())
+- for(FindBugsMain m : p.getAllFindBugsMain())
++ for(Plugin p : Plugin.getAllPlugins())
++ for(FindBugsMain m : p.getAllFindBugsMain())
+ cmds.add(m);
+- for(FindBugsMain m : cmds)
+- System.out.printf("fb %-12s %-12s %s%n", m.cmd, m.kind, m.description);
+-
+-// System.out.println();
+-// System.out.println("GUI Options:");
+-// FindBugsCommandLine guiCmd = new FindBugsCommandLine(true) {
+-// };
+-// guiCmd.printUsage(System.out);
+-// System.out.println();
+-// System.out.println("TextUI Options:");
+-// FindBugs.showCommandLineOptions();
++ for(FindBugsMain m : cmds)
++ System.out.printf("fb %-12s %-12s %s%n", m.cmd, m.kind, m.description);
++ */
++ System.out.println();
++ showSynopsis();
++
+ System.out.println();
+ showGeneralOptions();
+-
++
++ System.out.println();
++ System.out.println("GUI Options:");
++ FindBugsCommandLine guiCmd = new FindBugsCommandLine(true) {
++ };
++ guiCmd.printUsage(System.out);
++
++ System.out.println();
++ System.out.println("TextUI Options:");
++ FindBugs.showCommandLineOptions();
++ System.out.println();
++
+ }
+
+ public static void showSynopsis() {
+ System.out.println("Usage: findbugs [general options] [gui options]");
++ System.out.println(" or: findbugs [general options] -textui [textui options...] [jar/zip/class files, directories...]");
+ }
+
+ public static void showGeneralOptions() {
+-
++
+ System.out.println("General options:");
+ System.out.println(" -jvmArgs args Pass args to JVM");
+ System.out.println(" -maxHeap size Maximum Java heap size in megabytes (default=768)");
+ System.out.println(" -javahome Specify location of JRE");
+-
++
+ }
+ }
+Index: findbugs-2.0.2/src/java/edu/umd/cs/findbugs/TextUICommandLine.java
+===================================================================
+--- findbugs-2.0.2.orig/src/java/edu/umd/cs/findbugs/TextUICommandLine.java 2013-08-29 21:05:56.000000000 +0800
++++ findbugs-2.0.2/src/java/edu/umd/cs/findbugs/TextUICommandLine.java 2013-08-29 21:07:37.913800267 +0800
+@@ -145,7 +145,7 @@
+ public TextUICommandLine() {
+ addSwitch("-showPlugins", "show list of available detector plugins");
+
+- startOptionGroup("Output options:");
++ startOptionGroup("\nOutput options:");
+ addSwitch("-justListOptions", "throw an exception that lists the provided options");
+ makeOptionUnlisted("-justListOptions");
+
+@@ -177,7 +177,7 @@
+ makeOptionUnlisted("-outputFile");
+ addSwitchWithOptionalExtraPart("-nested", "true|false", "analyze nested jar/zip archives (default=true)");
+
+- startOptionGroup("Output filtering options:");
++ startOptionGroup("\nOutput filtering options:");
+ addOption("-bugCategories", "cat1[,cat2...]", "only report bugs in given categories");
+ addOption("-onlyAnalyze", "classes/packages",
+ "only analyze given classes and packages; end with .* to indicate classes in a package, .- to indicate a package prefix");
+@@ -186,14 +186,14 @@
+ addOption("-include", "filter file", "include only bugs matching given filter");
+ addSwitch("-applySuppression", "Exclude any bugs that match suppression filter loaded from fbp file");
+
+- startOptionGroup("Detector (visitor) configuration options:");
++ startOptionGroup("\nDetector (visitor) configuration options:");
+ addOption("-visitors", "v1[,v2...]", "run only named visitors");
+ addOption("-omitVisitors", "v1[,v2...]", "omit named visitors");
+ addOption("-chooseVisitors", "+v1,-v2,...", "selectively enable/disable detectors");
+ addOption("-choosePlugins", "+p1,-p2,...", "selectively enable/disable plugins");
+ addOption("-adjustPriority", "v1=(raise|lower)[,...]", "raise/lower priority of warnings for given visitor(s)");
+
+- startOptionGroup("Project configuration options:");
++ startOptionGroup("\nProject configuration options:");
+ addOption("-auxclasspath", "classpath", "set aux classpath for analysis");
+ addSwitch("-auxclasspathFromInput", "read aux classpath from standard input");
+ addOption("-sourcepath", "source path", "set source path for analyzed classes");
diff --git a/debian/patches/series b/debian/patches/series
index ca28690..7ad02ec 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -5,6 +5,6 @@
0005-remove-lib-AppleJavaExtensions.patch
0006-using-gtk-ui-settings.patch
0007-insert-in-script.patch
-
use-system-jar.patch
bcel-package.diff
+0008-new-findbugs-help-options.patch
diff --git a/debian/rules b/debian/rules
index 5195e38..4586249 100755
--- a/debian/rules
+++ b/debian/rules
@@ -27,6 +27,13 @@
dh_install --sourcedir=$(CURDIR)
+ # prepare findbugs.1
+ help2man -h "-help" -v "-version" \
+ -n "Static Java Code Analyzer" \
+ $(CURDIR)/debian/findbugs/usr/bin/findbugs \
+ -o $(CURDIR)/debian/findbugs.1
+
override_dh_auto_test:
ant test
dh_auto_test
+