summaryrefslogtreecommitdiffstats
path: root/packaging/bin
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 17:20:00 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 17:20:00 +0000
commit8daa83a594a2e98f39d764422bfbdbc62c9efd44 (patch)
tree4099e8021376c7d8c05bdf8503093d80e9c7bad0 /packaging/bin
parentInitial commit. (diff)
downloadsamba-8daa83a594a2e98f39d764422bfbdbc62c9efd44.tar.xz
samba-8daa83a594a2e98f39d764422bfbdbc62c9efd44.zip
Adding upstream version 2:4.20.0+dfsg.upstream/2%4.20.0+dfsg
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'packaging/bin')
-rwxr-xr-xpackaging/bin/fill-templates47
-rwxr-xr-xpackaging/bin/update-pkginfo31
2 files changed, 78 insertions, 0 deletions
diff --git a/packaging/bin/fill-templates b/packaging/bin/fill-templates
new file mode 100755
index 0000000..cd711bd
--- /dev/null
+++ b/packaging/bin/fill-templates
@@ -0,0 +1,47 @@
+#!/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
+# is usually called from release-scripts/create-tarball.
+# 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)
+TOPDIR=${DIRNAME}/../..
+SRCDIR=${TOPDIR}/source3
+VERSION_H=${SRCDIR}/include/version.h
+
+pushd ${SRCDIR} >/dev/null 2>&1
+./script/mkversion.sh
+popd >/dev/null 2>&1
+
+if [ ! -f ${VERSION_H} ]; then
+ echo "Error creating version.h"
+ exit 1
+fi
+
+VERSION=$(grep "define SAMBA_VERSION_OFFICIAL_STRING" ${VERSION_H} | awk '{print $3}')
+
+vendor_version=$(grep "define SAMBA_VERSION_VENDOR_SUFFIX" ${VERSION_H} | awk '{print $3}')
+if test "x${vendor_version}" != "x"; then
+ VERSION="${VERSION}-${vendor_version}"
+fi
+
+vendor_patch=$(grep "define SAMBA_VERSION_VENDOR_PATCH" ${VERSION_H} | awk '{print $3}')
+if test "x${vendor_patch}" != "x"; then
+ VERSION="${VERSION}-${vendor_patch}"
+fi
+
+VERSION=$(echo ${VERSION} | sed 's/\"//g')
+
+echo "VERSION: ${VERSION}"
+
+pushd ${TOPDIR}/packaging >/dev/null 2>&1
+./bin/update-pkginfo "${VERSION}" 1 ""
+popd >/dev/null 2>&1
diff --git a/packaging/bin/update-pkginfo b/packaging/bin/update-pkginfo
new file mode 100755
index 0000000..486c8c7
--- /dev/null
+++ b/packaging/bin/update-pkginfo
@@ -0,0 +1,31 @@
+#!/bin/bash
+
+VERSION=$1
+RELEASE=$2
+REVISION=$3
+
+if [ "x${REVISION}" = "x" ]; then
+ RPMREVISION=""
+else
+ RPMREVISION=".${REVISION}"
+fi
+
+if [ $# -ne 3 ]; then
+ echo Usage: update-pkginfo VERSION RELEASE REVISION
+ exit 1
+fi
+
+DIRNAME=$(dirname $0)
+TOPDIR=${DIRNAME}/../../
+PACKAGINGDIR=${TOPDIR}/packaging
+
+pushd ${PACKAGINGDIR} >/dev/null 2>&1
+for f in $(find . -type f -name "*.tmpl"); do
+ f2=$(echo $f | sed s/.tmpl//g)
+ echo $f2
+ sed -e s/PVERSION/$VERSION/g \
+ -e s/PRELEASE/$RELEASE/g \
+ -e s/PREVISION/${REVISION}/g \
+ -e s/PRPMREV/${RPMREVISION}/g <$f >$f2
+done
+popd >/dev/null 2>&1