From f7cf61ff16a7252013aea29c0bb0370e014acba4 Mon Sep 17 00:00:00 2001
From: Mason Hock <mason@masonhock.com>
Date: Tue, 10 Sep 2019 16:07:07 -0700
Subject: [PATCH] add mate compatibility

---
 helpers/make-indicator-datetime | 65 +++++++++++++++++++++++++++++++++
 1 file changed, 65 insertions(+)
 create mode 100644 helpers/make-indicator-datetime

diff --git a/helpers/make-indicator-datetime b/helpers/make-indicator-datetime
new file mode 100644
index 000000000..67079fd1d
--- /dev/null
+++ b/helpers/make-indicator-datetime
@@ -0,0 +1,65 @@
+#!/bin/sh
+#
+#    Copyright (C) 2019 Mason Hock <ruben@trisquel.info>
+#
+#    This program is free software; you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation; either version 2 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program; if not, write to the Free Software
+#    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+#
+
+VERSION=1
+
+. ./config
+
+cat << EOF > data/indicator-datetime.desktop.in
+[Desktop Entry]
+Type=Application
+Name=Indicator Date & Time
+Exec=@pkglibexecdir@/indicator-datetime-service
+OnlyShowIn=MATE;
+NoDisplay=true
+StartupNotify=false
+Terminal=false
+Icon=@messaging_menu_icon@
+EOF
+
+cat << EOF >> data/CMakeLists.txt
+
+##
+##  XDG Autostart File
+##
+
+# where to install
+set (XDG_AUTOSTART_DIR "/etc/xdg/autostart")
+message (STATUS "\${XDG_AUTOSTART_DIR} is the DBus Service File install dir")
+
+set (XDG_AUTOSTART_NAME "\${CMAKE_PROJECT_NAME}.desktop")
+set (XDG_AUTOSTART_FILE "\${CMAKE_CURRENT_BINARY_DIR}/\${XDG_AUTOSTART_NAME}")
+set (XDG_AUTOSTART_FILE_IN "\${CMAKE_CURRENT_SOURCE_DIR}/\${XDG_AUTOSTART_NAME}.in")
+
+# build it
+set (pkglibexecdir "\${CMAKE_INSTALL_FULL_PKGLIBEXECDIR}")
+configure_file ("\${XDG_AUTOSTART_FILE_IN}" "\${XDG_AUTOSTART_FILE}")
+
+# install XDG autostart
+install (FILES "\${XDG_AUTOSTART_FILE}"
+         DESTINATION "\${XDG_AUTOSTART_DIR}")
+EOF
+
+# this shouldn't be needed for Ubuntu 20.04
+sed '/UNITY8,/a\        MATE,' -i include/datetime/actions-live.h
+patch -p0 < $DATA/launch-time-admin-in-mate.patch
+
+changelog "Add MATE compatibility"
+
+compile
-- 
GitLab