### this file is sourced not run

# source: step
pkgname=multitail
PKGVER=7.1.5
PKGBUILD=1
PKGARCH=x86_64
TARBALL=$pkgname-$PKGVER.tar.gz
MD5SUM=3cbf309e182fa75ce2ab78195cd184d4
#SRC_URL=https://www.vanheusden.com/$pkgname/$TARBALL
SRC_URL=https://github.com/folkertvanheusden/multitail/archive/refs/tags/$PKGVER.tar.gz
BUNDLE=

SLACKREQ='libncurses'
SLACKDESC="$pkgname: $pkgname $PKGVER (ncurses log viewer)
$pkgname: MultiTail allows you to monitor logfiles and command output in
$pkgname: multiple windows in a terminal, colorize, filter and merge.
$pkgname: This package version is compiled with wide-character support.
$pkgname:
$pkgname: License MIT
$pkgname:
$pkgname:
$pkgname: https://www.vanheusden.com/multitail/
$pkgname: https://github.com/folkertvanheusden/multitail
$pkgname:
"
SLACKINSTALL='
if [ -e /etc/multitail.conf ]; then
  echo "Please compare /etc/multitail.conf.new with /etc/multitail.conf"
else
  mv -v /etc/multitail.conf.new /etc/multitail.conf
fi
'
### default pkg_download
### default pkgـprepare
### default pkg_package
### build
pkg_build() {
	cd /tmp/multitail*

  # Patch for wide-character support.
  # Fatdog64's libncurses package is compiled with wide-character support
  # but it doesn't duplicate C header files for non-wide and wide libraries,
  # which confuses multitail's build. Patch mt.h to help the build find
  # wide-character header files that UTF8 support needs.
  #
  sed -i 's:\(#include.*\)ncursesw/:\1:' mt.h &&

  sed -i 's:RelWithDebInfo:Release:' CMakeLists.txt &&

  pkg_build_cmake &&

  mv -v /usr/etc/multitail* /etc &&
  rm -r /usr/etc &&
  pkg_build_slackdesc
}

# vim: ft=sh:
