Dustin Falgout
8 years ago
3 changed files with 136 additions and 0 deletions
@ -0,0 +1,66 @@
|
||||
project('lightdm-webkit2-greeter', 'c', version: '2.1.5', license: 'GPL-3') |
||||
|
||||
|
||||
# ================================== # |
||||
# ------->>> Version Vars <<<------- # |
||||
# ================================== # |
||||
|
||||
as_version = meson.project_version() |
||||
version_parts = as_version.split('.') |
||||
|
||||
as_major_version = version_parts[0] |
||||
as_minor_version = version_parts[1] |
||||
as_micro_version = version_parts[2] |
||||
|
||||
|
||||
# ======================================= # |
||||
# ------->>> Dependency Checks <<<------- # |
||||
# ======================================= # |
||||
|
||||
dbus_glib = dependency('dbus-glib-1') |
||||
|
||||
gtk3 = dependency('gtk+-3.0', version: '>=3.16') |
||||
|
||||
libldm_gobject = dependency('liblightdm-gobject-1') |
||||
|
||||
webkit2 = dependency('webkit2gtk-4.0', version: '>=2.10.7') |
||||
|
||||
webkit2_webext = dependency('webkit2gtk-web-extension-4.0', version: '>=2.10.7') |
||||
|
||||
x11 = dependency('x11') |
||||
|
||||
deps = [dbus_glib, gtk3, libldm_gobject, webkit2, x11] |
||||
webext_deps = deps + [webkit2_webext] |
||||
|
||||
|
||||
# =================================== # |
||||
# ------->>> Configuration <<<------- # |
||||
# =================================== # |
||||
|
||||
conf = configuration_data() |
||||
|
||||
conf.set('VERSION', as_version) |
||||
conf.set('PACKAGE_VERSION', as_version) |
||||
conf.set('AS_MAJOR_VERSION', as_major_version) |
||||
conf.set('AS_MINOR_VERSION', as_minor_version) |
||||
conf.set('AS_MICRO_VERSION', as_micro_version) |
||||
|
||||
conf.set('GETTEXT_PACKAGE', '"lightdm-webkit2-greeter"') |
||||
|
||||
conf.set('THEME_DIR', '"@0@"'.format(get_option('with-theme-dir'))) |
||||
|
||||
conf.set('CONFIG_DIR', '"@0@"'.format(get_option('with-config-dir'))) |
||||
|
||||
conf.set('DESKTOP_DIR', '"@0@"'.format(get_option('with-desktop-dir'))) |
||||
|
||||
|
||||
# ===================================== # |
||||
# ------->>> Sub Directories <<<------- # |
||||
# ===================================== # |
||||
|
||||
subdirs = ['src'] |
||||
|
||||
foreach s : subdirs |
||||
subdir(s) |
||||
endforeach |
||||
|
@ -0,0 +1,14 @@
|
||||
option('with-theme-dir', |
||||
type : 'string', |
||||
value : '/usr/share/lightdm-webkit/themes', |
||||
description : 'Directory to use for greeter themes') |
||||
|
||||
option('with-config-dir', |
||||
type : 'string', |
||||
value : '/etc/lightdm/', |
||||
description : 'LightDM configuration directory') |
||||
|
||||
option('with-desktop-dir', |
||||
type : 'string', |
||||
value : '/usr/share/xgreeters/', |
||||
description : 'LightDM greeters directory') |
@ -0,0 +1,56 @@
|
||||
pkgg = import('pkgconfig') |
||||
|
||||
configure_file(output: 'config.h', configuration: conf) |
||||
|
||||
# ======================================= # |
||||
# ------->>> Webkit2 Extension <<<------- # |
||||
# ======================================= # |
||||
|
||||
webext_sources = ['lightdm-webkit2-greeter-ext.c'] |
||||
|
||||
webext_incdir = include_directories('.') |
||||
|
||||
webext_cargs = [ |
||||
'-DVERSION=@0@'.format(as_version), |
||||
'-DLOCALE_DIR=@0@'.format(get_option('localedir')) |
||||
] |
||||
|
||||
webext = shared_library( |
||||
'lightdm-webkit2-greeter-webext', |
||||
webext_sources, |
||||
dependencies: webext_deps, |
||||
c_args: webext_cargs, |
||||
include_directories : webext_incdir, |
||||
install: true) |
||||
|
||||
pkgg.generate( |
||||
version : as_version, |
||||
libraries : webext, |
||||
name : 'lightdm-webkit2-greeter-webext', |
||||
description : 'WebKit web extension that allows the greeter to execute code inside the web process.', |
||||
filebase : 'lightdm-webkit2-greeter', |
||||
subddirs : 'lightdm-webkit2-greeter') |
||||
|
||||
|
||||
# ===================================== # |
||||
# ------->>> LightDM Greeter <<<------- # |
||||
# ===================================== # |
||||
|
||||
greeter_sources = ['lightdm-webkit2-greeter.c'] |
||||
|
||||
greeter_incdir = include_directories('.') |
||||
|
||||
extdir = '@0@/@1@'.format(get_option('libdir'), 'lightdm-webkit2-greeter') |
||||
|
||||
greeter_cargs = [ |
||||
'-DLIGHTDM_WEBKIT2_GREETER_EXTENSIONS_DIR=@0@'.format(extdir), |
||||
'-DVERSION=@0@'.format(as_version), |
||||
'-DLOCALE_DIR=@0@'.format(get_option('localedir')) |
||||
] |
||||
|
||||
greeter = executable( |
||||
'lightdm-webkit2-greeter', |
||||
sources: greeter_sources, |
||||
include_directories: greeter_incdir, |
||||
dependencies: deps, |
||||
c_args: greeter_cargs) |
Loading…
Reference in new issue