summaryrefslogtreecommitdiffstats
path: root/packaging/bin/update-pkginfo
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-05 17:47:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-05 17:47:29 +0000
commit4f5791ebd03eaec1c7da0865a383175b05102712 (patch)
tree8ce7b00f7a76baa386372422adebbe64510812d4 /packaging/bin/update-pkginfo
parentInitial commit. (diff)
downloadsamba-4f5791ebd03eaec1c7da0865a383175b05102712.tar.xz
samba-4f5791ebd03eaec1c7da0865a383175b05102712.zip
Adding upstream version 2:4.17.12+dfsg.upstream/2%4.17.12+dfsgupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rwxr-xr-xpackaging/bin/update-pkginfo31
1 files changed, 31 insertions, 0 deletions
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