[SCM] kdeconnect packaging branch, master, updated. debian/0.9g-1-1183-g9d69498
Maximiliano Curia
maxy at moszumanska.debian.org
Fri Oct 14 14:28:07 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/kdeconnect.git;a=commitdiff;h=d8943f0
The following commit has been merged in the master branch:
commit d8943f03ae609e0bb09a3a0793a74dd06f5141d6
Author: Albert Vaca <albertvaka at gmail.com>
Date: Sun Nov 9 22:10:51 2014 -0800
Added dbus activation to org.kde.kdeconnect
---
cmake/DbusActivationMacros.cmake | 31 +++++++++++++++++++++++
cmake/{macros.cmake => DbusInterfaceMacros.cmake} | 0
core/CMakeLists.txt | 2 +-
kded/CMakeLists.txt | 7 +++--
kded/org.kde.kdeconnect.service.in | 3 +++
plugins/battery/CMakeLists.txt | 2 +-
plugins/notifications/CMakeLists.txt | 3 ++-
plugins/sftp/CMakeLists.txt | 2 +-
8 files changed, 42 insertions(+), 8 deletions(-)
diff --git a/cmake/DbusActivationMacros.cmake b/cmake/DbusActivationMacros.cmake
new file mode 100644
index 0000000..2a038a5
--- /dev/null
+++ b/cmake/DbusActivationMacros.cmake
@@ -0,0 +1,31 @@
+include(UsePkgConfig)
+
+MACRO(PKGCONFIG_GETVAR _package _var _output_variable)
+ SET(${_output_variable})
+
+ # if pkg-config has been found
+ IF(PKGCONFIG_EXECUTABLE)
+
+ EXEC_PROGRAM(${PKGCONFIG_EXECUTABLE} ARGS ${_package} --exists RETURN_VALUE _return_VALUE OUTPUT_VARIABLE _pkgconfigDevNull )
+
+ # and if the package of interest also exists for pkg-config, then get the information
+ IF(NOT _return_VALUE)
+
+ EXEC_PROGRAM(${PKGCONFIG_EXECUTABLE} ARGS ${_package} --variable ${_var} OUTPUT_VARIABLE ${_output_variable} )
+
+ ENDIF(NOT _return_VALUE)
+
+ ENDIF(PKGCONFIG_EXECUTABLE)
+
+ENDMACRO(PKGCONFIG_GETVAR _package _var _output_variable)
+
+macro(dbus_add_activation_service _sources)
+ PKGCONFIG_GETVAR(dbus-1 session_bus_services_dir _install_dir)
+ foreach (_i ${_sources})
+ get_filename_component(_service_file ${_i} ABSOLUTE)
+ string(REGEX REPLACE "\.service.*$" ".service" _output_file ${_i})
+ set(_target ${CMAKE_CURRENT_BINARY_DIR}/${_output_file})
+ configure_file(${_service_file} ${_target})
+ install(FILES ${_target} DESTINATION ${_install_dir})
+ endforeach (_i ${ARGN})
+endmacro(dbus_add_activation_service _sources)
diff --git a/cmake/macros.cmake b/cmake/DbusInterfaceMacros.cmake
similarity index 100%
rename from cmake/macros.cmake
rename to cmake/DbusInterfaceMacros.cmake
diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt
index e165a36..17209b1 100644
--- a/core/CMakeLists.txt
+++ b/core/CMakeLists.txt
@@ -48,7 +48,7 @@ LINK_PRIVATE
target_include_directories(kdeconnectcore PUBLIC ${CMAKE_CURRENT_BINARY_DIR})
generate_export_header(kdeconnectcore EXPORT_FILE_NAME ${CMAKE_CURRENT_BINARY_DIR}/kdeconnectcore_export.h BASE_NAME KDEConnectCore)
-include(macros)
+include(DbusInterfaceMacros)
generate_and_install_dbus_interface(
kdeconnectcore
diff --git a/kded/CMakeLists.txt b/kded/CMakeLists.txt
index d429dce..4c4e46b 100644
--- a/kded/CMakeLists.txt
+++ b/kded/CMakeLists.txt
@@ -2,13 +2,12 @@ include_directories(${CMAKE_SOURCE_DIR})
kde4_add_executable(kdeconnectd kdeconnectd.cpp)
target_link_libraries(kdeconnectd kdeconnectcore ${KDE4_KDEUI_LIBS})
+install(TARGETS kdeconnectd DESTINATION ${LIBEXEC_INSTALL_DIR})
kde4_add_plugin(kded_kdeconnect kded.cpp)
-
target_link_libraries(kded_kdeconnect ${KDE4_KDECORE_LIBS})
-
-install(TARGETS kdeconnectd DESTINATION ${LIBEXEC_INSTALL_DIR})
install(TARGETS kded_kdeconnect DESTINATION ${PLUGIN_INSTALL_DIR})
install(FILES kdeconnect.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kded)
-
+include(DbusActivationMacros)
+dbus_add_activation_service(org.kde.kdeconnect.service.in)
diff --git a/kded/org.kde.kdeconnect.service.in b/kded/org.kde.kdeconnect.service.in
new file mode 100644
index 0000000..9777642
--- /dev/null
+++ b/kded/org.kde.kdeconnect.service.in
@@ -0,0 +1,3 @@
+[D-BUS Service]
+Name=org.kde.kdeconnect
+Exec=@LIBEXEC_INSTALL_DIR@/kdeconnectd
diff --git a/plugins/battery/CMakeLists.txt b/plugins/battery/CMakeLists.txt
index b6da5cb..1fea3b7 100644
--- a/plugins/battery/CMakeLists.txt
+++ b/plugins/battery/CMakeLists.txt
@@ -10,7 +10,7 @@ target_link_libraries(kdeconnect_battery kdeconnectcore ${KDE4_KDEUI_LIBS})
install(TARGETS kdeconnect_battery DESTINATION ${PLUGIN_INSTALL_DIR} )
install(FILES kdeconnect_battery.desktop DESTINATION ${SERVICES_INSTALL_DIR} )
-include(macros)
+include(DbusInterfaceMacros)
generate_and_install_dbus_interface(
kdeconnect_battery
diff --git a/plugins/notifications/CMakeLists.txt b/plugins/notifications/CMakeLists.txt
index cc6dd97..cfd271d 100644
--- a/plugins/notifications/CMakeLists.txt
+++ b/plugins/notifications/CMakeLists.txt
@@ -11,7 +11,8 @@ target_link_libraries(kdeconnect_notifications kdeconnectcore ${KDE4_KDEUI_LIBS}
install(TARGETS kdeconnect_notifications DESTINATION ${PLUGIN_INSTALL_DIR} )
install(FILES kdeconnect_notifications.desktop DESTINATION ${SERVICES_INSTALL_DIR} )
-include(macros)
+include(DbusInterfaceMacros)
+
generate_and_install_dbus_interface(
kdeconnect_notifications
notificationsdbusinterface.h
diff --git a/plugins/sftp/CMakeLists.txt b/plugins/sftp/CMakeLists.txt
index 500067e..e6fd204 100644
--- a/plugins/sftp/CMakeLists.txt
+++ b/plugins/sftp/CMakeLists.txt
@@ -11,7 +11,7 @@ target_link_libraries(kdeconnect_sftp kdeconnectcore ${KDE4_KFILE_LIBS})
install(TARGETS kdeconnect_sftp DESTINATION ${PLUGIN_INSTALL_DIR} )
install(FILES kdeconnect_sftp.desktop DESTINATION ${SERVICES_INSTALL_DIR} )
-include(macros)
+include(DbusInterfaceMacros)
generate_and_install_dbus_interface(
kdeconnect_sftp
--
kdeconnect packaging
More information about the pkg-kde-commits
mailing list