# Maintainer: Lukas Fleischer <lfleischer@archlinux.org>
# Contributor: Allan McRae <allan@archlinux.org>
# Contributor: Andreas Radke <andyrtr@archlinux.org>

pkgname=autoconf
pkgver=2.71
pkgrel=1
pkgdesc="A GNU tool for automatically configuring source code"
arch=('any')
license=('GPL2' 'GPL3' 'custom')
url="https://www.gnu.org/software/autoconf"
groups=('base-devel')
depends=('awk' 'm4' 'diffutils' 'perl' 'sh')
checkdepends=('gcc-fortran')
source=("https://ftp.gnu.org/pub/gnu/${pkgname}/${pkgname}-${pkgver}.tar.xz"{,.sig})
md5sums=('12cfa1687ffa2606337efe1a64416106'
         'SKIP')
validpgpkeys=('82F854F3CE73174B8B63174091FCC32B6769AA64')  # Zack Weinberg


build() {
	cd "${pkgname}-${pkgver}"
	./configure --prefix=/usr
	make
}

check() {
	cd "${pkgname}-${pkgver}"

	# test 310 is a false positive due to warning outputted with our build flags
	make check || true
}

package() {
	cd "${pkgname}-${pkgver}"
	make DESTDIR="${pkgdir}" install

	# license exception
	install -Dm644 COPYING.EXCEPTION "$pkgdir"/usr/share/licenses/autoconf/COPYING.EXCEPTION

	# remove unwanted file
	rm -f "$pkgdir"/usr/share/info/standards.info
}
