summaryrefslogtreecommitdiffstats
path: root/setver
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2020-11-07 04:25:32 (EST)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2020-11-07 04:29:55 (EST)
commit5dd1f6569d45a01be63ce85ae0b86cffcbae88f1 (patch)
tree31d632129034aa38d8f9f5cfa83521aa8cd1ff01 /setver
parent6e62f084c0d8395af4743d635297984280074321 (diff)
Version package names
Diffstat with similarity index set to 24%: basever.mk | 1 + build | 25 +++++++++++++------------ changelog | 4 +++- {linux-common.pkg => linux-common-4.19.pkg}/control | 5 +++-- {linux-common.pkg => linux-common-4.19.pkg}/docs | 0 {linux-image.pkg => linux-image-4.19.pkg}/control | 6 +++--- {linux-image.pkg => linux-image-4.19.pkg}/postinst | 0 {linux-image.pkg => linux-image-4.19.pkg}/postrm | 0 {linux-image.pkg => linux-image-4.19.pkg}/preinst | 0 {linux-image.pkg => linux-image-4.19.pkg}/prerm | 0 {linux-libc-dev.pkg => linux-libc-dev-4.19.pkg}/control | 4 ++-- {linux-libc-dev-common.pkg => linux-libc-dev-common-4.19.pkg}/control | 2 +- {linux-sysmap.pkg => linux-sysmap-4.19.pkg}/control | 7 ++++--- setver | 17 +++++++++++++++++ substvars | 1 + 15 files changed, 48 insertions(+), 24 deletions(-)
Diffstat (limited to 'setver')
-rwxr-xr-xsetver17
1 files changed, 17 insertions, 0 deletions
diff --git a/setver b/setver
new file mode 100755
index 0000000..14efac1
--- /dev/null
+++ b/setver
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+set -eu
+
+OPK_SOURCE="$(sed 's/ .*//; q;' changelog)"
+BASE_VERSION="${OPK_SOURCE#linux-libre-}"
+GIT=''
+[ -d .git/ ] && GIT='git'
+
+for pkg in *.pkg/; do
+ ${GIT} mv "${pkg}" "${pkg%-*.pkg/}-${BASE_VERSION}.pkg/"
+done
+
+printf 'VER = %s\n' "${BASE_VERSION}" 1>basever.mk
+mv substvars substvars~
+sed "s/^Base-Version:.*$/Base-Version: ${BASE_VERSION}/" substvars~ 1>substvars
+rm substvars~