aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2020-05-06 14:34:33 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2020-05-06 14:38:50 +0000
commitfa7e81c7a2c831c0e6a6604fa45b89ab5bf120d8 (patch)
tree61339e2cb8fdae11b2761d2c5ad9ed061955f05f /main
parent5414ab89847243c22c8da5938d750e47a77cead4 (diff)
downloadaports-fa7e81c7a2c831c0e6a6604fa45b89ab5bf120d8.tar.bz2
aports-fa7e81c7a2c831c0e6a6604fa45b89ab5bf120d8.tar.xz
main/ncurses: fix handling of globs and quote paths
Fix the handling of terminology* and st-* globs. They will be expanded with $(find ...) and may return a list of files, so we need to loop over the result. Also do minor cleanups like quote variables with paths and keep the /usr/lib/terminfo symlink. fixes commit 95aa0e7217d (main/ncurses: upgrade to 6.2_p20200314).
Diffstat (limited to 'main')
-rw-r--r--main/ncurses/APKBUILD28
1 files changed, 15 insertions, 13 deletions
diff --git a/main/ncurses/APKBUILD b/main/ncurses/APKBUILD
index 2ec9dce383..c03c34bca2 100644
--- a/main/ncurses/APKBUILD
+++ b/main/ncurses/APKBUILD
@@ -47,21 +47,22 @@ package() {
# Install basic terms in /etc/terminfo
for i in ansi console dumb linux rxvt screen sun vt52 vt100 vt102 \
vt200 vt220 xterm xterm-color xterm-xfree86 xterm-256color \
- alacritty tmux tmux-256color terminator terminology* \
+ alacritty tmux tmux-256color terminator 'terminology*' \
vte vte-256color gnome gnome-256color kitty konsole konsole-256color \
- konsole-linux putty putty-256color rxvt-256color st-* \
+ konsole-linux putty putty-256color rxvt-256color 'st-*' \
screen-256color; do
- local termfile=$(find "$pkgdir"/usr/share/terminfo/ -name "$i" 2>/dev/null) || true
- local basedir=$(basename "$(dirname "$termfile")")
+ local termfiles=$(find "$pkgdir"/usr/share/terminfo/ -name "$i" 2>/dev/null) || true
- [ -z "$termfile" ] && continue
+ [ -z "$termfiles" ] && continue
- install -d "$pkgdir"/etc/terminfo/$basedir
- mv $termfile "$pkgdir"/etc/terminfo/$basedir/
- ln -s ../../../../etc/terminfo/$basedir/$i \
- "$pkgdir"/usr/share/terminfo/$basedir/$i
+ for termfile in $termfiles; do
+ local basedir=$(basename "$(dirname "$termfile")")
+ install -d "$pkgdir"/etc/terminfo/$basedir
+ mv "$termfile" "$pkgdir"/etc/terminfo/$basedir/
+ ln -s "../../../../etc/terminfo/$basedir/${termfile##*/}" \
+ "$pkgdir/usr/share/terminfo/$basedir/${termfile##*/}"
+ done
done
- rm -f $pkgdir/usr/lib/terminfo
}
dev() {
@@ -77,12 +78,13 @@ dev() {
}
terminfo() {
- depends=""
pkgdesc="$pkgdesc (other terminfo files)"
depends="$pkgname-terminfo-base=$pkgver-r$pkgrel"
- mkdir -p $subpkgdir/usr/share
- mv $pkgdir/usr/share/terminfo $subpkgdir/usr/share
+ mkdir -p "$subpkgdir"/usr/share "$subpkgdir"/usr/lib
+ mv "$pkgdir"/usr/share/terminfo "$subpkgdir"/usr/share
+ # also move symlink
+ mv "$pkgdir"/usr/lib/terminfo "$subpkgdir"/usr/lib/
}
libs() {