### this file is sourced not run

# source: step
pkgname=multitail
PKGVER=7.0.0
PKGBUILD=1
PKGARCH=x86_64
TARBALL=$pkgname-$PKGVER.tar.gz
MD5SUM=90b67e3e41c5c51b65b946149eaa780e
#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 GNU GPLv2
$pkgname:
$pkgname:
$pkgname: http://www.vanheusden.com/multitail/index.php
$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/license.txt/LICENSE/; s|ect/|etc/|' CMakeLists.txt &&
  
  #make DESTDIR=/ CONFIG_FILE=/etc/multitail.conf PREFIX=/usr install &&
  pkg_build_cmake &&
  
  mv -v /usr/etc/multitail* /etc &&
  rm -r /usr/etc &&
  mv /usr/share/doc/{multitail*,multitail-$PKGVER} &&
  pkg_build_slackdesc
}

# vim: ft=sh:
