# Maintainer: Baptiste Jonglez <archlinux at bitsofnetworks.org>
# Contributor: Christian Hesse <mail@eworm.de>
# Contributor: Andreas Wagner <andreas.wagner@lowfatcomputing.org>
# Contributor: Jeff Mickey <jeff@archlinux.org>

pkgname=icmake
pkgver=9.02.08
pkgrel=2
pkgdesc='A program maintenance (make) utility using a C-like grammar'
arch=('x86_64')
url='https://fbb-git.gitlab.io/icmake/'
license=('GPL3')
source=("https://gitlab.com/fbb-git/${pkgname}/-/archive/${pkgver}/${pkgname}-${pkgver}.tar.gz"
        "disable-clear-screen.patch")
sha256sums=('eeabc5b0611661749b584cce3a22c6a5b811e0467f764df6990a1791e6605ac1'
            'a5edbdb70ab6748c7124979f9af08884b4d7b16fa3ece8ff39d5986e6fd20592')

prepare() {
	cd "${srcdir}/${pkgname}-${pkgver}"
        patch -p1 < "${srcdir}/disable-clear-screen.patch"
}

build() {
	cd "${srcdir}/${pkgname}-${pkgver}/${pkgname}"

	./icm_prepare /
	./icm_bootstrap /
}

package() {
	cd "${srcdir}/${pkgname}-${pkgver}/${pkgname}"

	./icm_install all "${pkgdir}"
}

