From 36bd948ad63ab78d5f2f406015ac4bedd506876d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miloslav=20Trma=C4=8D?= Date: Sat, 20 Apr 2013 01:13:36 +0200 Subject: [PATCH 4/6] Add bug reporting address and home page to --help output ... as required by GNU coding standards. https://bugs.freedesktop.org/show_bug.cgi?id=29936 --- configure.ac | 2 +- src/programs/pkaction.c | 6 ++++++ src/programs/pkcheck.c | 5 ++++- src/programs/pkexec.c | 6 +++++- src/programs/pkttyagent.c | 6 ++++++ 5 files changed, 22 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 0962539..d022473 100644 --- a/configure.ac +++ b/configure.ac @@ -1,7 +1,7 @@ dnl Process this file with autoconf to produce a configure script. AC_PREREQ(2.59c) -AC_INIT([polkit], [0.111], [http://lists.freedesktop.org/mailman/listinfo/polkit-devel]) +AC_INIT([polkit], [0.111], [http://lists.freedesktop.org/mailman/listinfo/polkit-devel], , [http://www.freedesktop.org/wiki/Software/polkit]) AM_INIT_AUTOMAKE([]) AC_CONFIG_HEADERS(config.h) AM_MAINTAINER_MODE diff --git a/src/programs/pkaction.c b/src/programs/pkaction.c index 4efc8b5..b8b60b3 100644 --- a/src/programs/pkaction.c +++ b/src/programs/pkaction.c @@ -90,6 +90,7 @@ main (int argc, char *argv[]) { guint ret; gchar *action_id; + gchar *s; gboolean opt_show_version; gboolean opt_verbose; GOptionEntry options[] = @@ -133,6 +134,11 @@ main (int argc, char *argv[]) error = NULL; context = g_option_context_new (N_("[--action-id ACTION]")); + s = g_strdup_printf (_("Report bugs to: %s\n" + "%s home page: <%s>"), PACKAGE_BUGREPORT, + PACKAGE_NAME, PACKAGE_URL); + g_option_context_set_description (context, s); + g_free (s); g_option_context_add_main_entries (context, options, GETTEXT_PACKAGE); if (!g_option_context_parse (context, &argc, &argv, &error)) { diff --git a/src/programs/pkcheck.c b/src/programs/pkcheck.c index 6c9fba2..51e1de1 100644 --- a/src/programs/pkcheck.c +++ b/src/programs/pkcheck.c @@ -48,7 +48,10 @@ help (void) " --revoke-temp Revoke all temporary authorizations for current session\n" " -s, --system-bus-name=BUS_NAME Check authorization of owner of BUS_NAME\n" " --version Show version\n" - "\n")); + "\n" + "Report bugs to: %s\n" + "%s home page: <%s>\n"), PACKAGE_BUGREPORT, PACKAGE_NAME, + PACKAGE_URL); } static gchar * diff --git a/src/programs/pkexec.c b/src/programs/pkexec.c index 529898a..005e1fe 100644 --- a/src/programs/pkexec.c +++ b/src/programs/pkexec.c @@ -77,7 +77,11 @@ usage (int argc, char *argv[]) " --disable-internal-agent |\n" " [--user username] PROGRAM [ARGUMENTS...]\n" "\n" - "See the pkexec manual page for more details.\n"); + "See the pkexec manual page for more details.\n" + "\n" + "Report bugs to: %s\n" + "%s home page: <%s>\n", PACKAGE_BUGREPORT, PACKAGE_NAME, + PACKAGE_URL); } /* ---------------------------------------------------------------------------------------------------- */ diff --git a/src/programs/pkttyagent.c b/src/programs/pkttyagent.c index fb4b592..83b9bd9 100644 --- a/src/programs/pkttyagent.c +++ b/src/programs/pkttyagent.c @@ -63,6 +63,7 @@ main (int argc, char *argv[]) { NULL, 0, 0, 0, NULL, NULL, NULL } }; GOptionContext *context; + gchar *s; PolkitAuthority *authority = NULL; PolkitSubject *subject = NULL; gpointer local_agent_handle = NULL; @@ -81,6 +82,11 @@ main (int argc, char *argv[]) error = NULL; context = g_option_context_new (""); + s = g_strdup_printf (_("Report bugs to: %s\n" + "%s home page: <%s>"), PACKAGE_BUGREPORT, + PACKAGE_NAME, PACKAGE_URL); + g_option_context_set_description (context, s); + g_free (s); g_option_context_add_main_entries (context, opt_options, GETTEXT_PACKAGE); if (!g_option_context_parse (context, &argc, &argv, &error)) { -- 1.8.1.4