summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 552f261966f2903d4acedae3b49ec105c54e650c (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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# Maintainer: Daniel Bershatsky <bepshatsky@yandex.ru>

pkgname=3fs
pkgver=0.1.5.r37.g49e0ad5
pkgrel=1
pkgdesc='Fire-Flyer File System (3FS).'
arch=('x86_64')
url='https://github.com/deepseek-ai/3fs'
license=('MIT')
groups=('deepseek')
depends=('foundationdb-server-bin' 'fuse3')
makedepends=('clang' 'cmake' 'git' 'ninja' 'rust')
optdepends=()
source=("$pkgname::git+$url.git"
        'git+https://github.com/google/googletest.git'
        'git+https://github.com/facebook/folly.git'
        'git+https://github.com/google/leveldb.git'
        'git+https://github.com/facebook/rocksdb.git'
        'git+https://github.com/eliaskosunen/scnlib.git'
        'git+https://github.com/pybind/pybind11.git'
        'git+https://github.com/ClickHouse/clickhouse-cpp.git'
        'git+https://github.com/fmtlib/fmt.git'
        'git+https://github.com/ToruNiina/toml11.git'
        'git+https://github.com/jemalloc/jemalloc.git'
        'git+https://github.com/microsoft/mimalloc.git'
        'git+https://github.com/facebook/zstd.git'
        'git+https://github.com/axboe/liburing.git'
        'git+https://github.com/google/gtest-parallel.git')
sha256sums=('SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP')

pkgver() {
  cd "$pkgname"
  git tag -f 0.1.5 815e55e
  git describe --long --tags --abbrev=7 | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

prepare() {
  cd "$pkgname"
  sed -i '/set(CLANG_FORMAT/d' cmake/CLangFormat.cmake

  git submodule init
  for repo in ${repos[@]}; do
    git config "submodule.third_party/${repo}.url" "$srcdir/third_party/${repo}"
  done
  git -c protocol.file.allow=always submodule update
}

build() {
  cd "$pkgname"
  cmake -S . -B build -G Ninja \
      -DCMAKE_BUILD_TYPE=RelWithDebInfo \
      -DCMAKE_CXX_COMPILER=clang++ \
      -DCMAKE_C_COMPILER=clang \
      -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
      -DCLANG_FORMAT=clang-format
  cmake --build build
}

package() {
  cd "$pkgname"
  install -Dm 644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
  cmake --install build --prefix "$pkgdir"
}