# Maintainer: Eli Schwartz <eschwartz@archlinux.org>
# Contributor: Daniel Müllner <muellner@math.stanford.edu>

pkgname=autoconf-archive
pkgver=2021.02.19
pkgrel=2
epoch=1
pkgdesc="A collection of freely re-usable Autoconf macros"
arch=('any')
url="https://www.gnu.org/software/autoconf-archive/"
license=('GPL3')
depends=('autoconf')
optdepends=('automake: macros for use with it')
source=("https://ftpmirror.gnu.org/${pkgname}/${pkgname}-${pkgver}.tar.xz"{,.sig}
        "revert.patch::https://github.com/autoconf-archive/autoconf-archive/commit/59008cc7f85e1982eb298e1c424c2e6ad5942c4a.patch")
sha256sums=('e8a6eb9d28ddcba8ffef3fa211653239e9bf239aba6a01a6b7cfc7ceaec69cbd'
            'SKIP'
            'c5d650b8d19d01f223f0fe24185a7711ca06f0466645a4c6880859bc18e32215')
validpgpkeys=('1A4F63A13A4649B632F65EE141BC28FE99089D72') # Peter Simons <simons@cryp.to>

prepare() {
    cd "${pkgname}-${pkgver}"
    patch -Np1 < "$srcdir/revert.patch" 
}

build() {
    cd ${pkgname}-${pkgver}

    ./configure --prefix=/usr
    make
}

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

    make check
}

package() {
    cd ${pkgname}-${pkgver}

    make DESTDIR="${pkgdir}" install
}
