# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Nicolas Lorin <androw95220@gmail.com>
pkgname=recode
pkgver=3.7.14
pkgrel=1
pkgdesc="Charset converter tool and library"
url="https://github.com/rrthomas/recode"
arch="all"
license="GPL-2.0-or-later"
makedepends="libtool automake autoconf texinfo flex bison gettext-dev
	python3"
subpackages="$pkgname-dev $pkgname-doc"
source="https://github.com/rrthomas/recode/releases/download/v$pkgver/recode-$pkgver.tar.gz"

prepare() {
	default_prepare
	rm -f acinclude.m4 m4/libtool.m4
	autoreconf -vif
}

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

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

sha512sums="
ca0e9aa392f0571cfd1cf9566a15d7651a80edf40d603eadaa4c4ee2d7843ffa9d6074be30a21dac2ab192fe601f8581721d719d055911eeccb455acfe112596  recode-3.7.14.tar.gz
"
