summaryrefslogtreecommitdiffstats
path: root/packaging/wscript
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 17:20:00 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 17:20:00 +0000
commit8daa83a594a2e98f39d764422bfbdbc62c9efd44 (patch)
tree4099e8021376c7d8c05bdf8503093d80e9c7bad0 /packaging/wscript
parentInitial commit. (diff)
downloadsamba-8daa83a594a2e98f39d764422bfbdbc62c9efd44.tar.xz
samba-8daa83a594a2e98f39d764422bfbdbc62c9efd44.zip
Adding upstream version 2:4.20.0+dfsg.upstream/2%4.20.0+dfsg
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'packaging/wscript')
-rw-r--r--packaging/wscript57
1 files changed, 57 insertions, 0 deletions
diff --git a/packaging/wscript b/packaging/wscript
new file mode 100644
index 0000000..ab8e16f
--- /dev/null
+++ b/packaging/wscript
@@ -0,0 +1,57 @@
+#!/usr/bin/env python
+
+from waflib import Options
+
+def options(opt):
+ gr = opt.option_group('systemd installation options')
+
+ gr.add_option('--systemd-install-services',
+ help=("install systemd service files to manage daemons (default=no)"),
+ action="store_true", dest="systemd_install_services", default=False)
+
+ gr.add_option('--with-systemddir',
+ help=("systemd service directory [PREFIX/lib/systemd/system]"),
+ action="store", dest="SYSTEMDDIR",
+ default="${PREFIX}/lib/systemd/system")
+ #
+ # extra service directives
+ #
+
+ gr.add_option('--systemd-smb-extra',
+ metavar="Option=Value",
+ help=("Extra directives added to the smb service file."
+ +" Can be given multiple times."),
+ action="append", dest="systemd_smb_extra", default=[])
+
+ gr.add_option('--systemd-nmb-extra',
+ metavar="Option=Value",
+ help=("Extra directives added to the nmb service file."
+ +" Can be used multiple times."),
+ action="append", dest="systemd_nmb_extra", default=[])
+
+ gr.add_option('--systemd-winbind-extra',
+ metavar="Option=Value",
+ help=("Extra directives added to the winbind service file."
+ +" Can be used multiple times."),
+ action="append", dest="systemd_winbind_extra", default=[])
+
+ gr.add_option('--systemd-samba-extra',
+ metavar="Option=Value",
+ help=("Extra directives added to the samba service file."
+ +" Can be used multiple times."),
+ action="append", dest="systemd_samba_extra", default=[])
+
+ gr.add_option('--systemd-ctdb-extra',
+ metavar="Option=Value",
+ help=("Extra directives added to the ctdb service file."
+ +" Can be given multiple times."),
+ action="append", dest="systemd_ctdb_extra", default=[])
+
+def configure(conf):
+ conf.env.systemd_install_services = Options.options.systemd_install_services
+ conf.env.systemd_smb_extra = '\n'.join(Options.options.systemd_smb_extra)
+ conf.env.systemd_nmb_extra = '\n'.join(Options.options.systemd_nmb_extra)
+ conf.env.systemd_winbind_extra = '\n'.join(Options.options.systemd_winbind_extra)
+ conf.env.systemd_samba_extra = '\n'.join(Options.options.systemd_samba_extra)
+ conf.env.systemd_ctdb_extra = '\n'.join(Options.options.systemd_ctdb_extra)
+ conf.env.SYSTEMDDIR = Options.options.SYSTEMDDIR