From fa7e81c7a2c831c0e6a6604fa45b89ab5bf120d8 Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Wed, 6 May 2020 14:34:33 +0000 Subject: 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). --- main/ncurses/APKBUILD | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) (limited to 'main/ncurses/APKBUILD') diff --git a/main/ncurses/APKBUILD b/main/ncurses/APKBUILD index 2ec9dce383f..c03c34bca2e 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() { -- cgit v1.2.3