summaryrefslogtreecommitdiffstats
path: root/Swift
diff options
context:
space:
mode:
authorJoanna Hulboj <joanna.hulboj@isode.com>2017-03-09 10:31:32 (GMT)
committerTobias Markmann <tm@ayena.de>2017-03-15 12:07:04 (GMT)
commite7d414e233b46e3ede399cb7ef385b0d078cafc9 (patch)
tree32375e2ba8c5b254f43c86872abf6173e45209d5 /Swift
parent87d5f54a90f2759aae587f01650e44aee8f2fe3f (diff)
downloadswift-e7d414e233b46e3ede399cb7ef385b0d078cafc9.zip
swift-e7d414e233b46e3ede399cb7ef385b0d078cafc9.tar.bz2
Add automatic man generation to the Linux build for Swift
Test-Information: Tested under CentOS. Run script to generate a package under Linux, swift-im.1 and swiften-config.1 are generated. Change-Id: Idf0b159a94e05349b196f019bbc91127095a1d16
Diffstat (limited to 'Swift')
-rw-r--r--Swift/Packaging/Debian/debian/swift-im.133
-rw-r--r--Swift/Packaging/Debian/debian/swiften-config.121
-rwxr-xr-xSwift/Packaging/Debian/package.sh12
3 files changed, 12 insertions, 54 deletions
diff --git a/Swift/Packaging/Debian/debian/swift-im.1 b/Swift/Packaging/Debian/debian/swift-im.1
deleted file mode 100644
index b7262bf..0000000
--- a/Swift/Packaging/Debian/debian/swift-im.1
+++ /dev/null
@@ -1,33 +0,0 @@
-.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.38.4.
-.TH SWIFT "1" "June 2011" "Swift" "Swift Manual"
-.SH NAME
-swift-im \- Swift
-.SH SYNOPSIS
-.B swift-im
-[\fIOPTIONS\fR]...
-.SH DESCRIPTION
-Swift is an instant messaging client for the XMPP network.
-.SH OPTIONS
-.TP
-\fB\-\-debug\fR
-Turn on debug logging
-.TP
-\fB\-\-help\fR
-Show this help message
-.TP
-\fB\-\-version\fR
-Show version information
-.TP
-\fB\-\-netbook\-mode\fR
-Use netbook mode display (unsupported)
-.TP
-\fB\-\-no\-tabs\fR
-Don't manage chat windows in tabs (unsupported)
-.TP
-\fB\-\-latency\-debug\fR
-Use latency debugging (unsupported)
-.HP
-\fB\-\-multi\-account\fR arg (=1) Number of accounts to open windows for (unsupported)
-.TP
-\fB\-\-start\-minimized\fR
-Don't show the login/roster window at startup
diff --git a/Swift/Packaging/Debian/debian/swiften-config.1 b/Swift/Packaging/Debian/debian/swiften-config.1
deleted file mode 100644
index 3717df6..0000000
--- a/Swift/Packaging/Debian/debian/swiften-config.1
+++ /dev/null
@@ -1,21 +0,0 @@
-.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.38.4.
-.TH SWIFTEN-CONFIG "1" "June 2011" "swiften-config" "Swift Manual"
-.SH NAME
-swiften-config \- swiften-config
-.SH SYNOPSIS
-.B swiften-config
-[\fIOPTIONS\fR]...
-.SH DESCRIPTION
-swiften\-config outputs the Swiften build options.
-.TP
-\fB\-\-help\fR
-Show this help message
-.TP
-\fB\-\-version\fR
-Show version information
-.TP
-\fB\-\-libs\fR
-List the library flags
-.TP
-\fB\-\-cflags\fR
-List the compiler & preprocessor flags
diff --git a/Swift/Packaging/Debian/package.sh b/Swift/Packaging/Debian/package.sh
index 62dfff0..d19f5dc 100755
--- a/Swift/Packaging/Debian/package.sh
+++ b/Swift/Packaging/Debian/package.sh
@@ -95,6 +95,18 @@ cat $DIRNAME/debian/control.in | sed -e "s/%SWIFTEN_SOVERSION%/$SWIFTEN_SOVERSIO
rm $DIRNAME/debian/control.in
mv $DIRNAME/debian/libswiften.install $DIRNAME/debian/libswiften$SWIFTEN_SOVERSION.install
cat ../../../COPYING.thirdparty | tail -n +3 >> $DIRNAME/debian/copyright
+# Generate updated man-page if possible
+if type "help2man" > /dev/null 2>&1; then
+ if [ -f ../../QtUI/swift-im ]; then
+ help2man -m "Swift Manual" -S "Swift" -n "swift-im" -N ../../QtUI/swift-im > $DIRNAME/debian/swift-im.1
+ fi
+ if [ -f ../../../Swiften/Config/swiften-config ]; then
+ help2man -m "Swift Manual" -S "swiften-config" -n "swiften-config" -N ../../../Swiften/Config/swiften-config > $DIRNAME/debian/swiften-config.1
+ fi
+else
+ >2& echo "Unable to generate man pages. Please ensure that help2man is installed"
+ exit 1;
+fi
# Build
cd $DIRNAME