# Contributor: Mark Hessling <mark@rexx.org>
# Maintainer: Mark Hessling <mark@rexx.org>
pkgname="the"
pkgver="@VERSION_UNQUOTED@"
pkgrel=1
pkgdesc="The Hessling Editor"
url="http://www.rexx.org"
arch="@MACH_ARCH@"
license="GPL-2.0-or-later"
depends="regina-rexx"
makedepends="regina-rexx-dev"
subpackages="$pkgname-@CURSES_BUILD@_@REXX_BUILD@ $pkgname-doc"
options="!check"
source="the-@VERSION_UNQUOTED@.tar.gz"
builddir="$srcdir/"

build() {
        cd "$srcdir/$pkgname-$pkgver"
        ./configure \
           --build=$CBUILD \
           --host=$CHOST \
           --prefix=/usr \
           --sysconfdir=/etc \
           --mandir=/usr/share/man \
           --localstatedir=/var \
           --with-rexx=@REXX_BUILD@ \
           --with-curses=@CURSES_BUILD@
        make -j1
}
@CURSES_BUILD@_@REXX_BUILD@() {
       mkdir -p "$subpkgdir"/usr/bin
       mv "$pkgdir"/usr/bin/@THE_PACKAGE_NAME@-@THECURSESTYPE@  "$subpkgdir"/usr/bin/@THE_PACKAGE_NAME@-@THECURSESTYPE@
}

package() {
        cd "$srcdir/$pkgname-$pkgver"
        make -j1 DESTDIR="$pkgdir" install
}
