From 0c1386bb05c50e53c1294ba1c951d3675eab35ff Mon Sep 17 00:00:00 2001 From: Gwenhael Le Moine Date: Wed, 1 Apr 2015 10:55:11 +0200 Subject: [PATCH] extract version number from sources Signed-off-by: Gwenhael Le Moine --- e/emacs/emacs.SlackBuild | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/e/emacs/emacs.SlackBuild b/e/emacs/emacs.SlackBuild index 388099f8..1b14f13e 100755 --- a/e/emacs/emacs.SlackBuild +++ b/e/emacs/emacs.SlackBuild @@ -31,7 +31,7 @@ ONLY_X11=${ONLY_X11:=YES} PRGNAM=emacs BRANCH=${BRANCH:=trunk} -VERSION=${VERSION:-${BRANCH}_$(date +"%Y.%m.%d_%H.%M")} +VERSION=${VERSION:-$(date +"%Y.%m.%d_%H.%M")} ARCH=${ARCH:-$(uname -m)} NUMJOBS=${NUMJOBS:-" -j3 "} BUILD=${BUILD:-1} @@ -88,6 +88,8 @@ find . \ ./autogen.sh ) +EMACS_VERSION=$(grep "AC_INIT(GNU Emacs," $SRCDIR/configure.ac | sed 's|AC_INIT(GNU Emacs, \([0-9.]*\), bug-gnu-emacs@gnu.org)|\1|') + CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ $SRCDIR/configure \ @@ -228,4 +230,4 @@ Categories=Application;Development; EOF cd $PKG -/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.txz +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$EMACS_VERSION_$VERSION-$ARCH-$BUILD$TAG.txz