summaryrefslogtreecommitdiffstats
path: root/debian/scripts/fix_component_tarballs.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 16:52:12 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 16:52:12 +0000
commit974c21ad33bfa1d93d5ae795556d35ca7eb36e68 (patch)
tree1a0d7c0258aadfcd993c4bffa454bcf117b382cf /debian/scripts/fix_component_tarballs.sh
parentAdding upstream version 1:7.0.4. (diff)
downloadlibreoffice-974c21ad33bfa1d93d5ae795556d35ca7eb36e68.tar.xz
libreoffice-974c21ad33bfa1d93d5ae795556d35ca7eb36e68.zip
Adding debian version 1:7.0.4-4+deb11u8.debian/1%7.0.4-4+deb11u8
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/scripts/fix_component_tarballs.sh')
-rwxr-xr-xdebian/scripts/fix_component_tarballs.sh36
1 files changed, 36 insertions, 0 deletions
diff --git a/debian/scripts/fix_component_tarballs.sh b/debian/scripts/fix_component_tarballs.sh
new file mode 100755
index 000000000..be149f297
--- /dev/null
+++ b/debian/scripts/fix_component_tarballs.sh
@@ -0,0 +1,36 @@
+#!/bin/sh
+
+set -x
+set -e
+
+pwd=`pwd`
+tmp=`mktemp -q -d`
+
+debianver=`uscan --report --verbose | grep newversion | cut -d= -f2 | awk '{ print $1 }' | head -n 1`
+
+# the main tarball
+t=`uscan --report --verbose | grep newfile | cut -d= -f2 | head -n 1`
+sourcever=`echo $t | cut -d- -f2 | sed -e "s/\.tar\.xz$//"`
+
+files=`uscan --report --verbose | grep newfile | cut -d= -f2 | tail -n +2`
+
+for f in $files; do
+ if echo $f | grep -q help; then
+ c=helpcontent2;
+ else
+ c=`echo $f | cut -d- -f2`;
+ fi
+
+ cd ${tmp}
+ echo "Extracting original $f..."
+ tar --strip-components 1 --extract --verbose --xz --file ${pwd}/../$f
+ echo "Deleting obsolete libreoffice_${debianver}.orig-${c}.tar.xz and it's signatiure...."
+ rm -f ${pwd}/../libreoffice_${debianver}.orig-${c}.tar.xz
+ rm -f ${pwd}/../libreoffice_${debianver}.orig-${c}.tar.xz.asc
+ echo "Creating new libreoffice_${debianver}.orig-${c}.tar.xz..."
+ tar --create --verbose --xz --file ${pwd}/../libreoffice_${debianver}.orig-${c}.tar.xz ${c}
+ rm -rf ${c}
+ cd ${pwd}
+done
+
+rm -rf ${tmp}