Subject: _add_debian_themes
From: Debian/Kubuntu Qt/KDE Maintainers <[email-masked]>
Date: Mon, 27 Feb 2017 14:58:13 +0100

===================================================================
---
 data/themes/CMakeLists.txt                 | 27 ++++++++++++++--
 data/themes/debian-elarun/README           |  9 ++++++
 data/themes/debian-elarun/metadata.desktop | 49 ++++++++++++++++++++++++++++++
 data/themes/debian-elarun/theme.conf       |  2 ++
 data/themes/debian-maui/README             |  5 +++
 data/themes/debian-maui/metadata.desktop   | 16 ++++++++++
 data/themes/debian-maui/theme.conf         |  2 ++
 7 files changed, 108 insertions(+), 2 deletions(-)
 create mode 100644 data/themes/debian-elarun/README
 create mode 100644 data/themes/debian-elarun/metadata.desktop
 create mode 100644 data/themes/debian-elarun/theme.conf
 create mode 100644 data/themes/debian-maui/README
 create mode 100644 data/themes/debian-maui/metadata.desktop
 create mode 100644 data/themes/debian-maui/theme.conf

--- a/data/themes/CMakeLists.txt
+++ b/data/themes/CMakeLists.txt
@@ -1,4 +1,29 @@
-set(THEMES elarun maldives maya)
+# Copy Maui to have it available as an external (non-embedded) theme
+file(COPY "../../src/greeter/theme/" DESTINATION "${CMAKE_CURRENT_SOURCE_DIR}/maui")
+
+# Copy Main.qml and image resources from upstream Maui to debian-maui
+file(COPY "../../src/greeter/theme/Main.qml" DESTINATION "${CMAKE_CURRENT_SOURCE_DIR}/debian-maui")
+file(COPY "../../src/greeter/theme/metadata.desktop.in" DESTINATION "${CMAKE_CURRENT_SOURCE_DIR}/debian-maui")
+file(GLOB MAUI_PNGS "../../src/greeter/theme/*.png")
+foreach(MAUI_PNG ${MAUI_PNGS})
+    file(COPY "${MAUI_PNG}" DESTINATION "${CMAKE_CURRENT_SOURCE_DIR}/debian-maui")
+endforeach(MAUI_PNG)
+# Replace default background source by config key config.background
+set(SED_EXPR "s=^\\([[:space:]]*source[[:space:]]*:[[:space:]]\\)\\\"qrc:/theme/background.png\\\"[[:space:]]*$=\\1config.background=")
+execute_process(COMMAND sed -i -e "${SED_EXPR}" "${CMAKE_CURRENT_SOURCE_DIR}/debian-maui/Main.qml" RESULT_VARIABLE RES OUTPUT_VARIABLE OUT)
+message("Result of sed replacement for Maui's background source: (Res: ${RES}, Out: ${OUT})")
+
+# Copy selected files from upstream Elarun to debian-elarun
+file(COPY "elarun/Main.qml" DESTINATION "${CMAKE_CURRENT_SOURCE_DIR}/debian-elarun")
+file(COPY "elarun/metadata.desktop.in" DESTINATION "${CMAKE_CURRENT_SOURCE_DIR}/debian-elarun")
+file(COPY "elarun/angle-down.png" DESTINATION "${CMAKE_CURRENT_SOURCE_DIR}/debian-elarun")
+file(COPY "elarun/elarun.jpg" DESTINATION "${CMAKE_CURRENT_SOURCE_DIR}/debian-elarun")
+file(GLOB ELARUN_IMGS "elarun/images/*")
+foreach(ELARUN_IMG ${ELARUN_IMGS})
+    file(COPY "${ELARUN_IMG}" DESTINATION "${CMAKE_CURRENT_SOURCE_DIR}/debian-elarun/images/")
+endforeach(ELARUN_IMG)
+
+set(THEMES elarun maldives maya maui debian-maui debian-elarun)
 
 foreach(THEME ${THEMES})
     # We assume that theme-specific translations are stored
--- /dev/null
+++ b/data/themes/debian-elarun/README
@@ -0,0 +1,9 @@
+This theme is based on the KDM Elarun theme, ported to SDDM theme.
+It was adapted to use the active Debian theme pack.
+Thanks to these people for their great works.
+Not all functionality from original theme are ported.
+
+Original KDM theme:
+Author=Roman Shtylman & Nuno Pinheiro
+Copyright=GPL 2010 Roman Shtylman | [email-masked], 2012 Nuno Pineheiro
+License=GPL
--- /dev/null
+++ b/data/themes/debian-elarun/theme.conf
@@ -0,0 +1,2 @@
+[General]
+background=/usr/share/desktop-base/active-theme/login/background.svg
--- /dev/null
+++ b/data/themes/debian-maui/README
@@ -0,0 +1,5 @@
+This theme is an adaptation of the original Maui theme from upstream SDDM for
+Debian to use the active desktop-base theme.
+
+Check the src/greeter/theme folder from the SDDM source for more information.
+
--- /dev/null
+++ b/data/themes/debian-maui/theme.conf
@@ -0,0 +1,2 @@
+[General]
+background=/usr/share/desktop-base/active-theme/login/background-nologo.svg