1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-28 07:21:54 +03:00
samba-mirror/packaging/wscript
Günther Deschner 8224a3d6a0 packaging: fix default systemd-dir path.
https://bugzilla.samba.org/show_bug.cgi?id=13227

By default we should not end up with a
/usr/usr/lib/systemd/system path.

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>

Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Tue Jan 16 21:02:28 CET 2018 on sn-devel-144
2018-01-16 21:02:28 +01:00

51 lines
2.2 KiB
Python

#!/usr/bin/env python
import Options
def set_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=[])
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.SYSTEMDDIR = Options.options.SYSTEMDDIR