summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 8a5d734c12485277055666aa488ac776cf6c9a9b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# Maintainer: Chris Severance aur.severach aATt spamgourmet dott com
# Maintainer: Fabio 'Lolix' Loli <fabio.loli@disroot.org>
# Contributor: Jonathon Fernyhough <jonathon+m2x+dev>

pkgname=zsync2-git
pkgver=2.0.0.alpha.1.20230304.r5.g87fb5a0
pkgrel=1
pkgdesc="A rewrite of the advanced file download/sync tool zsync"
arch=(x86_64)
url="https://github.com/AppImageCommunity/zsync2"
license=(PerlArtistic)
depends=(glibc gcc-libs cpr curl libgcrypt)
makedepends=(git cmake args gtest)
provides=(zsync2)
conflicts=(zsync2)
source=("git+https://github.com/AppImageCommunity/zsync2.git")
b2sums=('SKIP')

pkgver() {
  cd zsync2
  git describe --long --tags --exclude continuous | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
  cmake -B build -S "zsync2" -Wno-dev \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DUSE_SYSTEM_CPR=ON \
    -DUSE_SYSTEM_ARGS=ON

  cmake --build build
}

package() {
  DESTDIR="${pkgdir}" cmake --install build
  install -D zsync2/COPYING -t "${pkgdir}/usr/share/licenses/${pkgname}"
}