[gnome-flashback] sessions: add scripts to start GNOME Flashback



commit 4958a45661fee0921b2335074575a3da0f7d2cd0
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Thu Aug 28 23:14:12 2014 +0300

    sessions: add scripts to start GNOME Flashback

 configure.ac                                       |    4 +++
 po/POTFILES.in                                     |    4 +-
 po/POTFILES.skip                                   |    2 +
 sessions/Makefile.am                               |   27 +++++++++++++++++---
 ...top.in => gnome-flashback-compiz.desktop.in.in} |    4 +-
 ...p.in => gnome-flashback-metacity.desktop.in.in} |    2 +-
 6 files changed, 34 insertions(+), 9 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 637d62e..299f36d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -52,7 +52,11 @@ echo "
     `echo gnome-flashback $VERSION | sed "s/./=/g"`
 
     prefix:                        ${prefix}
+    exec_prefix:                   ${exec_prefix}
+
     sysconfdir:                    ${sysconfdir}
+    libexecdir:                    ${libexecdir}
+
     source code location:          ${srcdir}
     compiler:                      ${CC}
 "
diff --git a/po/POTFILES.in b/po/POTFILES.in
index f7fa330..78fc46a 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -5,7 +5,7 @@ gnome-flashback/flashback-inhibit-dialog.c
 [type: gettext/glade]gnome-flashback/flashback-inhibit-dialog.ui
 gnome-flashback/gnome-flashback.desktop.in
 gnome-flashback/org.gnome.gnome-flashback.gschema.xml.in.in
-sessions/gnome-flashback-compiz.desktop.in
+sessions/gnome-flashback-compiz.desktop.in.in
 sessions/gnome-flashback-compiz.session.in
-sessions/gnome-flashback-metacity.desktop.in
+sessions/gnome-flashback-metacity.desktop.in.in
 sessions/gnome-flashback-metacity.session.in
diff --git a/po/POTFILES.skip b/po/POTFILES.skip
index 06e8e8c..1cd289d 100644
--- a/po/POTFILES.skip
+++ b/po/POTFILES.skip
@@ -1,3 +1,5 @@
 # List of source files that should *not* be translated.
 # Please keep this file sorted alphabetically.
 gnome-flashback/org.gnome.gnome-flashback.gschema.xml.in
+sessions/gnome-flashback-compiz.desktop.in
+sessions/gnome-flashback-metacity.desktop.in
diff --git a/sessions/Makefile.am b/sessions/Makefile.am
index a51fb8b..d766a48 100644
--- a/sessions/Makefile.am
+++ b/sessions/Makefile.am
@@ -1,21 +1,40 @@
+libexec_SCRIPTS = \
+       gnome-flashback-compiz \
+       gnome-flashback-metacity
+
+gnome-flashback-compiz: Makefile
+       $(AM_V_GEN) (echo '#! /bin/sh' && echo 'exec gnome-session --session=gnome-flashback-compiz "$$@"') > 
$@
+       $(AM_V_at) chmod a+x $@
+
+gnome-flashback-metacity: Makefile
+       $(AM_V_GEN) (echo '#! /bin/sh' && echo 'exec gnome-session --session=gnome-flashback-metacity "$$@"') 
$@
+       $(AM_V_at) chmod a+x $@
+
 sessiondir       = $(datadir)/gnome-session/sessions
 session_in_files = gnome-flashback-compiz.session.in gnome-flashback-metacity.session.in
 session_DATA     = $(session_in_files:.session.in=.session)
 
 %.session: %.session.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d 
-u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
 
-xsessiondir       = $(datadir)/xsessions
-xsession_in_files = gnome-flashback-compiz.desktop.in gnome-flashback-metacity.desktop.in
-xsession_DATA     = $(xsession_in_files:.desktop.in=.desktop)
+xsessiondir          = $(datadir)/xsessions
+xsession_in_in_files = gnome-flashback-compiz.desktop.in.in gnome-flashback-metacity.desktop.in.in
+xsession_in_files    = gnome-flashback-compiz.desktop.in gnome-flashback-metacity.desktop.in
+xsession_DATA        = $(xsession_in_files:.desktop.in=.desktop)
+
+%.desktop.in: %.desktop.in.in
+       $(AM_V_GEN) sed -e 's,[ ]libexecdir[@],$(libexecdir),g' < $< > $@
 
 %.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d 
-u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
 
 EXTRA_DIST = \
        $(session_in_files) \
-       $(xsession_in_files)
+       $(xsession_in_in_files)
 
 CLEANFILES = \
+       gnome-flashback-compiz \
+       gnome-flashback-metacity \
        $(session_DATA) \
+       $(xsession_in_files) \
        $(xsession_DATA)
 
 -include $(top_srcdir)/git.mk
diff --git a/sessions/gnome-flashback-compiz.desktop.in b/sessions/gnome-flashback-compiz.desktop.in.in
similarity index 68%
rename from sessions/gnome-flashback-compiz.desktop.in
rename to sessions/gnome-flashback-compiz.desktop.in.in
index 1e7b181..a80c39a 100644
--- a/sessions/gnome-flashback-compiz.desktop.in
+++ b/sessions/gnome-flashback-compiz.desktop.in.in
@@ -1,8 +1,8 @@
 [Desktop Entry]
 _Name=GNOME Flashback (Compiz)
 _Comment=This session logs you into GNOME Flashback with Compiz
-Exec=gnome-session --session=gnome-flashback-compiz
-TryExec=metacity
+Exec= libexecdir@/gnome-flashback-compiz
+TryExec=compiz
 Icon=
 Type=Application
 DesktopNames=GNOME
diff --git a/sessions/gnome-flashback-metacity.desktop.in b/sessions/gnome-flashback-metacity.desktop.in.in
similarity index 76%
rename from sessions/gnome-flashback-metacity.desktop.in
rename to sessions/gnome-flashback-metacity.desktop.in.in
index f07f46b..0037ed0 100644
--- a/sessions/gnome-flashback-metacity.desktop.in
+++ b/sessions/gnome-flashback-metacity.desktop.in.in
@@ -1,7 +1,7 @@
 [Desktop Entry]
 _Name=GNOME Flashback (Metacity)
 _Comment=This session logs you into GNOME Flashback with Metacity
-Exec=gnome-session --session=gnome-flashback-metacity
+Exec= libexecdir@/gnome-flashback-metacity
 TryExec=metacity
 Icon=
 Type=Application


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]