# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Max Meyer <dev@fedux.org>

pkgname=pacparser
pkgver=1.4.3
pkgrel=1
pkgdesc="Library to parse proxy auto-config (PAC) files"
arch=(x86_64 aarch64)
url="https://github.com/pacparser/pacparser"
license=('LGPL-3.0-or-later')
source=("https://github.com/pacparser/pacparser/archive/v$pkgver/$pkgname-$pkgver.tar.gz"
        "fix-va_list.patch")
sha512sums=('cc0d6c0a7b1fd9d55dece6c4ad80711d3d1055a0cde120dbb6e8274508631b325e7d876545b40ca05cefc6dce15aa1476e5b2936527e3183ad86114e4cd661a5'
            '80b002dcc309acb4cd533907d681480525056939b4136a205fef13f2ccffe06b032e025b847225a5d0106d875e1a1f36b5328ae79329177e8d52bc6f8ca98b99')

prepare() {
  cd $pkgname-$pkgver
  [[ $CARCH = x86_64 ]] && patch -p1 -i ../fix-va_list.patch || :
}

build() {
  cd $pkgname-$pkgver
  make all -C src
}

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

# vim:set ts=2 sw=2 et:
