summaryrefslogtreecommitdiff
path: root/powerkit/debian/make-dsc-for-obs.sh
diff options
context:
space:
mode:
authorB Stack <bgstack15@gmail.com>2020-04-10 13:26:33 +0000
committerB Stack <bgstack15@gmail.com>2020-04-10 13:26:33 +0000
commitf06d1fb002b08c354d304c5b0cb8c318463e0e37 (patch)
tree701c1c13a618d18d26434d2cad562c79f9849235 /powerkit/debian/make-dsc-for-obs.sh
parentMerge branch 'logout-manager-bump' into 'master' (diff)
parentbump version in dsc (diff)
downloadstackrpms-f06d1fb002b08c354d304c5b0cb8c318463e0e37.tar.gz
stackrpms-f06d1fb002b08c354d304c5b0cb8c318463e0e37.tar.bz2
stackrpms-f06d1fb002b08c354d304c5b0cb8c318463e0e37.zip
Merge branch 'powerkit-bump' into 'master'
Add powerkit 1.0.0 See merge request bgstack15/stackrpms!148
Diffstat (limited to 'powerkit/debian/make-dsc-for-obs.sh')
-rwxr-xr-xpowerkit/debian/make-dsc-for-obs.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/powerkit/debian/make-dsc-for-obs.sh b/powerkit/debian/make-dsc-for-obs.sh
new file mode 100755
index 0000000..362a62e
--- /dev/null
+++ b/powerkit/debian/make-dsc-for-obs.sh
@@ -0,0 +1,11 @@
+#!/bin/sh
+# Date: 2020-04-06
+# Goal: convert the fresh dsc file to a generic one for obs that omits version and checksum info on filenames
+# Use in debian/rules:
+# APPNAME=name-of-binary-package
+# override_dh_auto_build:
+# dh_auto_build
+# sh debian/make-dsc-for-obs.sh
+tf="../$( find .. -maxdepth 1 -name "${APPNAME}_*dsc" -printf '%T@ %f\n' | sort | tail -n1 | awk '{print $NF}' )"
+of="debian/$( basename "$( readlink -f "${tf}" )" | sed -r -e 's/_[0-9_\.]+[0-9_](-[0-9])?//;' )"
+awk 'BEGIN{a=0} a > 0 {$2="1";gsub(/_[0-9_\.]+[0-9_](-[0-9])?/,"");} /^Files/{a=1} {print}' "${tf}" | sed -r -e '/Checksums-.{0,8}:\s*$/,/^Files/{/Files/!{d};}' -e '/^Files/,${s/^ ?[^\s]{32}/ 00000000000000000000000000000000/;};' > "${of}"
bgstack15