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

pkgname=icmake
pkgver=9.03.01
pkgrel=1
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=('7c5c091f58f576da580238c5e3636e2038d9ecf5efb6562ae7e402910d9036e6'
            'f141389f6a42ac8a66b8abcd1a2649e3d41cd661ab0c5fdafab0c37a8fa793ba')

prepare() {
	cd "${srcdir}/${pkgname}-${pkgver}"
        patch -Np1 -i "${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}"
}

