diff options
author | Aylur <[email protected]> | 2024-10-22 22:27:42 +0000 |
---|---|---|
committer | Aylur <[email protected]> | 2024-10-23 01:31:01 +0200 |
commit | 02fdcbe57155bd62c632a75e08087177b7c66eb9 (patch) | |
tree | b2c7028ad044e1de3b3d695b346186ef4e42595f /lib/apps | |
parent | 9a6c776f8fb145a602bcfe9046955d0d2f268416 (diff) |
docs: fixup notifd and apps
Diffstat (limited to 'lib/apps')
-rw-r--r-- | lib/apps/application.vala | 4 | ||||
l--------- | lib/apps/gir.py | 1 | ||||
-rw-r--r-- | lib/apps/meson.build | 46 |
3 files changed, 34 insertions, 17 deletions
diff --git a/lib/apps/application.vala b/lib/apps/application.vala index 7e20b06..ea22e7a 100644 --- a/lib/apps/application.vala +++ b/lib/apps/application.vala @@ -5,7 +5,7 @@ public class AstalApps.Application : Object { public DesktopAppInfo app { get; construct set; } /** - * The number of times [[email protected]] was called on this Application. + * The number of times [[email protected]] was called on this Application. */ public int frequency { get; set; default = 0; } @@ -32,7 +32,7 @@ public class AstalApps.Application : Object { /** * `Exec` field from the desktop file. - * Note that if you want to launch this Application you should use the [[email protected]] method. + * Note that if you want to launch this Application you should use the [[email protected]] method. */ public string executable { owned get { return app.get_string("Exec"); } } diff --git a/lib/apps/gir.py b/lib/apps/gir.py new file mode 120000 index 0000000..b5b4f1d --- /dev/null +++ b/lib/apps/gir.py @@ -0,0 +1 @@ +../gir.py
\ No newline at end of file diff --git a/lib/apps/meson.build b/lib/apps/meson.build index b83b216..eb7a90b 100644 --- a/lib/apps/meson.build +++ b/lib/apps/meson.build @@ -39,35 +39,41 @@ deps = [ dependency('json-glib-1.0'), ] -sources = [ - config, - 'apps.vala', +sources = [config] + files( 'application.vala', + 'apps.vala', 'cli.vala', 'fuzzy.vala', -] +) if get_option('lib') lib = library( meson.project_name(), sources, dependencies: deps, + vala_args: ['--vapi-comments'], vala_header: meson.project_name() + '.h', vala_vapi: meson.project_name() + '-' + api_version + '.vapi', - vala_gir: gir, version: meson.project_version(), install: true, - install_dir: [true, true, true, true], + install_dir: [true, true, true], ) - import('pkgconfig').generate( - lib, - name: meson.project_name(), - filebase: meson.project_name() + '-' + api_version, - version: meson.project_version(), - subdirs: meson.project_name(), - requires: deps, - install_dir: get_option('libdir') / 'pkgconfig', + pkgs = [] + foreach dep : deps + pkgs += ['--pkg=' + dep.name()] + endforeach + + gir_tgt = custom_target( + gir, + command: [find_program('python3'), files('gir.py'), meson.project_name(), gir] + + pkgs + + sources, + input: sources, + depends: lib, + output: gir, + install: true, + install_dir: get_option('datadir') / 'gir-1.0', ) custom_target( @@ -80,10 +86,20 @@ if get_option('lib') ], input: lib, output: typelib, - depends: lib, + depends: [lib, gir_tgt], install: true, install_dir: get_option('libdir') / 'girepository-1.0', ) + + import('pkgconfig').generate( + lib, + name: meson.project_name(), + filebase: meson.project_name() + '-' + api_version, + version: meson.project_version(), + subdirs: meson.project_name(), + requires: deps, + install_dir: get_option('libdir') / 'pkgconfig', + ) endif if get_option('cli') |