Comply with GJS packaging spec

According to spec, package name should always be set to main package name in DBus name format
This commit is contained in:
Rafał Dzięgiel
2021-09-06 14:29:16 +02:00
parent 7aa03f3e72
commit 873e724bf2
3 changed files with 3 additions and 23 deletions

View File

@@ -1,17 +0,0 @@
#!@GJS@
/* pkg init enforces the imports path to the folder
* named after the pkg name, but I would prefer to have
* the bundled subprocess stored in the same directory */
imports.searchPath.unshift('@datadir@/@PACKAGE_NAME@');
const Package = imports.package;
Package.init({
name: '@PACKAGE_NAME@.@ID_POSTFIX@',
version: '@PACKAGE_VERSION@',
prefix: '@prefix@',
libdir: '@libdir@',
datadir: '@datadir@',
});
Package.run(imports.src.main@ID_POSTFIX@);

View File

@@ -1,12 +1,10 @@
#!@GJS@
const Package = imports.package;
Package.init({
imports.package.init({
name: '@PACKAGE_NAME@',
version: '@PACKAGE_VERSION@',
prefix: '@prefix@',
libdir: '@libdir@',
datadir: '@datadir@',
});
Package.run(imports.src.main);
imports.package.run(imports.src.main@ID_POSTFIX@);

View File

@@ -2,7 +2,6 @@ clapper_apps = ['', 'Remote', 'Daemon']
foreach id_postfix : clapper_apps
app_postfix = (id_postfix != '') ? '.' + id_postfix : ''
template_type = (id_postfix != '') ? '.Subprocess' : ''
bin_conf = configuration_data()
bin_conf.set('GJS', find_program('gjs').path())
@@ -14,7 +13,7 @@ foreach id_postfix : clapper_apps
bin_conf.set('datadir', join_paths(get_option('prefix'), get_option('datadir')))
configure_file(
input: 'com.github.rafostar.Clapper' + template_type + '.in',
input: 'com.github.rafostar.Clapper.in',
output: 'com.github.rafostar.Clapper' + app_postfix,
configuration: bin_conf,
install: true,