aboutsummaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2013-10-30 23:49:58 +0000
committerTarmac <Unknown>2013-10-30 23:49:58 +0000
commitbbc781d9e2afe500d9a5d09335f0954f25269be6 (patch)
tree87ad870ab7d39777686e4f9661bcaa4ba41b5e1d /data
parent19ba64b479fd14d5192f0ec3dcc37fe33bde238b (diff)
parent13cc891202d3721fc157c827ed1141ee6221ccbd (diff)
downloadayatana-indicator-datetime-bbc781d9e2afe500d9a5d09335f0954f25269be6.tar.gz
ayatana-indicator-datetime-bbc781d9e2afe500d9a5d09335f0954f25269be6.tar.bz2
ayatana-indicator-datetime-bbc781d9e2afe500d9a5d09335f0954f25269be6.zip
Switch the build system to cmake. Fixes: https://bugs.launchpad.net/bugs/1237509.
Approved by Ted Gould, PS Jenkins bot.
Diffstat (limited to 'data')
-rw-r--r--data/CMakeLists.txt66
-rw-r--r--data/Makefile.am45
-rw-r--r--data/indicator-datetime.service.in2
3 files changed, 67 insertions, 46 deletions
diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt
new file mode 100644
index 0000000..197c5c6
--- /dev/null
+++ b/data/CMakeLists.txt
@@ -0,0 +1,66 @@
+##
+## GSettings schema
+##
+
+include (UseGSettings)
+set (SCHEMA_NAME "com.canonical.indicator.datetime.gschema.xml")
+set (SCHEMA_FILE "${CMAKE_CURRENT_SOURCE_DIR}/${SCHEMA_NAME}")
+add_schema (${SCHEMA_FILE})
+
+
+##
+## DBus Service File
+##
+
+# where to install
+set (DBUS_SERVICE_DIR "${CMAKE_INSTALL_FULL_DATADIR}/dbus-1/services")
+message (STATUS "${DBUS_SERVICE_DIR} is the DBus Service File install dir")
+
+set (SERVICE_NAME "${CMAKE_PROJECT_NAME}.service")
+set (SERVICE_FILE "${CMAKE_CURRENT_BINARY_DIR}/${SERVICE_NAME}")
+set (SERVICE_FILE_IN "${CMAKE_CURRENT_SOURCE_DIR}/${SERVICE_NAME}.in")
+
+# build it
+set (pkglibexecdir "${CMAKE_INSTALL_FULL_PKGLIBEXECDIR}")
+configure_file ("${SERVICE_FILE_IN}" "${SERVICE_FILE}")
+
+# install it
+install (FILES "${SERVICE_FILE}"
+ DESTINATION "${DBUS_SERVICE_DIR}")
+
+
+##
+## Unity Indicator File
+##
+
+# where to install
+set (UNITY_INDICATOR_DIR "${CMAKE_INSTALL_FULL_DATAROOTDIR}/unity/indicators")
+message (STATUS "${UNITY_INDICATOR_DIR} is the Unity Indicator install dir")
+
+set (UNITY_INDICATOR_NAME "com.canonical.indicator.datetime")
+set (UNITY_INDICATOR_FILE "${CMAKE_CURRENT_SOURCE_DIR}/${UNITY_INDICATOR_NAME}")
+
+install (FILES "${UNITY_INDICATOR_FILE}"
+ DESTINATION "${UNITY_INDICATOR_DIR}")
+
+
+##
+## gnome-control-center panel: .ui and .desktop files
+##
+
+if (BUILD_PANEL)
+
+ # the .ui file
+ install (FILES "datetime-dialog.ui"
+ DESTINATION "${CMAKE_INSTALL_DATADIR}/${CMAKE_PROJECT_NAME}")
+
+ # the .desktop file
+ set (DESKTOP_NAME "gnome-indicator-datetime-panel.desktop")
+ set (DESKTOP_FILE "${CMAKE_CURRENT_BINARY_DIR}/${DESKTOP_NAME}")
+ set (DESKTOP_FILE_IN "${CMAKE_CURRENT_SOURCE_DIR}/${DESKTOP_NAME}.in")
+ set (ENV{LC_ALL} "C")
+ execute_process (COMMAND intltool-merge -quiet --desktop-style --utf8 "${CMAKE_SOURCE_DIR}/po" "${DESKTOP_FILE_IN}" "${DESKTOP_FILE}")
+ install (FILES ${DESKTOP_FILE}
+ DESTINATION "${CMAKE_INSTALL_DATADIR}/applications")
+
+endif ()
diff --git a/data/Makefile.am b/data/Makefile.am
deleted file mode 100644
index 9bcac72..0000000
--- a/data/Makefile.am
+++ /dev/null
@@ -1,45 +0,0 @@
-BUILT_SOURCES=
-CLEANFILES=
-EXTRA_DIST=
-
-#
-# the indicator bus file
-#
-
-indicatorsdir = $(prefix)/share/unity/indicators
-dist_indicators_DATA = com.canonical.indicator.datetime
-
-#
-# the gsettings
-#
-
-gsettings_SCHEMAS = com.canonical.indicator.datetime.gschema.xml
-@GSETTINGS_RULES@
-EXTRA_DIST += $(gsettings_SCHEMAS)
-
-#
-# the dbus service file
-#
-
-dbus_servicesdir = $(datadir)/dbus-1/services
-dbus_services_DATA = indicator-datetime.service
-dbus_services_in = $(dbus_services_DATA:.service=.service.in)
-$(dbus_services_DATA): $(dbus_services_in)
- $(AM_V_GEN) $(SED) -e "s|\@libexecdir\@|$(libexecdir)|" $< > $@
-BUILT_SOURCES += $(dbus_services_DATA)
-CLEANFILES += $(dbus_services_DATA)
-EXTRA_DIST += $(dbus_services_in)
-
-#
-# the gnome-control-center panel
-#
-
-if BUILD_CCPANEL
- pkgdata_DATA = datetime-dialog.ui
- @INTLTOOL_DESKTOP_RULE@
- desktopdir = $(datadir)/applications
- desktop_DATA = gnome-indicator-datetime-panel.desktop
- EXTRA_DIST += $(desktop_DATA)
- CLEANFILES += $(desktop_DATA)
-endif
-EXTRA_DIST += datetime-dialog.ui $(desktop_DATA:.desktop=.desktop.in)
diff --git a/data/indicator-datetime.service.in b/data/indicator-datetime.service.in
index e7735ce..a9100b8 100644
--- a/data/indicator-datetime.service.in
+++ b/data/indicator-datetime.service.in
@@ -1,3 +1,3 @@
[D-BUS Service]
Name=com.canonical.indicator.datetime
-Exec=@libexecdir@/indicator-datetime-service
+Exec=@pkglibexecdir@/indicator-datetime-service