File: SConscript

package info (click to toggle)
swift-im 5.0~alpha2.145.g12d031cf8%2Bdfsg-4.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 27,256 kB
  • sloc: cpp: 134,640; python: 2,701; sh: 774; xml: 561; javascript: 69; makefile: 59
file content (29 lines) | stat: -rw-r--r-- 1,427 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
Import("env")
import os

################################################################################
# Build
################################################################################

if env["SCONS_STAGE"] == "build" :
    help2man = env.WhereIs('help2man', os.environ['PATH'])
    if help2man:
        env['HELP2MAN'] = help2man
        env['HELP2MANSTR'] = "HELP2MAN $TARGET"

        if Dir("#/debian").exists():
            # This is needed for debian packaging using pbuilder which expects
            # generated man pages in this location.
            env['HELP2MAN_DEBIAN_DIR'] = "#/debian"
        else:
            env['HELP2MAN_DEBIAN_DIR'] = "Debian/debian"

        swiftenConfigHelp = env.Command(
            target='$HELP2MAN_DEBIAN_DIR/swiften-config.1', source='#/Swiften/Config/swiften-config',
            action = Action('$HELP2MAN --no-discard-stderr -m "Swift Manual" -S "swiften-config" -n "swiften-config" -N $SOURCE > $TARGET', cmdstr = "$HELP2MANSTR"))
        swiftHelp = env.Command(
            target='$HELP2MAN_DEBIAN_DIR/swift-im.1', source='#/Swift/QtUI/swift-im',
            action = Action('$HELP2MAN --no-discard-stderr -m "Swift Manual" -S "Swift" -n "swift-im" -N "LD_LIBRARY_PATH=$LD_LIBRARY_PATH:./Swiften $SOURCE" > $TARGET', cmdstr = "$HELP2MANSTR"))
    else:
        print("Enabled help2man but help2man is not in the PATH of the current environment.")
        Exit(1)