# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=libtirpc
pkgver=1.1.4
pkgrel=1
pkgdesc="Transport Independent RPC library (SunRPC replacement)"
url="https://sourceforge.net/projects/libtirpc/"
arch="all"
options="!check"  # No test suite.
license="BSD-3-Clause"
depends=""
depends_dev="bsd-compat-headers krb5-dev"
makedepends="$depends_dev autoconf automake libtool linux-headers"
subpackages="$pkgname-dev $pkgname-doc $pkgname-dbg"
source="https://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.bz2
	musl.patch"

build() {
	cd "$builddir"
	export CFLAGS="$CFLAGS -D__u_char_defined -D__daddr_t_defined"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconf=/etc
	make
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install
}

sha512sums="392f391f9fc1bd68d81dc44e4058831a64b32790b5c8c37338b0ab416fad2ae4d16389e632596734dba09780347918cc65c6f134e0c1afd09e81ec250785ed23  libtirpc-1.1.4.tar.bz2
8e52246ae478ae9e4689426627e17d9c58d701f4fd21a40ffe3cf17c4ceaa4ab2e8e91d2fa3ba0d0c7adc52ae4b986fcda113ec86e370ede83903bb641de520c  musl.patch"