# Maintainer: The Project-Tick Authors
# SPDX-License-Identifier: GPL-2.0-only

pkgname=ppm
pkgver=0.1.0
pkgrel=1
pkgdesc="Project-Tick Package Manager — content-addressed, transactional, git-backed"
arch=('x86_64' 'aarch64')
url="https://git.projecttick.org/project-tick"
license=('GPL-2.0-only')
depends=('curl' 'libarchive' 'libsodium' 'libgit2')
makedepends=('autoconf' 'automake' 'libtool' 'pkgconf' 'scdoc')
source=("$pkgname-$pkgver.tar.xz::https://git.projecttick.org/project-tick/-/archive/v$pkgver/ppm-v$pkgver.tar.xz")
sha512sums=('SKIP')

build() {
    cd "$pkgname-$pkgver"
    ./bootstrap.sh
    ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
    make
}

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

package() {
    cd "$pkgname-$pkgver"
    make DESTDIR="$pkgdir" install
    install -Dm644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING"
}
