aboutsummaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2022-09-05 12:56:25 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2022-09-05 12:56:25 +0200
commite9534394c942cde1d043ce45f88f617b2018224f (patch)
tree0ecf0458b8b968eb8872deae2c73cd178b2fa97f /data
parent0ef8ce7677688b51ac69b3ba797f4d718f909f2f (diff)
parent9e5b57ca293414e51f82f70dd374b70798d08d44 (diff)
downloadayatana-indicator-printers-e9534394c942cde1d043ce45f88f617b2018224f.tar.gz
ayatana-indicator-printers-e9534394c942cde1d043ce45f88f617b2018224f.tar.bz2
ayatana-indicator-printers-e9534394c942cde1d043ce45f88f617b2018224f.zip
Merge branch 'tari01-pr/move-to-cmake'
Attributes GH PR #17: https://github.com/AyatanaIndicators/ayatana-indicator-printers/pull/17
Diffstat (limited to 'data')
-rw-r--r--data/CMakeLists.txt12
-rw-r--r--data/Makefile.am34
-rw-r--r--data/ayatana-indicator-printers.desktop.in2
-rw-r--r--data/ayatana-indicator-printers.service.in2
4 files changed, 14 insertions, 36 deletions
diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt
new file mode 100644
index 0000000..20245cd
--- /dev/null
+++ b/data/CMakeLists.txt
@@ -0,0 +1,12 @@
+# ayatana-indicator-printers.service
+pkg_check_modules (SYSTEMD systemd)
+
+if (${SYSTEMD_FOUND})
+ pkg_get_variable (SYSTEMD_USER_DIR systemd systemduserunitdir)
+ configure_file ("${CMAKE_CURRENT_SOURCE_DIR}/ayatana-indicator-printers.service.in" "${CMAKE_CURRENT_BINARY_DIR}/ayatana-indicator-printers.service" @ONLY)
+ install (FILES "${CMAKE_CURRENT_BINARY_DIR}/ayatana-indicator-printers.service" DESTINATION "${SYSTEMD_USER_DIR}")
+endif ()
+
+# ayatana-indicator-printers.desktop
+configure_file ("${CMAKE_CURRENT_SOURCE_DIR}/ayatana-indicator-printers.desktop.in" "${CMAKE_CURRENT_BINARY_DIR}/ayatana-indicator-printers.desktop" @ONLY)
+install (FILES "${CMAKE_CURRENT_BINARY_DIR}/ayatana-indicator-printers.desktop" DESTINATION "/etc/xdg/autostart")
diff --git a/data/Makefile.am b/data/Makefile.am
deleted file mode 100644
index 8bf680d..0000000
--- a/data/Makefile.am
+++ /dev/null
@@ -1,34 +0,0 @@
-BUILT_SOURCES=
-CLEANFILES=
-EXTRA_DIST=
-
-#
-# the systemd unit file
-#
-
-#if defined(HAVE_SYSTEMD)
-systemddir = $(SYSTEMD_USERDIR)
-systemd_DATA = ayatana-indicator-printers.service
-systemd_in = $(systemd_DATA:.service=.service.in)
-$(systemd_DATA): $(systemd_in)
- $(AM_V_GEN) $(SED) -e "s|\@pkglibexecdir\@|$(pkglibexecdir)|" $< > $@
-BUILT_SOURCES += $(systemd_DATA)
-EXTRA_DIST += $(systemd_in)
-CLEANFILES += $(systemd_DATA)
-#endif
-
-#
-# the xdg autostart job file
-#
-
-xdg_autostartdir = /etc/xdg/autostart
-xdg_autostart_DATA = ayatana-indicator-printers.desktop
-xdg_autostart_in = $(xdg_autostart_DATA:.desktop=.desktop.in)
-$(xdg_autostart_DATA): $(xdg_autostart_in)
- $(AM_V_GEN) $(SED) -e "s|\@pkglibexecdir\@|$(pkglibexecdir)|" $< > $@
-BUILT_SOURCES += $(xdg_autostart_DATA)
-CLEANFILES += $(xdg_autostart_DATA)
-EXTRA_DIST += $(xdg_autostart_in)
-
-DISTCLEANFILES = \
- Makefile.in
diff --git a/data/ayatana-indicator-printers.desktop.in b/data/ayatana-indicator-printers.desktop.in
index e0f74b0..1027096 100644
--- a/data/ayatana-indicator-printers.desktop.in
+++ b/data/ayatana-indicator-printers.desktop.in
@@ -1,7 +1,7 @@
[Desktop Entry]
Type=Application
Name=Ayatana Indicator Printers
-Exec=@pkglibexecdir@/ayatana-indicator-printers-service
+Exec=@CMAKE_INSTALL_FULL_LIBEXECDIR@/ayatana-indicator-printers/ayatana-indicator-printers-service
OnlyShowIn=MATE;XFCE;Budgie
NoDisplay=true
StartupNotify=false
diff --git a/data/ayatana-indicator-printers.service.in b/data/ayatana-indicator-printers.service.in
index 781f3e6..e482f96 100644
--- a/data/ayatana-indicator-printers.service.in
+++ b/data/ayatana-indicator-printers.service.in
@@ -4,7 +4,7 @@ PartOf=graphical-session.target
PartOf=ayatana-indicators.target
[Service]
-ExecStart=@pkglibexecdir@/ayatana-indicator-printers-service
+ExecStart=@CMAKE_INSTALL_FULL_LIBEXECDIR@/ayatana-indicator-printers/ayatana-indicator-printers-service
Restart=on-failure
[Install]