add meson build files
Closes #116. Closes #171. Closes #172. Closes #175.
This commit is contained in:
6
src/common/meson.build
Normal file
6
src/common/meson.build
Normal file
@@ -0,0 +1,6 @@
|
||||
version_h = vcs_tag(
|
||||
input : 'version.h.in',
|
||||
output : 'version.h')
|
||||
version_f = vcs_tag(
|
||||
input : 'version.in',
|
||||
output : 'version')
|
||||
18
src/common/version.h.in
Normal file
18
src/common/version.h.in
Normal file
@@ -0,0 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2007-2015 The OpenRC Authors.
|
||||
* See the Authors file at the top-level directory of this distribution and
|
||||
* https://github.com/OpenRC/openrc/blob/master/AUTHORS
|
||||
*
|
||||
* This file is part of OpenRC. It is subject to the license terms in
|
||||
* the LICENSE file found in the top-level directory of this
|
||||
* distribution and at https://github.com/OpenRC/openrc/blob/master/LICENSE
|
||||
* This file may not be copied, modified, propagated, or distributed
|
||||
* except according to the terms contained in the LICENSE file.
|
||||
*/
|
||||
|
||||
#ifndef _VERSION_H_
|
||||
#define _VERSION_H_
|
||||
|
||||
#define VERSION "@VCS_TAG@"
|
||||
|
||||
#endif
|
||||
1
src/common/version.in
Normal file
1
src/common/version.in
Normal file
@@ -0,0 +1 @@
|
||||
@VCS_TAG@
|
||||
12
src/libeinfo/meson.build
Normal file
12
src/libeinfo/meson.build
Normal file
@@ -0,0 +1,12 @@
|
||||
libeinfo_version = '1'
|
||||
|
||||
libeinfo = library('einfo', ['libeinfo.c'],
|
||||
c_args : termcap_flags,
|
||||
include_directories : incdir,
|
||||
dependencies : termcap_dep,
|
||||
link_depends : 'einfo.map',
|
||||
version : libeinfo_version,
|
||||
install : true,
|
||||
install_dir : libdir)
|
||||
|
||||
install_headers('einfo.h')
|
||||
33
src/librc/meson.build
Normal file
33
src/librc/meson.build
Normal file
@@ -0,0 +1,33 @@
|
||||
rc_h_conf_data = configuration_data()
|
||||
if root_prefix == '/'
|
||||
rc_h_conf_data.set('PREFIX', '')
|
||||
else
|
||||
rc_h_conf_data.set('PREFIX', root_prefix)
|
||||
endif
|
||||
rc_h_conf_data.set('LIB', libname)
|
||||
rc_h_conf_data.set('LIBEXECDIR', rc_libexecdir)
|
||||
rc_h_conf_data.set('LOCAL_PREFIX', local_prefix)
|
||||
rc_h_conf_data.set('PKG_PREFIX', pkg_prefix)
|
||||
rc_h_conf_data.set('SYSCONFDIR', get_option('sysconfdir'))
|
||||
|
||||
librc_version = '1'
|
||||
|
||||
librc_sources = [
|
||||
'librc.c',
|
||||
'librc-daemon.c',
|
||||
'librc-depend.c',
|
||||
'librc-misc.c',
|
||||
'librc-stringlist.c',
|
||||
]
|
||||
|
||||
rc_h = configure_file(input : 'rc.h.in', output : 'rc.h',
|
||||
configuration : rc_h_conf_data)
|
||||
|
||||
librc = library('rc', librc_sources,
|
||||
include_directories : [incdir, einfo_incdir],
|
||||
link_depends : 'rc.map',
|
||||
version : librc_version,
|
||||
install : true,
|
||||
install_dir : libdir)
|
||||
|
||||
install_headers(rc_h)
|
||||
4
src/meson.build
Normal file
4
src/meson.build
Normal file
@@ -0,0 +1,4 @@
|
||||
subdir('common')
|
||||
subdir('libeinfo')
|
||||
subdir('librc')
|
||||
subdir('rc')
|
||||
302
src/rc/meson.build
Normal file
302
src/rc/meson.build
Normal file
@@ -0,0 +1,302 @@
|
||||
rc_misc_c = files([
|
||||
'rc-misc.c',
|
||||
])
|
||||
|
||||
rc_plugin_c = ([
|
||||
'rc-plugin.c',
|
||||
])
|
||||
|
||||
rc_schedules_c = files([
|
||||
'rc-schedules.c',
|
||||
])
|
||||
|
||||
usage_c = files([
|
||||
'_usage.c',
|
||||
])
|
||||
|
||||
if get_option('selinux').enabled()
|
||||
rc_selinux_c = files([
|
||||
'rc-selinux.c',
|
||||
])
|
||||
else
|
||||
rc_selinux_c = []
|
||||
endif
|
||||
|
||||
rc_wtmp_c = files([
|
||||
'rc-wtmp.c',
|
||||
])
|
||||
|
||||
rc_bindir = rc_libexecdir / 'bin'
|
||||
rc_sbindir = rc_libexecdir / 'sbin'
|
||||
|
||||
executable('rc-status',
|
||||
['rc-status.c', rc_misc_c, usage_c, version_h],
|
||||
c_args : cc_branding_flags,
|
||||
link_with: [libeinfo, librc],
|
||||
dependencies: [util_dep],
|
||||
include_directories: [incdir, einfo_incdir, rc_incdir],
|
||||
install: true,
|
||||
install_dir: bindir)
|
||||
|
||||
executable('openrc',
|
||||
['rc.c', 'rc-logger.c', rc_misc_c, rc_plugin_c, usage_c,
|
||||
version_h],
|
||||
c_args : cc_branding_flags,
|
||||
link_with: [libeinfo, librc],
|
||||
dependencies: [dl_dep, util_dep],
|
||||
include_directories: [incdir, einfo_incdir, rc_incdir],
|
||||
install: true,
|
||||
install_dir: sbindir)
|
||||
|
||||
executable('openrc-run',
|
||||
['openrc-run.c', rc_misc_c, rc_plugin_c, usage_c,
|
||||
rc_selinux_c, version_h],
|
||||
c_args : [cc_audit_flags, cc_branding_flags, cc_pam_flags, cc_selinux_flags],
|
||||
link_with: [libeinfo, librc],
|
||||
dependencies: [dl_dep, libpam, selinux_dep, util_dep],
|
||||
include_directories: [incdir, einfo_incdir, rc_incdir],
|
||||
install: true,
|
||||
install_dir: sbindir)
|
||||
|
||||
executable('rc',
|
||||
['rc.c', 'rc-logger.c', rc_misc_c, rc_plugin_c, usage_c, version_h],
|
||||
c_args : cc_branding_flags,
|
||||
link_with: [libeinfo, librc],
|
||||
dependencies: [dl_dep, util_dep],
|
||||
include_directories: [incdir, einfo_incdir, rc_incdir],
|
||||
install: true,
|
||||
install_dir: sbindir)
|
||||
|
||||
executable('rc-service',
|
||||
['rc-service.c', rc_misc_c, usage_c, version_h],
|
||||
c_args : cc_branding_flags,
|
||||
link_with: [libeinfo, librc],
|
||||
include_directories: [incdir, einfo_incdir, rc_incdir],
|
||||
install: true,
|
||||
install_dir: sbindir)
|
||||
|
||||
executable('rc-update',
|
||||
['rc-update.c', rc_misc_c, usage_c, version_h],
|
||||
c_args : cc_branding_flags,
|
||||
link_with: [libeinfo, librc],
|
||||
include_directories: [incdir, einfo_incdir, rc_incdir],
|
||||
install: true,
|
||||
install_dir: sbindir)
|
||||
|
||||
executable('runscript',
|
||||
['openrc-run.c', rc_misc_c, usage_c, 'rc-plugin.c',
|
||||
rc_selinux_c, version_h],
|
||||
c_args : [cc_audit_flags, cc_branding_flags, cc_pam_flags, cc_selinux_flags],
|
||||
link_with: [libeinfo, librc],
|
||||
dependencies: [dl_dep, libpam, util_dep, selinux_dep],
|
||||
include_directories: [incdir, einfo_incdir, rc_incdir],
|
||||
install: true,
|
||||
install_dir: sbindir)
|
||||
|
||||
executable('start-stop-daemon',
|
||||
['start-stop-daemon.c', 'rc-pipes.c', rc_misc_c, rc_schedules_c,
|
||||
rc_selinux_c, usage_c, version_h],
|
||||
c_args : [cc_audit_flags, cc_branding_flags, cc_pam_flags, cc_selinux_flags],
|
||||
link_with: [libeinfo, librc],
|
||||
dependencies: [dl_dep, libpam, util_dep, selinux_dep],
|
||||
include_directories: [incdir, einfo_incdir, rc_incdir],
|
||||
install: true,
|
||||
install_dir: sbindir)
|
||||
|
||||
executable('supervise-daemon',
|
||||
['supervise-daemon.c', rc_misc_c, rc_plugin_c, rc_schedules_c,
|
||||
usage_c, version_h],
|
||||
c_args : [cc_branding_flags, cc_pam_flags, cc_selinux_flags],
|
||||
link_with: [libeinfo, librc],
|
||||
dependencies: [dl_dep, libpam, util_dep, selinux_dep],
|
||||
include_directories: [incdir, einfo_incdir, rc_incdir],
|
||||
install: true,
|
||||
install_dir: sbindir)
|
||||
|
||||
if os == 'Linux'
|
||||
executable('openrc-init',
|
||||
['openrc-init.c', rc_plugin_c, rc_wtmp_c, version_h],
|
||||
include_directories: [incdir, einfo_incdir, rc_incdir],
|
||||
link_with: [libeinfo, librc],
|
||||
dependencies: [dl_dep],
|
||||
install: true,
|
||||
install_dir: sbindir)
|
||||
|
||||
executable('openrc-shutdown',
|
||||
['openrc-shutdown.c', 'broadcast.c', 'rc-sysvinit.c', rc_misc_c,
|
||||
usage_c, rc_wtmp_c, version_h],
|
||||
c_args : cc_branding_flags,
|
||||
include_directories: [incdir, einfo_incdir, rc_incdir],
|
||||
link_with: [libeinfo, librc],
|
||||
install: true,
|
||||
install_dir: sbindir)
|
||||
endif
|
||||
|
||||
einfo_execs = [
|
||||
'einfon',
|
||||
'einfo',
|
||||
'ewarnn',
|
||||
'ewarn',
|
||||
'eerrorn',
|
||||
'eerror',
|
||||
'ebegin',
|
||||
'eend',
|
||||
'ewend',
|
||||
'eindent',
|
||||
'eoutdent',
|
||||
'esyslog',
|
||||
'eval_ecolors',
|
||||
'ewaitfile',
|
||||
'veinfo',
|
||||
'vewarn',
|
||||
'vebegin',
|
||||
'veend',
|
||||
'vewend',
|
||||
'veindent',
|
||||
'veoutdent',
|
||||
]
|
||||
|
||||
foreach exec: einfo_execs
|
||||
executable(exec,
|
||||
['do_e.c', rc_misc_c, version_h],
|
||||
include_directories: [incdir, einfo_incdir, rc_incdir],
|
||||
link_with: [libeinfo, librc],
|
||||
install: true,
|
||||
install_dir: rc_bindir)
|
||||
endforeach
|
||||
|
||||
executable('checkpath',
|
||||
['checkpath.c', rc_misc_c, usage_c, rc_selinux_c,
|
||||
version_h],
|
||||
c_args : [cc_audit_flags, cc_branding_flags, cc_pam_flags, cc_selinux_flags],
|
||||
include_directories: [incdir, einfo_incdir, rc_incdir],
|
||||
link_with: [libeinfo, librc],
|
||||
dependencies: [libpam, selinux_dep],
|
||||
install: true,
|
||||
install_dir: rc_bindir)
|
||||
|
||||
executable('fstabinfo',
|
||||
['fstabinfo.c', rc_misc_c, usage_c, version_h],
|
||||
c_args : cc_branding_flags,
|
||||
include_directories: [incdir, einfo_incdir, rc_incdir],
|
||||
link_with: [libeinfo, librc],
|
||||
install: true,
|
||||
install_dir: rc_bindir)
|
||||
|
||||
executable('mountinfo',
|
||||
['mountinfo.c', rc_misc_c, usage_c, version_h],
|
||||
c_args : cc_branding_flags,
|
||||
include_directories: [incdir, einfo_incdir, rc_incdir],
|
||||
link_with: [libeinfo, librc],
|
||||
install: true,
|
||||
install_dir: rc_bindir)
|
||||
|
||||
executable('rc-depend',
|
||||
['rc-depend.c', rc_misc_c, usage_c, version_h],
|
||||
c_args : cc_branding_flags,
|
||||
include_directories: [incdir, einfo_incdir, rc_incdir],
|
||||
link_with: [libeinfo, librc],
|
||||
install: true,
|
||||
install_dir: rc_bindir)
|
||||
|
||||
executable('is_newer_than',
|
||||
['is_newer_than.c', rc_misc_c, version_h],
|
||||
include_directories: [incdir, einfo_incdir, rc_incdir],
|
||||
link_with: [libeinfo, librc],
|
||||
install: true,
|
||||
install_dir: rc_bindir)
|
||||
|
||||
executable('is_older_than',
|
||||
['is_older_than.c', rc_misc_c, version_h],
|
||||
include_directories: [incdir, einfo_incdir, rc_incdir],
|
||||
link_with: [libeinfo, librc],
|
||||
install: true,
|
||||
install_dir: rc_bindir)
|
||||
|
||||
service_execs = [
|
||||
'service_starting',
|
||||
'service_started',
|
||||
'service_stopping',
|
||||
'service_stopped',
|
||||
'service_inactive',
|
||||
'service_wasinactive',
|
||||
'service_hotplugged',
|
||||
'service_started_daemon',
|
||||
'service_crashed',
|
||||
]
|
||||
|
||||
foreach exec : service_execs
|
||||
executable(exec,
|
||||
['do_service.c', rc_misc_c, version_h],
|
||||
include_directories: [incdir, einfo_incdir, rc_incdir],
|
||||
link_with: [libeinfo, librc],
|
||||
install: true,
|
||||
install_dir: rc_bindir)
|
||||
endforeach
|
||||
|
||||
value_execs = [
|
||||
'service_get_value',
|
||||
'service_set_value',
|
||||
'get_options',
|
||||
'save_options',
|
||||
]
|
||||
|
||||
foreach exec : value_execs
|
||||
executable(exec,
|
||||
['do_value.c', rc_misc_c, version_h],
|
||||
include_directories: [incdir, einfo_incdir, rc_incdir],
|
||||
link_with: [libeinfo, librc],
|
||||
install: true,
|
||||
install_dir: rc_bindir)
|
||||
endforeach
|
||||
|
||||
if os == 'Linux'
|
||||
executable('kill_all',
|
||||
['kill_all.c', usage_c, version_h],
|
||||
c_args : cc_branding_flags,
|
||||
include_directories: [incdir, einfo_incdir, rc_incdir],
|
||||
link_with: [libeinfo,librc],
|
||||
install: true,
|
||||
install_dir: rc_bindir)
|
||||
endif
|
||||
|
||||
executable('shell_var',
|
||||
['shell_var.c'],
|
||||
install: true,
|
||||
install_dir: rc_bindir)
|
||||
|
||||
mark_service_execs = [
|
||||
'mark_service_starting',
|
||||
'mark_service_started',
|
||||
'mark_service_stopping',
|
||||
'mark_service_stopped',
|
||||
'mark_service_inactive',
|
||||
'mark_service_wasinactive',
|
||||
'mark_service_hotplugged',
|
||||
'mark_service_failed',
|
||||
'mark_service_crashed',
|
||||
]
|
||||
|
||||
foreach exec : mark_service_execs
|
||||
executable(exec,
|
||||
['do_mark_service.c', rc_misc_c, version_h],
|
||||
include_directories: [incdir, einfo_incdir, rc_incdir],
|
||||
link_with: [libeinfo,librc],
|
||||
install: true,
|
||||
install_dir: rc_sbindir)
|
||||
endforeach
|
||||
|
||||
executable('rc-abort',
|
||||
'rc-abort.c',
|
||||
include_directories: [einfo_incdir],
|
||||
link_with: [libeinfo],
|
||||
install: true,
|
||||
install_dir: rc_sbindir)
|
||||
|
||||
executable('swclock',
|
||||
['swclock.c', rc_misc_c, usage_c, version_h],
|
||||
c_args : cc_branding_flags,
|
||||
include_directories: [incdir, einfo_incdir, rc_incdir],
|
||||
link_with: [libeinfo,librc],
|
||||
install: true,
|
||||
install_dir: rc_sbindir)
|
||||
Reference in New Issue
Block a user