diff --git a/meson.build b/meson.build index 6ee4466ba..71f8a3ea1 100644 --- a/meson.build +++ b/meson.build @@ -6,7 +6,8 @@ project('OpenRC', 'c', 'prefix=/usr', 'warning_level=3', ], - meson_version : '>=0.53.2') + meson_version : '>=0.56.0' # pkgconfig dict support +) cc = meson.get_compiler('c') fs = import('fs') @@ -207,7 +208,6 @@ subdir('etc') subdir('init.d') subdir('local.d') subdir('man') -subdir('pkgconfig') subdir('sh') subdir('src') subdir('support') @@ -215,6 +215,29 @@ subdir('sysctl.d') subdir('test') subdir('zsh-completion') +if get_option('pkgconfig') + pkg = import('pkgconfig') + + einfo_pkgconf = pkg.generate( + name : 'einfo', + description : 'Pretty console informational display', + version : meson.project_version(), + libraries : libeinfo, + subdirs : ['einfo'], + ) + + openrc_pkgconf = pkg.generate( + name : 'OpenRC', + description : 'Universal init system', + version : meson.project_version(), + libraries : librc, + subdirs : ['openrc'], + variables: { + 'rc_path': rc_libexecdir, + } + ) +endif + meson.add_install_script('tools/meson_runlevels.sh', os, get_option('newnet') ? 'yes' : 'no', diff --git a/pkgconfig/einfo.pc.in b/pkgconfig/einfo.pc.in deleted file mode 100644 index b5242a66b..000000000 --- a/pkgconfig/einfo.pc.in +++ /dev/null @@ -1,9 +0,0 @@ -prefix=@PREFIX@ -exec_prefix=${prefix} -libdir=${prefix}/@LIB@ -includedir=/usr/include - -Name: einfo -Description: Pretty console informational display -Version: @VERSION@ -Libs: -L${libdir} -leinfo diff --git a/pkgconfig/meson.build b/pkgconfig/meson.build deleted file mode 100644 index 424b6ee0a..000000000 --- a/pkgconfig/meson.build +++ /dev/null @@ -1,24 +0,0 @@ -if get_option('pkgconfig') -pkgconfig_dir = get_option('libdir') / 'pkgconfig' - -pkgconfig_conf_data = configuration_data() -if rootprefix != '/' - pkgconfig_conf_data.set('PREFIX', rootprefix) -else - pkgconfig_conf_data.set('PREFIX', '') -endif -pkgconfig_conf_data.set('LIB', get_option('libdir')) -pkgconfig_conf_data.set('VERSION', meson.project_version()) - -pkgconfig_files = [ - 'einfo.pc.in', - 'openrc.pc.in', - ] - -foreach file : pkgconfig_files - configure_file(input : file, - output : '@BASENAME@', - configuration : pkgconfig_conf_data, - install_dir : pkgconfig_dir) -endforeach -endif diff --git a/pkgconfig/openrc.pc.in b/pkgconfig/openrc.pc.in deleted file mode 100644 index 9a8a9165a..000000000 --- a/pkgconfig/openrc.pc.in +++ /dev/null @@ -1,10 +0,0 @@ -prefix=@PREFIX@ -exec_prefix=${prefix} -libdir=${prefix}/@LIB@ -includedir=/usr/include - -Name: OpenRC -Description: Universal init system -Version: @VERSION@ -Cflags: -I${includedir} -Libs: -L${libdir} -lrc