code cleanup and openrc script
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
dbus_config_data = configuration_data()
|
||||
dbus_config_data.set('LIBEXEC_DIR', join_paths(get_option('prefix'), get_option('libexecdir'), meson.project_name()))
|
||||
dbus_config_data.set('LIBEXECDIR', join_paths(get_option('prefix'), get_option('libexecdir'), meson.project_name()))
|
||||
|
||||
dbus_config_data_file = configure_file(
|
||||
input: 'org.tuf.manager.server.service.in',
|
||||
output: 'org.tuf.manager.server.service',
|
||||
configuration: dbus_config_data
|
||||
output: 'org.tuf.manager.server.service',
|
||||
configuration: dbus_config_data
|
||||
)
|
||||
|
||||
install_data(
|
||||
|
@@ -2,22 +2,22 @@
|
||||
<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
|
||||
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
|
||||
<busconfig>
|
||||
<!-- Only root can own the service -->
|
||||
<policy user="root">
|
||||
<allow own="org.tuf.manager.server"/>
|
||||
</policy>
|
||||
<!-- Only root can own the service -->
|
||||
<policy user="root">
|
||||
<allow own="org.tuf.manager.server"/>
|
||||
</policy>
|
||||
|
||||
<!-- Allow anyone to invoke methods on the interfaces -->
|
||||
<policy context="default">
|
||||
<allow send_destination="org.tuf.manager.server"
|
||||
send_interface="org.tuf.manager.server"/>
|
||||
<!-- Allow anyone to invoke methods on the interfaces -->
|
||||
<policy context="default">
|
||||
<allow send_destination="org.tuf.manager.server"
|
||||
send_interface="org.tuf.manager.server"/>
|
||||
|
||||
<allow send_destination="org.tuf.manager.server"
|
||||
send_interface="org.freedesktop.DBus.Introspectable"/>
|
||||
<allow send_destination="org.tuf.manager.server"
|
||||
send_interface="org.freedesktop.DBus.Peer"/>
|
||||
<allow send_destination="org.tuf.manager.server"
|
||||
send_interface="org.freedesktop.DBus.Properties"/>
|
||||
</policy>
|
||||
<allow send_destination="org.tuf.manager.server"
|
||||
send_interface="org.freedesktop.DBus.Introspectable"/>
|
||||
<allow send_destination="org.tuf.manager.server"
|
||||
send_interface="org.freedesktop.DBus.Peer"/>
|
||||
<allow send_destination="org.tuf.manager.server"
|
||||
send_interface="org.freedesktop.DBus.Properties"/>
|
||||
</policy>
|
||||
</busconfig>
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
[D-BUS Service]
|
||||
Name=org.tuf.manager.server
|
||||
Exec=@LIBEXEC_DIR@/tuf-server
|
||||
Exec=@LIBEXECDIR@/tuf-server
|
||||
User=root
|
||||
|
@@ -1,12 +1,12 @@
|
||||
# server doesn't need gschema, only gui or cli
|
||||
if build_gui or build_cli
|
||||
gnome = import('gnome')
|
||||
gschemas = files(
|
||||
'org.tuf.manager.gschema.xml'
|
||||
)
|
||||
gnome.compile_schemas(
|
||||
build_by_default: true,
|
||||
depend_files: gschemas
|
||||
)
|
||||
install_data('org.tuf.manager.gschema.xml', install_dir: join_paths(get_option('prefix'), get_option('datadir'), 'glib-2.0', 'schemas'))
|
||||
gnome = import('gnome')
|
||||
gschemas = files(
|
||||
'org.tuf.manager.gschema.xml'
|
||||
)
|
||||
gnome.compile_schemas(
|
||||
build_by_default: true,
|
||||
depend_files: gschemas
|
||||
)
|
||||
install_data('org.tuf.manager.gschema.xml', install_dir: join_paths(get_option('prefix'), get_option('datadir'), 'glib-2.0', 'schemas'))
|
||||
endif
|
||||
|
@@ -1,49 +1,49 @@
|
||||
<schemalist>
|
||||
<schema id="org.tuf.manager" path="/org/tuf/manager/" gettext-domain="tuf-manager">
|
||||
<key name="restore" type="b">
|
||||
<default>false</default>
|
||||
<summary>Should TUF Manager restore previous settings when run</summary>
|
||||
<description>
|
||||
Should TUF Manager restore previous settings when run
|
||||
</description>
|
||||
</key>
|
||||
<key name="fan-mode" type="i">
|
||||
<default>0</default>
|
||||
<summary>Fan mode</summary>
|
||||
<description>
|
||||
The saved fan mode
|
||||
0 is balanced
|
||||
1 is turbo
|
||||
2 is silent
|
||||
</description>
|
||||
</key>
|
||||
<key name="keyboard-mode" type="i">
|
||||
<default>0</default>
|
||||
<summary>Keyboard mode</summary>
|
||||
<description>
|
||||
The saved keyboard mode
|
||||
0 is static
|
||||
1 is breathing
|
||||
2 is color cycle
|
||||
3 is strobing
|
||||
</description>
|
||||
</key>
|
||||
<key name="keyboard-speed" type="i">
|
||||
<default>0</default>
|
||||
<summary>Keyboard speed</summary>
|
||||
<description>
|
||||
The saved keyboard speed
|
||||
0 is slow
|
||||
1 is medium
|
||||
2 is fast
|
||||
</description>
|
||||
</key>
|
||||
<key name="keyboard-color" type="s">
|
||||
<default>"rgb(255,0,0)"</default>
|
||||
<summary>Keyboard color</summary>
|
||||
<description>
|
||||
The saved keyboard color in rgb format
|
||||
</description>
|
||||
</key>
|
||||
</schema>
|
||||
<schema id="org.tuf.manager" path="/org/tuf/manager/" gettext-domain="tuf-manager">
|
||||
<key name="restore" type="b">
|
||||
<default>false</default>
|
||||
<summary>Should TUF Manager restore previous settings when run</summary>
|
||||
<description>
|
||||
Should TUF Manager restore previous settings when run
|
||||
</description>
|
||||
</key>
|
||||
<key name="fan-mode" type="i">
|
||||
<default>0</default>
|
||||
<summary>Fan mode</summary>
|
||||
<description>
|
||||
The saved fan mode
|
||||
0 is balanced
|
||||
1 is turbo
|
||||
2 is silent
|
||||
</description>
|
||||
</key>
|
||||
<key name="keyboard-mode" type="i">
|
||||
<default>0</default>
|
||||
<summary>Keyboard mode</summary>
|
||||
<description>
|
||||
The saved keyboard mode
|
||||
0 is static
|
||||
1 is breathing
|
||||
2 is color cycle
|
||||
3 is strobing
|
||||
</description>
|
||||
</key>
|
||||
<key name="keyboard-speed" type="i">
|
||||
<default>0</default>
|
||||
<summary>Keyboard speed</summary>
|
||||
<description>
|
||||
The saved keyboard speed
|
||||
0 is slow
|
||||
1 is medium
|
||||
2 is fast
|
||||
</description>
|
||||
</key>
|
||||
<key name="keyboard-color" type="s">
|
||||
<default>"rgb(255,0,0)"</default>
|
||||
<summary>Keyboard color</summary>
|
||||
<description>
|
||||
The saved keyboard color in rgb format
|
||||
</description>
|
||||
</key>
|
||||
</schema>
|
||||
</schemalist>
|
||||
|
@@ -1,12 +1,12 @@
|
||||
if build_gui
|
||||
i18n.merge_file(
|
||||
input: 'tuf-manager.desktop.in',
|
||||
output: 'tuf-manager.desktop',
|
||||
po_dir: join_paths(meson.source_root(), 'po'),
|
||||
type: 'desktop',
|
||||
install: true,
|
||||
install_dir: join_paths(get_option('datadir'), 'applications')
|
||||
)
|
||||
i18n.merge_file(
|
||||
input: 'tuf-manager.desktop.in',
|
||||
output: 'tuf-manager.desktop',
|
||||
po_dir: join_paths(meson.source_root(), 'po'),
|
||||
type: 'desktop',
|
||||
install: true,
|
||||
install_dir: join_paths(get_option('datadir'), 'applications')
|
||||
)
|
||||
endif
|
||||
|
||||
subdir('dbus')
|
||||
|
@@ -1,10 +1,10 @@
|
||||
if not always_authenticated
|
||||
i18n.merge_file(
|
||||
input: 'org.tuf.manager.policy.in',
|
||||
output: 'org.tuf.manager.policy',
|
||||
po_dir: join_paths(meson.source_root(), 'po'),
|
||||
type: 'xml',
|
||||
install: true,
|
||||
install_dir: join_paths(get_option('datadir'), 'polkit-1', 'actions')
|
||||
)
|
||||
i18n.merge_file(
|
||||
input: 'org.tuf.manager.policy.in',
|
||||
output: 'org.tuf.manager.policy',
|
||||
po_dir: join_paths(meson.source_root(), 'po'),
|
||||
type: 'xml',
|
||||
install: true,
|
||||
install_dir: join_paths(get_option('datadir'), 'polkit-1', 'actions')
|
||||
)
|
||||
endif
|
||||
|
@@ -1,17 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE policyconfig PUBLIC
|
||||
"-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
|
||||
"http://www.freedesktop.org/standards/PolicyKit/1.0/policyconfig.dtd">
|
||||
"-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
|
||||
"http://www.freedesktop.org/standards/PolicyKit/1.0/policyconfig.dtd">
|
||||
<policyconfig>
|
||||
<vendor>TUF Manager</vendor>
|
||||
<vendor_url>https://git.cromer.cl/cromer/tuf-manager/</vendor_url>
|
||||
<icon_name>package-x-generic</icon_name>
|
||||
<action id="org.tuf.manager.save">
|
||||
<message>Authentication is required</message>
|
||||
<defaults>
|
||||
<allow_any>no</allow_any>
|
||||
<allow_inactive>auth_admin_keep</allow_inactive>
|
||||
<allow_active>auth_admin_keep</allow_active>
|
||||
</defaults>
|
||||
</action>
|
||||
<vendor>TUF Manager</vendor>
|
||||
<vendor_url>https://git.cromer.cl/cromer/tuf-manager/</vendor_url>
|
||||
<icon_name>tuf-manager</icon_name>
|
||||
<action id="org.tuf.manager.save">
|
||||
<message>Authentication is required</message>
|
||||
<defaults>
|
||||
<allow_any>no</allow_any>
|
||||
<allow_inactive>auth_admin_keep</allow_inactive>
|
||||
<allow_active>auth_admin_keep</allow_active>
|
||||
</defaults>
|
||||
</action>
|
||||
</policyconfig>
|
||||
|
Reference in New Issue
Block a user