netcmd: Fix passwordsettings --max-pwd-age command
[kai/samba-autobuild/.git] / packaging / wscript
1 #!/usr/bin/env python
2
3 from waflib import Options
4
5 def options(opt):
6     gr = opt.option_group('systemd installation options')
7
8     gr.add_option('--systemd-install-services',
9                   help=("install systemd service files to manage daemons (default=no)"),
10                   action="store_true", dest="systemd_install_services", default=False)
11
12     gr.add_option('--with-systemddir',
13                   help=("systemd service directory [PREFIX/lib/systemd/system]"),
14                   action="store", dest="SYSTEMDDIR",
15                   default="${PREFIX}/lib/systemd/system")
16     #
17     # extra service directives
18     #
19
20     gr.add_option('--systemd-smb-extra',
21                   metavar="Option=Value",
22                   help=("Extra directives added to the smb service file."
23                         +" Can be given multiple times."),
24                   action="append", dest="systemd_smb_extra", default=[])
25
26     gr.add_option('--systemd-nmb-extra',
27                   metavar="Option=Value",
28                   help=("Extra directives added to the nmb service file."
29                         +" Can be used multiple times."),
30                   action="append", dest="systemd_nmb_extra", default=[])
31
32     gr.add_option('--systemd-winbind-extra',
33                   metavar="Option=Value",
34                   help=("Extra directives added to the winbind service file."
35                         +" Can be used multiple times."),
36                   action="append", dest="systemd_winbind_extra", default=[])
37
38     gr.add_option('--systemd-samba-extra',
39                   metavar="Option=Value",
40                   help=("Extra directives added to the samba service file."
41                         +" Can be used multiple times."),
42                   action="append", dest="systemd_samba_extra", default=[])
43
44 def configure(conf):
45     conf.env.systemd_install_services = Options.options.systemd_install_services
46     conf.env.systemd_smb_extra = '\n'.join(Options.options.systemd_smb_extra)
47     conf.env.systemd_nmb_extra = '\n'.join(Options.options.systemd_nmb_extra)
48     conf.env.systemd_winbind_extra = '\n'.join(Options.options.systemd_winbind_extra)
49     conf.env.systemd_samba_extra = '\n'.join(Options.options.systemd_samba_extra)
50     conf.env.SYSTEMDDIR = Options.options.SYSTEMDDIR