# Contributor: Ferass El Hafidi <funderscore@postmarketos.org>
# Maintainer: Ferass El Hafidi <funderscore@postmarketos.org>
pkgname=gxlimg
pkgver=0_git20240711
pkgrel=0
pkgdesc="Boot image creation tool for Amlogic GXL/G12A SoCs"
url="https://github.com/repk/gxlimg"
arch="all"
license="BSD-2-Clause"
makedepends_host="openssl-dev linux-headers"
options="!check" # no tests provided
_commit="0d0e5ba9cf396d1338067e8dc37a8bcd2e6874f1"
source="$pkgname-$pkgver.tar.gz::https://github.com/repk/gxlimg/archive/$_commit.tar.gz"
builddir="$srcdir"/$pkgname-$_commit

build() {
	make CFLAGS="$CFLAGS -g" LDFLAGS="$LDFLAGS -lcrypto" DEBUG=1
}

package() {
	install -Dm755 gxlimg "$pkgdir/usr/bin/gxlimg"
	install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/COPYING"
}

sha512sums="
838245931555800e5308283432a7f338c6d7dc39305d577a422d7195c54cabeba68b6c999d71a0e067141edc9c83a8a0630c906fa40041447680186d0fc4e303  gxlimg-0_git20240711.tar.gz
"
