build: strip micro version if minor is even

To avoid manually adding the 3.4 stable version when doing the
release, check in configure if building a stable (even minor) version
and strip micro at that time.
This commit is contained in:
Giovanni Campagna
2012-03-29 19:51:13 +02:00
parent 06d2b906e0
commit 9fb703ca6b
2 changed files with 9 additions and 1 deletions
+8
View File
@@ -18,6 +18,14 @@ PKG_PROG_PKG_CONFIG([0.22])
GLIB_GSETTINGS
SHELL_VERSION="$PACKAGE_VERSION"
shell_major=`echo "$PACKAGE_VERSION" | cut -d'.' -f1`
shell_minor=`echo "$PACKAGE_VERSION" | cut -d'.' -f2`
if test "$(($shell_minor % 2))" -eq 0; then
SHELL_VERSION="$shell_major.$shell_minor"
fi
AC_SUBST([SHELL_VERSION])
dnl keep this in alphabetic order
dnl by default, install only extensions that do not change completely the shell experience,
dnl that don't require GSettings and that don't require external packages for typelibs
+1 -1
View File
@@ -11,7 +11,7 @@ metadata.json: metadata.json.in $(top_builddir)/config.status
-e "s|[@]uuid@|$(uuid)|" \
-e "s|[@]gschemaname@|$(gschemaname)|" \
-e "s|[@]gettext_domain@|$(GETTEXT_PACKAGE)|" \
-e "s|[@]shell_current@|$(PACKAGE_VERSION)|" \
-e "s|[@]shell_current@|$(SHELL_VERSION)|" \
-e "s|[@]url@|$(extensionurl)|" \
$< > $@