aboutsummaryrefslogtreecommitdiff
path: root/debian/make-dsc-for-obs.sh
diff options
context:
space:
mode:
authorB Stack <bgstack15@gmail.com>2020-03-23 17:01:45 -0400
committerB Stack <bgstack15@gmail.com>2020-03-23 17:01:45 -0400
commita3e27219edd1c77fe9831d4eac1d7310f8afdd06 (patch)
treebf30a9449a3ee3afbc6fc46c860591a64907ac8d /debian/make-dsc-for-obs.sh
parentadd debian/ (diff)
downloadfreeipa-helper-a3e27219edd1c77fe9831d4eac1d7310f8afdd06.tar.gz
freeipa-helper-a3e27219edd1c77fe9831d4eac1d7310f8afdd06.tar.bz2
freeipa-helper-a3e27219edd1c77fe9831d4eac1d7310f8afdd06.zip
fix sssd.conf and improve packaging
fix #1 post-install needs to chmod 0600 sssd.conf add sssd.conf.in template add make-dsc-for-obs script bump version to 0.0.2
Diffstat (limited to 'debian/make-dsc-for-obs.sh')
-rwxr-xr-xdebian/make-dsc-for-obs.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/debian/make-dsc-for-obs.sh b/debian/make-dsc-for-obs.sh
new file mode 100755
index 0000000..da1c0b7
--- /dev/null
+++ b/debian/make-dsc-for-obs.sh
@@ -0,0 +1,10 @@
+#!/bin/sh
+# 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