2009-02-10 20:54:16 +03:00
#!/bin/sh
# Script to fill the packaging templates with the version
# information that is created by mkversion in advance.
#
# This is a standalone wrapper for update-pkginfo, which
2009-03-09 18:16:20 +03:00
# is usually called from release-scripts/create-tarball.
2009-02-10 20:54:16 +03:00
# This allows for testing some aspects of packaging without
# the need to go through all of create-tarball.
#
# Copyright (C) Michael Adam 2009
#
# License: GPL
DIRNAME=$(dirname $0)
2009-02-12 00:24:52 +03:00
TOPDIR=${DIRNAME}/../..
2009-02-11 01:10:23 +03:00
SRCDIR=${TOPDIR}/source3
2009-02-10 20:54:16 +03:00
VERSION_H=${SRCDIR}/include/version.h
2009-02-11 01:31:52 +03:00
pushd ${SRCDIR} > /dev/null 2>&1
2009-02-10 20:54:16 +03:00
./script/mkversion.sh
2009-02-11 01:31:52 +03:00
popd > /dev/null 2>&1
2009-02-10 20:54:16 +03:00
if [ ! -f ${VERSION_H} ] ; then
echo "Error creating version.h"
exit 1
fi
2009-02-12 00:27:48 +03:00
VERSION=`grep "define SAMBA_VERSION_OFFICIAL_STRING" ${VERSION_H} | awk '{print $3}'`
2009-02-10 20:54:16 +03:00
2009-02-12 00:27:48 +03:00
vendor_version=`grep "define SAMBA_VERSION_VENDOR_SUFFIX" ${VERSION_H} | awk '{print $3}'`
2009-02-10 20:54:16 +03:00
if test "x${vendor_version}" != "x" ; then
VERSION="${VERSION}-${vendor_version}"
fi
2009-02-12 00:27:48 +03:00
vendor_patch=`grep "define SAMBA_VERSION_VENDOR_PATCH" ${VERSION_H} | awk '{print $3}'`
2009-02-10 20:54:16 +03:00
if test "x${vendor_patch}" != "x" ; then
VERSION="${VERSION}-${vendor_patch}"
fi
VERSION=`echo ${VERSION} | sed 's/\"//g'`
echo "VERSION: ${VERSION}"
2009-02-11 01:30:48 +03:00
pushd ${TOPDIR}/packaging > /dev/null 2>&1
2009-02-12 00:25:41 +03:00
./bin/update-pkginfo "${VERSION}" 1 ""
2009-02-11 01:30:48 +03:00
popd > /dev/null 2>&1