diff options
-rw-r--r-- | meson.build | 1 | ||||
-rw-r--r-- | tftpd/meson.build | 12 | ||||
-rw-r--r-- | tftpd/xinetd.conf.in | 10 |
3 files changed, 23 insertions, 0 deletions
diff --git a/meson.build b/meson.build index 748749f..1879048 100644 --- a/meson.build +++ b/meson.build @@ -2,6 +2,7 @@ project('iputils', 'c', default_options : [ 'c_std=c99', 'warning_level=3', + 'localstatedir=var', ], meson_version : '>=0.39', version : 's20190709') # keep in sync with: git describe | awk -F- '{print $1}' diff --git a/tftpd/meson.build b/tftpd/meson.build index 527a54f..0dd09a5 100644 --- a/tftpd/meson.build +++ b/tftpd/meson.build @@ -4,3 +4,15 @@ executable('tftpd', ['tftpd.c', 'tftpsubs.c', git_version_h], include_directories : inc, link_with : [libcommon], install: true) + +subs = configuration_data() +subs.set('sbindir', join_paths(get_option('prefix'), get_option('sbindir'))) +subs.set('tftpdatadir', join_paths(get_option('prefix'), get_option('localstatedir'))) +unit_file = configure_file( + input: 'xinetd.conf.in', + output: 'tftp', + configuration: subs +) +etcdir = join_paths(get_option('prefix'), get_option('sysconfdir')) +xinetdir = join_paths(etcdir, 'xinetd.d') +install_data(unit_file, install_dir: xinetdir) diff --git a/tftpd/xinetd.conf.in b/tftpd/xinetd.conf.in new file mode 100644 index 0000000..8f8eb64 --- /dev/null +++ b/tftpd/xinetd.conf.in @@ -0,0 +1,10 @@ +service tftp +{ + socket_type = dgram + protocol = udp + wait = yes + user = nobody + server = @sbindir@/tftpd + server_args = @tftpdatadir@/tftpboot + disable = yes +} |