-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
47c840f
commit 9ed8cc5
Showing
6 changed files
with
121 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
if systemduserunitdir != '' | ||
configure_file( | ||
input: 'oo7-daemon.service.in', | ||
output: 'oo7-daemon.service', | ||
configuration: libexecdir_conf, | ||
install_dir: systemduserunitdir, | ||
) | ||
endif | ||
|
||
configure_file( | ||
input: 'org.freedesktop.secrets.service.in', | ||
output: 'org.freedesktop.secrets.service', | ||
configuration: libexecdir_conf, | ||
install_dir: dbus_service_dir, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[Unit] | ||
Description=Secret service (oo7 implementation) | ||
|
||
[Service] | ||
Type=simple | ||
StandardError=journal | ||
ExecStart=@libexecdir@/oo7-daemon | ||
Restart=on-failure | ||
|
||
[Install] | ||
WantedBy=default.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[D-BUS Service] | ||
Name=org.freedesktop.secrets | ||
Exec=@libexecdir@/oo7-daemon |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
project( | ||
'oo7-daemon', | ||
'rust', | ||
version: '0.1.0', | ||
meson_version: '>= 0.59.0', | ||
) | ||
|
||
is_devel = get_option('profile') == 'development' | ||
|
||
prefix = get_option('prefix') | ||
datadir = get_option('datadir') | ||
dbus_service_dir = get_option('dbus_service_dir') | ||
libexecdir = get_option('libexecdir') | ||
|
||
build_systemd_service = get_option('systemd') | ||
systemduserunitdir = get_option('systemduserunitdir') | ||
if systemduserunitdir == '' | ||
systemd = dependency('systemd', version: '>= 242', required: build_systemd_service) | ||
if build_systemd_service.allowed() and systemd.found() | ||
systemduserunitdir = systemd.get_variable( | ||
pkgconfig: 'systemduserunitdir', | ||
pkgconfig_define: ['prefix', prefix] | ||
) | ||
endif | ||
endif | ||
|
||
libexecdir_conf = configuration_data() | ||
libexecdir_conf.set('libexecdir', prefix / libexecdir) | ||
|
||
summary({ | ||
'prefix': prefix, | ||
'datadir': datadir, | ||
'libexecdir': libexecdir, | ||
'dbus_service_dir': dbus_service_dir, | ||
}) | ||
|
||
subdir('data') | ||
subdir('src') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
option('dbus_service_dir', | ||
type: 'string', | ||
description: 'Directory for D-Bus service files' | ||
) | ||
|
||
option('systemd', | ||
type: 'feature', | ||
value: 'auto', | ||
description: 'Enable systemd support' | ||
) | ||
|
||
option('systemduserunitdir', | ||
type: 'string', | ||
description: 'Directory for systemd user service files' | ||
) | ||
|
||
option ( | ||
'profile', | ||
type: 'combo', | ||
choices: [ | ||
'default', | ||
'development' | ||
], | ||
value: 'default', | ||
description: 'The build profile. One of "default" or "development".' | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
cargo = find_program('cargo') | ||
|
||
cargo_options = [] | ||
cargo_options += [ '--target-dir', meson.project_build_root() / 'src' ] | ||
if is_devel | ||
rust_target = 'debug' | ||
message('Building in debug mode') | ||
else | ||
cargo_options += [ '--release' ] | ||
rust_target = 'release' | ||
message('Building in release mode') | ||
endif | ||
|
||
cargo_build = custom_target( | ||
'cargo-build', | ||
build_by_default: true, | ||
build_always_stale: true, | ||
output: meson.project_name(), | ||
console: true, | ||
install: true, | ||
install_dir: libexecdir, | ||
command: [ | ||
cargo, 'build', | ||
cargo_options, | ||
'&&', | ||
'cp', 'src' / rust_target / meson.project_name(), '@OUTPUT@', | ||
] | ||
) |