docs: Raise version number from 3.2 to 3.3.
[Samba/gbeck.git] / packaging / RHEL-CTDB / makespec.sh
blob7d10d55ab4db322793c0a99a4341eb1621c266a2
1 #!/bin/sh
3 # Copyright (C) Michael Adam 2008
5 # Script to determine the samba version and create the SPEC file from template
7 DIRNAME=$(dirname $0)
8 TOPDIR=${DIRNAME}/../..
9 SRCDIR=${TOPDIR}/source
10 VERSION_H=${SRCDIR}/include/version.h
11 SPECFILE=${DIRNAME}/samba.spec
14 ## determine the samba version and create the SPEC file
16 pushd ${SRCDIR}
17 ./script/mkversion.sh
18 popd
19 if [ ! -f ${VERSION_H} ] ; then
20 echo "Error creating version.h"
21 exit 1
24 VERSION=`grep SAMBA_VERSION_OFFICIAL_STRING ${VERSION_H} | awk '{print $3}'`
25 vendor_version=`grep SAMBA_VERSION_VENDOR_SUFFIX ${VERSION_H} | awk '{print
26 $3}'`
27 if test "x${vendor_version}" != "x" ; then
28 VERSION="${VERSION}-${vendor_version}"
30 VERSION=`echo ${VERSION} | sed 's/-/_/g'`
31 VERSION=`echo ${VERSION} | sed 's/\"//g'`
32 echo "VERSION: ${VERSION}"
33 sed -e s/PVERSION/${VERSION}/g \
34 < ${SPECFILE}.tmpl \
35 > ${SPECFILE}