~ajhalili2006/ppa

937609796a61e054329062fbd3399b3b6d0c9c1a — Andrei Jiroh Halili 1 year, 7 days ago bb80287
build(alpine/testing/hadolint): :construction_worker: add makedepends and usual build-related script updates

Technically copied from community/shellcheck's APKBUILD upstream with some modifications.

Signed-off-by: Andrei Jiroh Halili <ajhalili2006@andreijiroh.eu.org>
1 files changed, 30 insertions(+), 2 deletions(-)

M alpine/testing/hadolint/APKBUILD
M alpine/testing/hadolint/APKBUILD => alpine/testing/hadolint/APKBUILD +30 -2
@@ 7,7 7,7 @@ pkgdesc="Dockerfile linter, validate inline bash, written in Haskell"
url="https://github.com/hadolint/hadolint/"
arch="all"
license="GPL-3.0"
subpackages="$pkgname-dev $pkgname-doc"
makedepends="cabal ghc libffi-dev"
source="https://github.com/hadolint/hadolint/archive/v$pkgver/hadolint-$pkgver.tar.gz"
builddir="$srcdir/hadolint-$pkgver"



@@ 35,7 35,6 @@ cabal_update() {

prepare() {
	default_prepare
	./striptests

	if [ "$(head -n 1 "$srcdir/cabal.config")" != "--$pkgver" ]; then
		die "Requirements file is outdated, run 'abuild cabal_update'"


@@ 44,6 43,35 @@ prepare() {
	ln -sf "$srcdir/cabal.config" "$builddir/cabal.config"
}

build() {
	# ghc version path
	export PATH="$PATH:/usr/lib/llvm14/bin"
	HOME="$_cabal_home" cabal update
	HOME="$_cabal_home" cabal configure \
		--prefix='/usr' \
		--bindir='$prefix/bin' \
		--docdir='$prefix/share/doc' \
		--datadir='$prefix/share' \
		--htmldir='$docdir/html' \
		--libdir='$prefix/lib' \
		--libsubdir="$pkgname" \
		--datasubdir="$pkgname" \
		--dynlibdir="$pkgname" \
		--sysconfdir='/etc' \
		--disable-library-profiling \
		--disable-profiling \
		--disable-shared \
		--enable-executable-stripping \
		--flags='GMP FFI standalone'
	HOME="$_cabal_home" cabal build -j
}

package() {
	HOME="$_cabal_home" cabal copy --destdir="$pkgdir"

	rm -r "$pkgdir/usr/lib/$pkgname"
}

sha512sums="
668d9006c36f21a34405b3a5b499125aa283dc2fe37712950709b8e5059eac557b58d0733161b1520fc82db81132fbc199ae4bb519928c4b5ca79bf0ebec147b  hadolint-2.12.0.tar.gz
"