# Maintainer: Alexey Pavlov <alexpux@gmail.com>

pkgname=cocom
pkgver=0.996
pkgrel=2
pkgdesc="Toolset for creation of compilers and interpreters"
arch=('i686' 'x86_64')
url="https://cocom.sourceforge.io/"
license=('custom')
groups=('msys2-devel')
depends=()
source=(https://downloads.sourceforge.net/sourceforge/${pkgname}/${pkgname}-${pkgver}.tar.gz)
sha256sums=('e143ab556d79a35ef31ec1e240897c9b8a8d0b6693e50a2b6e47d7fd4b200519')

prepare() {
  cd ${srcdir}/${pkgname}-${pkgver}/REGEX

  autoreconf -fi
}

build() {
  cd ${srcdir}/${pkgname}-${pkgver}
  ./configure --prefix=/usr --mandir=/usr/share/man
  make
}

check() {
  cd ${srcdir}/${pkgname}-${pkgver}
  make check
}

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