# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=chrpath
pkgver=0.18
pkgrel=0
pkgdesc="Modify rpath of compiled programs"
url="https://codeberg.org/pere/chrpath"
arch="all"
license="GPL-2.0-or-later"
makedepends="autoconf automake"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://codeberg.org/pere/chrpath/archive/release-$pkgver.tar.gz"
builddir="$srcdir/$pkgname"

prepare() {
	default_prepare
	sh bootstrap
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" docdir=/usr/share/doc/chrpath install
}

sha512sums="
7b9d7005defc15ccec9631dcb79df1c79d701353e67fe6f733b1d80c95103d2a5852f7cd13ead6b43977682337a74db13af8f17667dd9394f3ad06eaca8bea3f  chrpath-0.18.tar.gz
"
