feat: add app-update-notifier
Signed-off-by: ComixHe <heyuming@deepin.org>
This commit is contained in:
32
apps/app-update-notifier/misc/CMakeLists.txt
Normal file
32
apps/app-update-notifier/misc/CMakeLists.txt
Normal file
@ -0,0 +1,32 @@
|
||||
# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
|
||||
#
|
||||
# SPDX-License-Identifier: LGPL-3.0-or-later
|
||||
include(GNUInstallDirs)
|
||||
|
||||
configure_file(
|
||||
systemd/system/org.desktopspec.ApplicationUpdateNotifier1.service.in
|
||||
systemd/system/org.desktopspec.ApplicationUpdateNotifier1.service
|
||||
@ONLY
|
||||
)
|
||||
|
||||
set(SYSTEMD_SYSTEM_FILE
|
||||
${CMAKE_CURRENT_BINARY_DIR}/systemd/system/org.desktopspec.ApplicationUpdateNotifier1.service
|
||||
)
|
||||
|
||||
install(FILES ${SYSTEMD_SYSTEM_FILE} DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/systemd/system/)
|
||||
|
||||
configure_file(
|
||||
dbus/org.desktopspec.ApplicationUpdateNotifier1.service.in
|
||||
dbus/org.desktopspec.ApplicationUpdateNotifier1.service
|
||||
@ONLY
|
||||
)
|
||||
|
||||
set(DBUS_APPLICATION_UPDATE_NOTIFIER_SERVICE_FILE
|
||||
${CMAKE_CURRENT_BINARY_DIR}/dbus/org.desktopspec.ApplicationUpdateNotifier1.service
|
||||
)
|
||||
|
||||
install(FILES ${DBUS_APPLICATION_UPDATE_NOTIFIER_SERVICE_FILE}
|
||||
DESTINATION ${CMAKE_INSTALL_DATADIR}/dbus-1/service)
|
||||
|
||||
install(FILES ${CMAKE_CURRENT_LIST_DIR}/dbus/org.desktopspec.ApplicationUpdateNotifier1.conf
|
||||
DESTINATION /usr/share/dbus-1/system.d)
|
@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
|
||||
SPDX-License-Identifier: LGPL-3.0-or-later
|
||||
-->
|
||||
<!-- -*- XML -*- -->
|
||||
<!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.desktopspec.ApplicationUpdateNotifier1"/>
|
||||
</policy>
|
||||
<policy context="default">
|
||||
<allow send_destination="org.desktopspec.ApplicationUpdateNotifier1"/>
|
||||
<allow receive_sender="org.desktopspec.ApplicationUpdateNotifier1"/>
|
||||
</policy>
|
||||
<!-- Only allow @LINGLONG_USERNAME@ to invoke methods on the interfaces -->
|
||||
<policy user="root">
|
||||
<allow send_destination="org.desktopspec.ApplicationUpdateNotifier1"/>
|
||||
</policy>
|
||||
</busconfig>
|
@ -0,0 +1,9 @@
|
||||
# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
|
||||
#
|
||||
# SPDX-License-Identifier: LGPL-3.0-or-later
|
||||
|
||||
[D-BUS Service]
|
||||
Name=org.desktopspec.ApplicationUpdateNotifier1
|
||||
Exec=@CMAKE_INSTALL_FULL_BINDIR@/app-update-notifier
|
||||
User=root
|
||||
SystemdService=org.desktopspec.ApplicationUpdateNotifier1
|
@ -0,0 +1,13 @@
|
||||
# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
|
||||
#
|
||||
# SPDX-License-Identifier: LGPL-3.0-or-later
|
||||
|
||||
[Unit]
|
||||
Description=Notify by signal when Application changed by package manager.
|
||||
|
||||
[Service]
|
||||
Type=dbus
|
||||
User=root
|
||||
Group=root
|
||||
BusName=org.desktopspec.ApplicationUpdateNotifier1
|
||||
ExecStart=@CMAKE_INSTALL_FULL_BINDIR@/app-update-notifier
|
Reference in New Issue
Block a user