• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt-6.x.4708/router/samba-3.5.8/packaging/bin/
1#!/bin/sh
2
3# Script to fill the packaging templates with the version
4# information that is created by mkversion in advance.
5#
6# This is a standalone wrapper for update-pkginfo, which
7# is usually called from release-scripts/create-tarball.
8# This allows for testing some aspects of packaging without
9# the need to go through all of create-tarball.
10#
11# Copyright (C) Michael Adam 2009
12#
13# License: GPL
14
15DIRNAME=$(dirname $0)
16TOPDIR=${DIRNAME}/../..
17SRCDIR=${TOPDIR}/source3
18VERSION_H=${SRCDIR}/include/version.h
19
20pushd ${SRCDIR} > /dev/null 2>&1
21./script/mkversion.sh
22popd > /dev/null 2>&1
23
24if [ ! -f ${VERSION_H} ] ; then
25	echo "Error creating version.h"
26	exit 1
27fi
28
29VERSION=`grep "define SAMBA_VERSION_OFFICIAL_STRING" ${VERSION_H} | awk '{print $3}'`
30
31vendor_version=`grep "define SAMBA_VERSION_VENDOR_SUFFIX" ${VERSION_H} | awk '{print $3}'`
32if test "x${vendor_version}" != "x" ; then
33	VERSION="${VERSION}-${vendor_version}"
34fi
35
36vendor_patch=`grep "define SAMBA_VERSION_VENDOR_PATCH" ${VERSION_H} | awk '{print $3}'`
37if test "x${vendor_patch}" != "x" ; then
38	VERSION="${VERSION}-${vendor_patch}"
39fi
40
41VERSION=`echo ${VERSION} | sed 's/\"//g'`
42
43echo "VERSION: ${VERSION}"
44
45pushd ${TOPDIR}/packaging > /dev/null 2>&1
46./bin/update-pkginfo "${VERSION}" 1 ""
47popd > /dev/null 2>&1
48