summaryrefslogtreecommitdiff
path: root/system/ncurses/maintain
diff options
context:
space:
mode:
authorZach van Rijn <me@zv.io>2022-04-19 13:57:05 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2022-05-01 17:05:57 -0500
commit51eb1b8fa89ca7c3837f48b842fb3150a24bd759 (patch)
tree74bafeb0f28e4ee63a84c148c4b54baa99aa2abc /system/ncurses/maintain
parente03bbd44e45aa58a8979703000b99228d45717d5 (diff)
downloadpackages-51eb1b8fa89ca7c3837f48b842fb3150a24bd759.tar.gz
packages-51eb1b8fa89ca7c3837f48b842fb3150a24bd759.tar.bz2
packages-51eb1b8fa89ca7c3837f48b842fb3150a24bd759.tar.xz
packages-51eb1b8fa89ca7c3837f48b842fb3150a24bd759.zip
system/ncurses: bump { 20220129 --> 20220416 }. add maintenance script. fixes #531.
Diffstat (limited to 'system/ncurses/maintain')
-rwxr-xr-xsystem/ncurses/maintain64
1 files changed, 64 insertions, 0 deletions
diff --git a/system/ncurses/maintain b/system/ncurses/maintain
new file mode 100755
index 000000000..3112cf87a
--- /dev/null
+++ b/system/ncurses/maintain
@@ -0,0 +1,64 @@
+#!/bin/sh -e
+
+##
+# This script downloads the "base" ncurses tarball and all patches (if any)
+# up to and including the version specified in '_ver', to a temporary dir.
+#
+# It prints a first pass at 'sources=' and the corresponding checksums. You
+# need to copy/paste these into the APKBUILD yourself. Ensure tabs!!!
+#
+
+##
+# Only run from this directory.
+#
+test -f APKBUILD || exit 1;
+. ./APKBUILD
+
+##
+# Mirror (note: not invisible-island, related).
+#
+m=https://invisible-mirror.net/archives/ncurses
+
+##
+# Parse the HTML from directory index to determine available patches.
+#
+p=$(curl -s ${m}/${pkgver}/ \
+ | grep -oE '[0-9]{8}\.patch' `# 8-digit date` \
+ | sort \
+ | uniq \
+ | awk "\$1 <= ${_ver} + 1" `# exclude newly-available patches` \
+ | awk "{print \"${m}/${pkgver}/${pkgname}-${pkgver}-\"\$1\".gz\"}"
+);
+
+d=$(mktemp -d);
+cd ${d};
+
+##
+# Download "base" tarball.
+#
+s=${m}/${pkgname}-${pkgver}.tar.gz;
+curl -sq -O ${s};
+
+##
+# Generate 'source=', extracting patches along the way.
+#
+printf "source=\"%s\n" "${s}";
+for k in ${p}; do
+ curl -sq -O ${k};
+ gzip -d ${k##*/};
+ _k=${k##*/};
+ printf "\t%s\n" "${_k%.*}";
+done
+printf "\t\"\n";
+
+##
+# Checksums.
+#
+sha512sum $(find . -type f -print | cut -d/ -f2- | sort);
+rm "${s##*/}";
+
+##
+# Cleanup.
+#
+printf "\n";
+printf "YOU MUST COPY THE PATCHES FROM '%s' (and delete that dir after)!\n" "${d}";