[polari] build: Switch to pkgdatadir/$(APP_ID) convention for executable
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [polari] build: Switch to pkgdatadir/$(APP_ID) convention for executable
- Date: Mon, 23 Feb 2015 05:14:44 +0000 (UTC)
commit 926db90508212e5b0f3b63c6f719990a35b882be
Author: Florian Müllner <fmuellner gnome org>
Date: Mon Feb 23 00:06:49 2015 +0100
build: Switch to pkgdatadir/$(APP_ID) convention for executable
While I'm not entirely sold on taking the app ID convention this far,
it prevents gjs' package module from setting a wrong wm_class for us.
Also thanks to the symbolic link in $(bindir), the change is mostly
transparent anyway ...
.gitignore | 2 +-
configure.ac | 2 ++
src/Makefile.am | 17 +++++++++++++----
src/application.js | 1 -
src/{polari.in => org.gnome.Polari.in} | 0
5 files changed, 16 insertions(+), 6 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index d74dc89..ed30fd2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -40,4 +40,4 @@ po/Rules-quot
po/polari.pot
po/stamp-it
src/config.js
-src/polari
+src/org.gnome.Polari
diff --git a/configure.ac b/configure.ac
index fbfa94f..8223001 100644
--- a/configure.ac
+++ b/configure.ac
@@ -35,6 +35,8 @@ if test "$GJS_CONSOLE" = "no"; then
AC_MSG_ERROR([gjs is required to build Polari])
fi
+AC_PROG_LN_S
+
GLIB_COMPILE_RESOURCES=`$PKG_CONFIG --variable=glib_compile_resources gio-2.0`
AC_SUBST(GLIB_COMPILE_RESOURCES)
diff --git a/src/Makefile.am b/src/Makefile.am
index b1138d3..fd43e99 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,3 +1,4 @@
+EXTRA_SCRIPTS =
EXTRA_DIST =
CLEANFILES =
INTROSPECTION_GIRS =
@@ -20,9 +21,10 @@ do_subst = sed -e 's|@prefix[ ]|$(prefix)|g' \
-e 's|@PACKAGE_VERSION[ ]|$(PACKAGE_VERSION)|g' \
$(NULL)
-bin_SCRIPTS = polari
+appdir = $(pkgdatadir)
+nodist_app_SCRIPTS = $(APP_ID)
-polari: polari.in
+$(APP_ID): $(APP_ID).in
$(AM_V_GEN) $(do_subst) $< > $@
jsdir = $(pkgdatadir)/
@@ -48,9 +50,16 @@ dist_js_DATA = \
$(NULL)
EXTRA_DIST += \
- polari.in \
+ $(APP_ID).in \
$(NULL)
CLEANFILES += \
- polari \
+ $(APP_ID) \
$(NULL)
+
+install-exec-hook:
+ $(MKDIR_P) $(DESTDIR)$(bindir)
+ -rm -f $(DESTDIR)$(bindir)/$(PACKAGE_NAME)
+ $(LN_S) $(appdir)/$(APP_ID) $(DESTDIR)$(bindir)/$(PACKAGE_NAME)
+uninstall-hook:
+ -rm -f $(DESTDIR)$(bindir)/$(PACKAGE_NAME)
diff --git a/src/application.js b/src/application.js
index 1aec919..8ad62b6 100644
--- a/src/application.js
+++ b/src/application.js
@@ -28,7 +28,6 @@ const Application = new Lang.Class({
_init: function() {
this.parent({ application_id: 'org.gnome.Polari' });
- GLib.set_prgname('org.gnome.Polari');
GLib.set_application_name('Polari');
this._window = null;
this._pendingRequests = {};
diff --git a/src/polari.in b/src/org.gnome.Polari.in
similarity index 100%
rename from src/polari.in
rename to src/org.gnome.Polari.in
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]