summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: c414feb17dbeb5a08bbe1e44f409305d5ef871e9 (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
38
39
40
41
42
43
# Maintainer: heliochronix <heliochronix@gmail.com>

pkgname=libfec-git
pkgver=1.0.r10.g9750ca0
pkgrel=1
pkgdesc="Phil Karn's FEC (Forward Error Correction) library"
arch=('x86_64' 'aarch64')
url="https://github.com/quiet/libfec"
license=('LGPL2.1')
makedepends=('git' 'cmake')
provides=('libfec')
conflicts=('libfec')
source=("git+$url.git")
sha256sums=('SKIP')

pkgver() {
  cd libfec

  git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
  mkdir -p libfec/build
  cd libfec/build

  cmake .. \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_BUILD_TYPE=Release

  make
}

check() {
  cd libfec/build

  make test_all
}

package() {
  cd libfec/build

  make DESTDIR="$pkgdir" install
}