[network-manager-vpnc] Install a desktop file for nm-vpnc-auth-dialog



commit ae326938797b93dbc07df07296f9b00c5b042f69
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat Mar 26 16:24:36 2011 -0400

    Install a desktop file for nm-vpnc-auth-dialog
    
    This is necessary for gnome-shell to pick up the right text
    for the applicatin menu.

 acinclude.m4                                  |   40 +++++++++++++++++++++++++
 auth-dialog/Makefile.am                       |   15 +++++++++-
 auth-dialog/nm-vpnc-auth-dialog.desktop.in.in |    7 ++++
 configure.ac                                  |    3 ++
 4 files changed, 64 insertions(+), 1 deletions(-)
---
diff --git a/acinclude.m4 b/acinclude.m4
new file mode 100644
index 0000000..0c71173
--- /dev/null
+++ b/acinclude.m4
@@ -0,0 +1,40 @@
+dnl AS_AC_EXPAND(VAR, CONFIGURE_VAR)
+dnl
+dnl example
+dnl AS_AC_EXPAND(SYSCONFDIR, $sysconfdir)
+dnl will set SYSCONFDIR to /usr/local/etc if prefix=/usr/local
+
+AC_DEFUN([AS_AC_EXPAND],
+[
+  EXP_VAR=[$1]
+  FROM_VAR=[$2]
+
+  dnl first expand prefix and exec_prefix if necessary
+  prefix_save=$prefix
+  exec_prefix_save=$exec_prefix
+
+  dnl if no prefix given, then use /usr/local, the default prefix
+  if test "x$prefix" = "xNONE"; then
+    prefix=$ac_default_prefix
+  fi
+  dnl if no exec_prefix given, then use prefix
+  if test "x$exec_prefix" = "xNONE"; then
+    exec_prefix=$prefix
+  fi
+
+  full_var="$FROM_VAR"
+  dnl loop until it doesn't change anymore
+  while true; do
+    new_full_var="`eval echo $full_var`"
+    if test "x$new_full_var"="x$full_var"; then break; fi
+    full_var=$new_full_var
+  done
+
+  dnl clean up
+  full_var=$new_full_var
+  AC_SUBST([$1], "$full_var")
+
+  dnl restore prefix and exec_prefix
+  prefix=$prefix_save
+  exec_prefix=$exec_prefix_save
+])
diff --git a/auth-dialog/Makefile.am b/auth-dialog/Makefile.am
index 67c7e5d..e67776e 100644
--- a/auth-dialog/Makefile.am
+++ b/auth-dialog/Makefile.am
@@ -25,5 +25,18 @@ nm_vpnc_auth_dialog_LDADD = \
 	$(NETWORKMANAGER_LIBS) \
 	$(top_builddir)/common-gnome/libnm-vpnc-common-gnome.la
 
-CLEANFILES = *~
+ INTLTOOL_DESKTOP_RULE@
+desktopdir = $(datadir)/applications
+desktop_in_in_files = nm-vpnc-auth-dialog.desktop.in.in
+desktop_in_files = nm-vpnc-auth-dialog.desktop.in
+desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
 
+EXTRA_DIST = \
+	$(desktop_in_in_files)
+
+CLEANFILES = \
+	*~ \
+	$(desktop_DATA)
+
+DISTCLEANFILES = \
+	$(desktop_in_files)
diff --git a/auth-dialog/nm-vpnc-auth-dialog.desktop.in.in b/auth-dialog/nm-vpnc-auth-dialog.desktop.in.in
new file mode 100644
index 0000000..75c2f08
--- /dev/null
+++ b/auth-dialog/nm-vpnc-auth-dialog.desktop.in.in
@@ -0,0 +1,7 @@
+[Desktop Entry]
+_Name=Network
+_Comment=Request VPN authentication
+Exec= LIBEXECDIR@/nm-vpnc-auth-dialog
+Terminal=false
+Type=Application
+NoDisplay=true
diff --git a/configure.ac b/configure.ac
index ba2b0ec..f3813f2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -120,11 +120,14 @@ if ! test x"$ac_distver" = x""; then
   AC_DEFINE_UNQUOTED(DIST_VERSION, "$ac_distver", [Define the distribution version string])
 fi
 
+AS_AC_EXPAND(LIBEXECDIR, $libexecdir)
+
 AC_CONFIG_FILES([
 Makefile
 src/Makefile
 common-gnome/Makefile
 auth-dialog/Makefile
+auth-dialog/nm-vpnc-auth-dialog.desktop.in
 properties/Makefile
 properties/tests/Makefile
 properties/tests/pcf/Makefile



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