# Contributor: Shiz <hi@shiz.me>
# Maintainer: Shiz <hi@shiz.me>
pkgname=icmake
pkgver=9.02.03
pkgrel=0
pkgdesc="Make utility using a C-like grammar"
url="https://fbb-git.github.io/icmake/"
arch="all"
license="GPL-3.0-or-later"
makedepends="bash"
subpackages="$pkgname-doc"
source="icmake-$pkgver.tar.gz::https://github.com/fbb-git/icmake/archive/$pkgver.tar.gz"
builddir="$srcdir/icmake-$pkgver/icmake"

prepare() {
	default_prepare

	cd "$builddir"
	sed -i '/^#define DOCDOCDIR/d' INSTALL.im
	echo '#define DOCDOCDIR "usr/share/doc/icmake"' >> INSTALL.im
}

build() {
	cd "$builddir"
	./icm_prepare /
	./icm_bootstrap x
}

check() {
	cd "$builddir"
	./tmp/usr/bin/icmake --version
	./tmp/usr/bin/icmbuild --version
}

package() {
	cd "$builddir"
	./icm_install strip all "$pkgdir"
}

sha512sums="1650497c8c2b2de949da33a293761ee371b1004c43234eced7840b66d0808b551dcfd09ca6b5fb82a9438539033dfc91138c2c16c700efab24821b043e3b0f10  icmake-9.02.03.tar.gz"
