build_cpu
build
E2FSPROGS_DATE
+E2FSPROGS_PKGREL
E2FSPROGS_PKGVER
E2FSPROGS_VERSION
E2FSPROGS_DAY
MCONFIG=./MCONFIG
BINARY_TYPE=bin
-E2FSPROGS_VERSION=`grep E2FSPROGS_VERSION ${srcdir}/version.h \
- | awk '{print $3}' | tr \" " " | awk '{print $1}'`
-E2FSPROGS_DATE=`grep E2FSPROGS_DATE ${srcdir}/version.h | awk '{print $3}' \
- | tr \" " " | awk '{print $1}'`
-E2FSPROGS_DAY=$(echo $E2FSPROGS_DATE | awk -F- '{print $1}' | sed -e '/^[1-9]$/s/^/0/')
+E2FSPROGS_VERSION=`awk -F\" '/E2FSPROGS_VER/ { print $2 }' ${srcdir}/version.h`
+E2FSPROGS_DATE=`awk -F\" '/E2FSPROGS_DATE/ { print $2 }' ${srcdir}/version.h`
+E2FSPROGS_DAY=$(echo $E2FSPROGS_DATE | awk -F- '{ printf "%02d", $1 }')
MONTH=`echo $E2FSPROGS_DATE | awk -F- '{print $2}'`
YEAR=`echo $E2FSPROGS_DATE | awk -F- '{print $3}'`
printf "%s\n" "$as_me: WARNING: Unknown month $MONTH??" >&2;} ;;
esac
-base_ver=`echo $E2FSPROGS_VERSION | \
- sed -e 's/-WIP//' -e 's/pre-//' -e 's/-PLUS//'`
+base_ver=`echo $E2FSPROGS_VERSION | sed -e 's/pre-//' -e 's/-.*//'`
+base_rel=`echo $E2FSPROGS_VERSION | awk -F- '{ print $2 }'`
date_spec=${E2FSPROGS_YEAR}.${MONTH_NUM}.${E2FSPROGS_DAY}
case $E2FSPROGS_VERSION in
*-WIP|pre-*)
- E2FSPROGS_PKGVER="$base_ver~WIP.$date_spec"
+ E2FSPROGS_PKGVER="$base_ver"
+ E2FSPROGS_PKGREL="WIP.$date_spec"
;;
*)
E2FSPROGS_PKGVER="$base_ver"
+ E2FSPROGS_PKGREL="$base_rel"
;;
esac
dnl
dnl This is to figure out the version number and the date....
dnl
-E2FSPROGS_VERSION=`grep E2FSPROGS_VERSION ${srcdir}/version.h \
- | awk '{print $3}' | tr \" " " | awk '{print $1}'`
-E2FSPROGS_DATE=`grep E2FSPROGS_DATE ${srcdir}/version.h | awk '{print $3}' \
- | tr \" " " | awk '{print $1}'`
-E2FSPROGS_DAY=$(echo $E2FSPROGS_DATE | awk -F- '{print $1}' | sed -e '/^[[1-9]]$/s/^/0/')
+E2FSPROGS_VERSION=`awk -F\" '/E2FSPROGS_VER/ { print $2 }' ${srcdir}/version.h`
+E2FSPROGS_DATE=`awk -F\" '/E2FSPROGS_DATE/ { print $2 }' ${srcdir}/version.h`
+E2FSPROGS_DAY=$(echo $E2FSPROGS_DATE | awk -F- '{ printf "%02d", $1 }')
MONTH=`echo $E2FSPROGS_DATE | awk -F- '{print $2}'`
YEAR=`echo $E2FSPROGS_DATE | awk -F- '{print $3}'`
*) AC_MSG_WARN([Unknown month $MONTH??]) ;;
esac
-base_ver=`echo $E2FSPROGS_VERSION | \
- sed -e 's/-WIP//' -e 's/pre-//' -e 's/-PLUS//'`
+base_ver=`echo $E2FSPROGS_VERSION | sed -e 's/pre-//' -e 's/-.*//'`
+base_rel=`echo $E2FSPROGS_VERSION | awk -F- '{ print $2 }'`
date_spec=${E2FSPROGS_YEAR}.${MONTH_NUM}.${E2FSPROGS_DAY}
case $E2FSPROGS_VERSION in
*-WIP|pre-*)
- E2FSPROGS_PKGVER="$base_ver~WIP.$date_spec"
+ E2FSPROGS_PKGVER="$base_ver"
+ E2FSPROGS_PKGREL="WIP.$date_spec"
;;
*)
E2FSPROGS_PKGVER="$base_ver"
+ E2FSPROGS_PKGREL="$base_rel"
;;
esac
unset DATE MONTH YEAR base_ver pre_vers date_spec
AC_MSG_RESULT([Generating configuration file for e2fsprogs version $E2FSPROGS_VERSION])
+AC_MSG_RESULT([Package version ${E2FSPROGS_PKGVER} release ${E2FSPROGS_PKGREL}])
AC_MSG_RESULT([Release date is ${E2FSPROGS_MONTH}, ${E2FSPROGS_YEAR}])
AC_SUBST(E2FSPROGS_YEAR)
AC_SUBST(E2FSPROGS_MONTH)
AC_SUBST(E2FSPROGS_DAY)
AC_SUBST(E2FSPROGS_VERSION)
AC_SUBST(E2FSPROGS_PKGVER)
+AC_SUBST(E2FSPROGS_PKGREL)
AC_SUBST(E2FSPROGS_DATE)
dnl
dnl Use diet libc
currdir=`basename $pwd`
pkgname=`grep Name: e2fsprogs.spec | awk '{print $2;}'`
pkgvers=`grep Version: e2fsprogs.spec | awk '{print $2;}'`
+pkgrel=`grep Release: e2fsprogs.spec | awk '{print $2;}'`
builddir=${pkgname}-${pkgvers}
# ensure that $TMP is set to something
srcdir=@srcdir@
top_srcdir=@top_srcdir@
top_dir=`cd $top_srcdir; pwd`
-base_ver=`echo @E2FSPROGS_VERSION@ | sed -e 's/-WIP//' -e 's/pre-//' -e 's/-PLUS//'`
+base_ver=`echo @E2FSPROGS_PKGVER@`
base_e2fsprogs=`basename $top_dir`
exclude=/tmp/exclude$$
GZIP=gzip
# using a non-standard directory name for WIP releases. dpkg-source
# complains, but life goes on.
#
-deb_pkgver=`echo @E2FSPROGS_PKGVER@ | sed -e 's/~/-/g'`
+deb_pkgver=`echo @E2FSPROGS_PKGVER@-@E2FSPROGS_PKGREL@`
case $1 in
debian|ubuntu)
SRCROOT="e2fsprogs-$deb_pkgver"
- tarout="e2fsprogs_@E2FSPROGS_PKGVER@.orig.tar.gz"
+ tarout="e2fsprogs_@E2FSPROGS_PKGVER@-@E2FSPROGS_PKGREL@.orig.tar.gz"
;;
all|*)
SRCROOT="e2fsprogs-$base_ver"