-# Change from generic-build-script: save pwd for later use.
-pwd=`pwd`
-
-# Change from generic-build-script: base version on contents of
-# VERSION instead of script name. Looks first for VERSION in
-# current directory, then in $topdir.
-test -e VERSION && version=VERSION || version="${topdir}/VERSION"
-if ! test -e "${version}"; then
- echo "$0: need VERSION file"
- exit 1
-fi
-
-tscriptname=nmh-`cat "${version}"`
-# Change from generic-build-script: allow + in addition to - between
-# VER and REL, e.g., 1.5+dev.
-export PKG=`echo $tscriptname | sed -e 's/\-[^\-]*[+-][^+-]*$//'`
-export VER=`echo $tscriptname | sed -e "s/${PKG}\-//" -e 's/[+-][^+-]*$//'`
-export REL=`echo $tscriptname | sed -e "s/${PKG}\-${VER}\([+-]\)/\1/"`
+tscriptname=`basename $0 .sh`
+export PKG=`echo $tscriptname | sed -e 's/\-[^\-]*\-[^\-]*$//'`
+export VER=`echo $tscriptname | sed -e "s/${PKG}\-//" -e 's/\-[^\-]*$//'`
+export REL=`echo $tscriptname | sed -e "s/${PKG}\-${VER}\-//"`