diff options
| author | Matthias Klumpp <matthias@tenstral.net> | 2020-10-21 16:55:51 +0200 | 
|---|---|---|
| committer | Matthias Klumpp <matthias@tenstral.net> | 2020-10-21 16:55:51 +0200 | 
| commit | 08d1b592781ce8427451f59da627e81c3282796f (patch) | |
| tree | b6ef077b74aa15f62778b7101b803c4eae3240b7 | |
| parent | 830af50b26d82d8ef077d6546a7e4edac83686c7 (diff) | |
aptcc: Build socket-activated debconf helper again
This resolves #366
| -rw-r--r-- | backends/aptcc/meson.build | 31 | ||||
| -rw-r--r-- | meson.build | 8 | ||||
| -rw-r--r-- | meson_options.txt | 1 | 
3 files changed, 39 insertions, 1 deletions
| diff --git a/backends/aptcc/meson.build b/backends/aptcc/meson.build index 2a6eae727..3b8354d4b 100644 --- a/backends/aptcc/meson.build +++ b/backends/aptcc/meson.build @@ -79,3 +79,34 @@ install_data(    'pkconffile.nodiff',    install_dir: join_paths(get_option('datadir'), 'PackageKit', 'helpers', 'aptcc'),  ) + +if get_option('systemd') +  executable( +    'pk-debconf-helper', +    'pk-debconf-helper.c', +    dependencies: [ +      packagekit_glib2_dep, +      libsystemd +    ], +    install: true, +    install_dir: get_option('libexecdir') +  ) + +  sd_config_data = configuration_data() +  sd_config_data.set('libexecdir', join_paths(get_option('prefix'), get_option('libexecdir'))) + +  configure_file( +    input: 'pk-debconf-helper.service.in', +    output: 'pk-debconf-helper.service', +    configuration: sd_config_data, +    install: true, +    install_dir: systemd_user_unit_dir, +  ) +  configure_file( +    input: 'pk-debconf-helper.socket.in', +    output: 'pk-debconf-helper.socket', +    configuration: sd_config_data, +    install: true, +    install_dir: systemd_user_unit_dir, +  ) +endif diff --git a/meson.build b/meson.build index 95cc6f7c3..25b12a7c1 100644 --- a/meson.build +++ b/meson.build @@ -24,10 +24,16 @@ libsystemd = []  if get_option('systemd')    libsystemd = dependency('libsystemd', version: '>=213')    systemd_system_unit_dir = get_option('systemdsystemunitdir') -  if systemd_system_unit_dir == '' +  systemd_user_unit_dir = get_option('systemduserunitdir') +  if systemd_system_unit_dir == '' or systemd_user_unit_dir == ''      systemd = dependency('systemd') +  endif +  if systemd_system_unit_dir == ''      systemd_system_unit_dir = systemd.get_pkgconfig_variable('systemdsystemunitdir')    endif +  if systemd_user_unit_dir == '' +    systemd_user_unit_dir = systemd.get_pkgconfig_variable('systemduserunitdir') +  endif    add_project_arguments ('-DHAVE_SYSTEMD_SD_LOGIN_H=1', language: 'c')  else diff --git a/meson_options.txt b/meson_options.txt index 12c36b8c2..2f3a1dac9 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -2,6 +2,7 @@ option('packaging_backend', type : 'array', choices : ['alpm', 'aptcc', 'dnf', '  option('dnf_vendor', type : 'combo', choices : ['fedora', 'mageia', 'openmandriva', 'rosa', 'opensuse'], value : 'fedora', description : 'Vendor configuration when using the dnf backend')  option('systemd', type : 'boolean', value : true, description : 'Use systemd and logind')  option('systemdsystemunitdir', type : 'string', value : '', description : 'Directory for systemd service files') +option('systemduserunitdir', type : 'string', value : '', description : 'Directory for systemd user service files')  option('offline_update', type : 'boolean', value : true, description : 'Use systemd offline update')  option('elogind', type : 'boolean', value : false, description : 'Use elogind instead of systemd-login')  option('gobject_introspection', type : 'boolean', value : true, description : 'Build GObject Introspection data') | 
