source: branches/samba-3.3.x/packaging/RHEL-CTDB/makespec.sh@ 1036

Last change on this file since 1036 was 206, checked in by Herwig Bauernfeind, 16 years ago

Import Samba 3.3 branch at 3.0.0 level (psmedley's port)

File size: 878 bytes
Line 
1#!/bin/sh
2#
3# Copyright (C) Michael Adam 2008
4#
5# Script to determine the samba version and create the SPEC file from template
6
7DIRNAME=$(dirname $0)
8TOPDIR=${DIRNAME}/../..
9SRCDIR=${TOPDIR}/source
10VERSION_H=${SRCDIR}/include/version.h
11SPECFILE=${DIRNAME}/samba.spec
12
13##
14## determine the samba version and create the SPEC file
15##
16pushd ${SRCDIR}
17./script/mkversion.sh
18popd
19if [ ! -f ${VERSION_H} ] ; then
20 echo "Error creating version.h"
21 exit 1
22fi
23
24VERSION=`grep SAMBA_VERSION_OFFICIAL_STRING ${VERSION_H} | awk '{print $3}'`
25vendor_version=`grep SAMBA_VERSION_VENDOR_SUFFIX ${VERSION_H} | awk '{print $3}'`
26if test "x${vendor_version}" != "x" ; then
27 VERSION="${VERSION}-${vendor_version}"
28fi
29VERSION=`echo ${VERSION} | sed 's/-/_/g'`
30VERSION=`echo ${VERSION} | sed 's/\"//g'`
31echo "VERSION: ${VERSION}"
32sed -e s/PVERSION/${VERSION}/g \
33 < ${SPECFILE}.tmpl \
34 > ${SPECFILE}
35
Note: See TracBrowser for help on using the repository browser.