# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=libtree
pkgver=3.1.1
pkgrel=0
pkgdesc="ldd as a tree with an option to bundle dependencies into a single folder"
url="https://github.com/haampie/libtree"
arch="all"
license="MIT"
subpackages="$pkgname-doc"
source="https://github.com/haampie/libtree/archive/v$pkgver/libtree-$pkgver.tar.gz
	alpine-exclude_list.patch
	"

prepare() {
	default_prepare

	sed -i "s/@@CARCH@@/$CARCH/" libtree.c
	# alpine does not support multilib
	rm -r tests/05_32_bits
}

build() {
	make
}

check() {
	make check
}

package() {
	make install DESTDIR="$pkgdir" PREFIX=/usr
}

sha512sums="
6b4b41b16edfcaa83c16b566a3afff1de0ecffdd5f91af2c82db95fca678b993e021ca8fac5fd1d37ad60ea2215100a0889ee457ce08019f3888e32c755ba1ce  libtree-3.1.1.tar.gz
51c6efa191d4f375c917167535679c87040d7625bb6878218c2096609315ad924eb0100c46d77e9d432d636617ac983eff17c75fb9cda05c6e0134c9aa1317c7  alpine-exclude_list.patch
"
