diff options
| author | Tobias Markmann <tm@ayena.de> | 2018-02-07 15:11:00 (GMT) |
|---|---|---|
| committer | Tobias Markmann <tm@ayena.de> | 2018-02-09 16:29:58 (GMT) |
| commit | d29e1624e38b528a7ae0e4cba83e4a790102aa8d (patch) | |
| tree | 3a2d1d250e0d6e7fd731aa15522d2525f151e3ea /Swift/Packaging/SConscript | |
| parent | e2048d327800f93d6d5b647a7b0c2ff2abc5e93b (diff) | |
| download | swift-d29e1624e38b528a7ae0e4cba83e4a790102aa8d.zip swift-d29e1624e38b528a7ae0e4cba83e4a790102aa8d.tar.bz2 | |
Move man page generation from package.sh to scons
Pass help2man=1 to have scons build man page sources via
help2man.
Adjusted package.sh to use scons to build man pages.
Test-Information:
Tested on Ubuntu 16.04 and it generated man page sources
when help2man=1.
Tested package_all_platforms on Ubuntu 16.04. The build does
not fail due to missing man pages anymore.
Change-Id: I6c62bc3f666ffd9f926038045672eb6e456082e5
Diffstat (limited to 'Swift/Packaging/SConscript')
| -rw-r--r-- | Swift/Packaging/SConscript | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/Swift/Packaging/SConscript b/Swift/Packaging/SConscript new file mode 100644 index 0000000..bd7e6d8 --- /dev/null +++ b/Swift/Packaging/SConscript | |||
| @@ -0,0 +1,29 @@ | |||
| 1 | Import("env") | ||
| 2 | import os | ||
| 3 | |||
| 4 | ################################################################################ | ||
| 5 | # Build | ||
| 6 | ################################################################################ | ||
| 7 | |||
| 8 | if env["SCONS_STAGE"] == "build" : | ||
| 9 | help2man = env.WhereIs('help2man', os.environ['PATH']) | ||
| 10 | if help2man: | ||
| 11 | env['HELP2MAN'] = help2man | ||
| 12 | env['HELP2MANSTR'] = "HELP2MAN $TARGET" | ||
| 13 | |||
| 14 | if Dir("#/debian").exists(): | ||
| 15 | # This is needed for debian packaging using pbuilder which expects | ||
| 16 | # generated man pages in this location. | ||
| 17 | env['HELP2MAN_DEBIAN_DIR'] = "#/debian" | ||
| 18 | else: | ||
| 19 | env['HELP2MAN_DEBIAN_DIR'] = "Debian/debian" | ||
| 20 | |||
| 21 | swiftenConfigHelp = env.Command( | ||
| 22 | target='$HELP2MAN_DEBIAN_DIR/swiften-config.1', source='#/Swiften/Config/swiften-config', | ||
| 23 | action = Action('$HELP2MAN -m "Swift Manual" -S "swiften-config" -n "swiften-config" -N $SOURCE > $TARGET', cmdstr = "$HELP2MANSTR")) | ||
| 24 | swiftHelp = env.Command( | ||
| 25 | target='$HELP2MAN_DEBIAN_DIR/swift-im.1', source='#/Swift/QtUI/swift-im', | ||
| 26 | action = Action('$HELP2MAN -m "Swift Manual" -S "Swift" -n "swift-im" -N $SOURCE > $TARGET', cmdstr = "$HELP2MANSTR")) | ||
| 27 | else: | ||
| 28 | print "Enabled help2man but help2man is not in the PATH of the current environment." | ||
| 29 | Exit(1) \ No newline at end of file | ||
Swift