diff options
author | Daiki Ueno <dueno@src.gnome.org> | 2021-02-14 08:06:00 +0100 |
---|---|---|
committer | Daiki Ueno <dueno@src.gnome.org> | 2021-02-14 08:06:00 +0100 |
commit | 281aeb61ff4c74f829cb64638369d940cdbd5359 (patch) | |
tree | ea4f0629124a336376d63cd402e8175885819723 | |
parent | 4b900259dfeccdbd6a949c935c99afe5bf468937 (diff) | |
download | gcr-wip/dueno/ssh-agent.tar.gz |
gcr-ssh-agent: Install profile.d file to set SSH_AUTH_SOCKwip/dueno/ssh-agent
-rw-r--r-- | gcr/gcr-ssh-agent.sh | 5 | ||||
-rw-r--r-- | gcr/meson.build | 3 | ||||
-rw-r--r-- | meson.build | 5 | ||||
-rw-r--r-- | meson_options.txt | 5 |
4 files changed, 18 insertions, 0 deletions
diff --git a/gcr/gcr-ssh-agent.sh b/gcr/gcr-ssh-agent.sh new file mode 100644 index 0000000..b7c82fa --- /dev/null +++ b/gcr/gcr-ssh-agent.sh @@ -0,0 +1,5 @@ +if test -z "${SSH_AUTH_SOCK+set}" && test -e "$XDG_RUNTIME_DIR/gcr/ssh"; then + SSH_AUTH_SOCK=$XDG_RUNTIME_DIR/gcr/ssh + export SSH_AUTH_SOCK +fi + diff --git a/gcr/meson.build b/gcr/meson.build index 7a3b69a..f450daa 100644 --- a/gcr/meson.build +++ b/gcr/meson.build @@ -273,6 +273,9 @@ if get_option('ssh_agent') install_dir: systemduserunitdir) endif + install_data('gcr-ssh-agent.sh', + install_dir: profile_dir) + gcr_ssh_agent_test_cflags = [ '-DSRCDIR="@0@"'.format(source_root), '-D_GCR_TEST_SSH_ASKPASS_PATH="@0@"'.format(gcr_ssh_askpass.full_path()), diff --git a/meson.build b/meson.build index fa0e3a0..8b0f7e9 100644 --- a/meson.build +++ b/meson.build @@ -65,6 +65,11 @@ if libsystemd.found() and systemd.found() with_systemd = true endif +profile_dir = get_option('profile_dir') +if profile_dir == '' + profile_dir = gcr_prefix / get_option('sysconfdir') / 'profile.d' +endif + if get_option('gtk') gtk_min_version = '3.22' gtk_dep = dependency('gtk+-3.0', version: '>=' + gtk_min_version) diff --git a/meson_options.txt b/meson_options.txt index f96a47c..df1fdd0 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -28,3 +28,8 @@ option('systemd', value: 'auto', description: 'Use systemd socket activation for server programs' ) +option('profile_dir', + type: 'string', + value: '', + description: 'Path to profile.d files, default is SYSCONFDIR/profile.d' +) |