# Maintainer: Luke Shumaker <lukeshu@parabola.nu>
# Maintainer (aur): Stefan Majewsky <majewsky@gmx.net>

pkgname='art'
pkgver=2.1.0
pkgrel=1
pkgdesc='Arch Repository building Tool'
arch=('i686' 'x86_64' 'armv7h')
url='https://github.com/majewsky/art'
license=('GPL-3.0-or-later')
depends=('pacman') # for makepkg, repo-add, repo-remove (also satisfies dependencies on xz and gpg)
optdepends=(
    'holo-build: to build packages from *.pkg.toml files'
)
makedepends=('go' 'git')
source=("git+https://github.com/majewsky/${pkgname}.git#tag=v${pkgver}")
sha256sums=('631fce865c93166a534a964c5b5f423114c338e95e3e2cb3799a8018655c34cd')

prepare() {
    cd "${srcdir}/${pkgname}"
    sed -i 's/^GO_BUILDFLAGS\s*=.*/& -trimpath/' Makefile
}

build() {
    cd "${srcdir}/${pkgname}"
    make
}

package() {
    cd "${srcdir}/${pkgname}"
    make install DESTDIR="${pkgdir}"
}
