summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 26cec3ce8c3952439944e80e4cf7102c5ab4873e (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
44
45
46
# Maintainer: Chocobo1 <chocobo1 AT archlinux DOT net>

pkgname=blosc2-git
pkgver=2.0.0.beta.5.r201.gf4a74cb
pkgrel=1
pkgdesc="Next generation c-blosc"
arch=('i686' 'x86_64')
url="https://blosc-doc.readthedocs.io/en/latest/"
license=('BSD')
depends=('glibc' 'lz4' 'snappy' 'zlib' 'zstd')
makedepends=('git' 'cmake')
provides=('blosc2')
conflicts=('blosc2')
options=('staticlibs')
source=("git+https://github.com/Blosc/c-blosc2.git")
sha256sums=('SKIP')


pkgver() {
  cd "c-blosc2"

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

build() {
  cd "c-blosc2"

  cmake \
    -B "_build" \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_INSTALL_PREFIX="/usr" \
    -DCMAKE_INSTALL_LIBDIR="lib" \
    -DPREFER_EXTERNAL_LZ4="ON" \
    -DPREFER_EXTERNAL_SNAPPY="ON" \
    -DPREFER_EXTERNAL_ZLIB="ON" \
    -DPREFER_EXTERNAL_ZSTD="ON" \
    ./
  make -C "_build"
}

package() {
  cd "c-blosc2"

  make -C "_build" DESTDIR="$pkgdir" install
  install -Dm644 "LICENSE.txt" -t "$pkgdir/usr/share/licenses/blosc2"
}