From 158883d78593629e381a3b9face53499d0a1cd4e Mon Sep 17 00:00:00 2001 From: Jason Conti Date: Wed, 5 Jun 2019 16:34:10 -0400 Subject: * Stop using gnome-autogen.sh (https://wiki.gnome.org/Projects/GnomeCommon/Migration) --- .gitignore | 13 ++++++++ autogen.sh | 39 ++++++++++++++++++---- configure.ac | 7 ++-- data/Makefile.am | 8 +++-- ...chpad.indicator.notifications.gschema.xml.in.in | 16 ++++----- po/LINGUAS | 0 po/Makevars | 11 ++++++ 7 files changed, 75 insertions(+), 19 deletions(-) create mode 100644 po/LINGUAS diff --git a/.gitignore b/.gitignore index 8ac54a3..1926b36 100644 --- a/.gitignore +++ b/.gitignore @@ -20,6 +20,15 @@ po/Makefile.in po/Makefile.in.in po/POTFILES po/stamp-it +po/Makevars.template +po/Rules-quot +po/boldquot.sed +po/en@boldquot.header +po/en@quot.header +po/insert-header.sin +po/quot.sed +po/remove-potcdate.sin +po/stamp-po src/.deps src/.libs src/Makefile @@ -38,6 +47,8 @@ aclocal.m4 autom4te.cache compile config.guess +config.h.in~ +config.rpath tags data/indicator-notifications.service src/indicator-notifications-service @@ -49,9 +60,11 @@ src/libnotifications_la-dbus-spy.lo src/libnotifications_la-notification.lo src/libnotifications_la-notification-menu.lo *.tar.gz +*.swp src/libnotifications_la-notification-menuitem.lo data/net.launchpad.indicator.notifications.gschema.valid data/net.launchpad.indicator.notifications.gschema.xml data/net.launchpad.indicator.notifications.gschema.xml.in src/libnotifications_la-urlregex.lo ar-lib +ABOUT-NLS diff --git a/autogen.sh b/autogen.sh index 331674a..d9d12ec 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,11 +1,38 @@ #!/bin/sh +# Run this to generate all the initial makefiles, etc. +test -n "$srcdir" || srcdir=$(dirname "$0") +test -n "$srcdir" || srcdir=. -PKG_NAME="indicator-notifications" +olddir=$(pwd) -which gnome-autogen.sh || { - echo "You need gnome-common from GNOME Git" - exit 1 +cd $srcdir + +(test -f configure.ac) || { + echo "*** ERROR: Directory '$srcdir' does not look like the top-level project directory ***" + exit 1 } -USE_GNOME2_MACROS=1 \ -. gnome-autogen.sh $@ +# shellcheck disable=SC2016 +PKG_NAME=$(autoconf --trace 'AC_INIT:$1' configure.ac) + +if [ "$#" = 0 -a "x$NOCONFIGURE" = "x" ]; then + echo "*** WARNING: I am going to run 'configure' with no arguments." >&2 + echo "*** If you wish to pass any to it, please specify them on the" >&2 + echo "*** '$0' command line." >&2 + echo "" >&2 +fi + +autoreconf --verbose --force --install || exit 1 + +cd "$olddir" +if [ "$NOCONFIGURE" = "" ]; then + $srcdir/configure "$@" || exit 1 + + if [ "$1" = "--help" ]; then + exit 0 + else + echo "Now type 'make' to compile $PKG_NAME" || exit 1 + fi +else + echo "Skipping configure process." +fi diff --git a/configure.ac b/configure.ac index 3ec1f55..2a94664 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,7 @@ AC_INIT([indicator-notifications], [0.3.3], [jason.conti@gmail.com]) +AC_CONFIG_MACRO_DIR([m4]) + AM_INIT_AUTOMAKE([-Wall -Werror]) AM_SILENT_RULES([yes]) @@ -14,9 +16,10 @@ AC_STDC_HEADERS AC_DISABLE_STATIC AC_PROG_LIBTOOL -# Setup gettext with intltool +# Setup gettext -IT_PROG_INTLTOOL +AM_GNU_GETTEXT_VERSION([0.19]) +AM_GNU_GETTEXT([external]) GETTEXT_PACKAGE=$PACKAGE AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], ["$GETTEXT_PACKAGE"], [Gettext package]) AC_SUBST(GETTEXT_PACKAGE) diff --git a/data/Makefile.am b/data/Makefile.am index 7299c5b..64e26bf 100644 --- a/data/Makefile.am +++ b/data/Makefile.am @@ -3,13 +3,15 @@ SUBDIRS = icons gsettings_file = net.launchpad.indicator.notifications.gschema.xml gsettings_SCHEMAS = $(gsettings_file) -@INTLTOOL_XML_NOMERGE_RULE@ - $(gsettings_file).in: $(gsettings_file).in.in - sed \ + $(AM_V_GEN) $(SED) \ -e "s|\@GETTEXT_PACKAGE\@|$(GETTEXT_PACKAGE)|" \ $< > $@ +$(gsettings_file): $(gsettings_file).in + $(AM_V_GEN) $(MSGFMT) --xml -d $(top_srcdir)/po \ + --template $< -o $@ + @GSETTINGS_RULES@ EXTRA_DIST = \ diff --git a/data/net.launchpad.indicator.notifications.gschema.xml.in.in b/data/net.launchpad.indicator.notifications.gschema.xml.in.in index a4c6dde..dc17a77 100644 --- a/data/net.launchpad.indicator.notifications.gschema.xml.in.in +++ b/data/net.launchpad.indicator.notifications.gschema.xml.in.in @@ -2,24 +2,24 @@ [] - <_summary>Discard notifications by application name - <_description>If an application name is in the blacklist, all notifications matching the application name will be discarded. + Discard notifications by application name + If an application name is in the blacklist, all notifications matching the application name will be discarded. false - <_summary>Clear notifications on middle click - <_description>Normally when middle clicking the notification icon, the unread status will be toggled if the queue is not empty. With this option enabled, the notification queue will be cleared instead. + Clear notifications on middle click + Normally when middle clicking the notification icon, the unread status will be toggled if the queue is not empty. With this option enabled, the notification queue will be cleared instead. false - <_summary>Hide the indicator - <_description>If true, the indicator is hidden. + Hide the indicator + If true, the indicator is hidden. 5 - <_summary>Maximum number of visible items - <_description>The indicator will only display at most the number of notifications indicated by this value. + Maximum number of visible items + The indicator will only display at most the number of notifications indicated by this value. diff --git a/po/LINGUAS b/po/LINGUAS new file mode 100644 index 0000000..e69de29 diff --git a/po/Makevars b/po/Makevars index 18ed957..613d8ce 100644 --- a/po/Makevars +++ b/po/Makevars @@ -3,3 +3,14 @@ subdir = po top_builddir = .. XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ --from-code=UTF-8 EXTRA_LOCALE_CATEGORIES = + +# Ignore the timestamp of the .pot file, as git clones do not have +# deterministic timestamps, and .po files are updated by translators +# (only) in GNOME projects. +PO_DEPENDS_ON_POT = no + +# This tells whether or not to forcibly update $(DOMAIN).pot and +# regenerate PO files on "make dist". Possible values are "yes" and +# "no". Set this to no if the POT file and PO files are maintained +# externally. +DIST_DEPENDS_ON_UPDATE_PO = no -- cgit v1.2.3