blob: a78b0839b782c555fa3d538c7a30d9f359d5fd68 (
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
|
# Maintainer: KokaKiwi <kokakiwi+aur@kokakiwi.net>
pkgname=dwarfs
pkgver=0.15.7
pkgrel=1
pkgdesc="A fast high compression read-only file system"
url='https://github.com/mhx/dwarfs'
arch=('x86_64' 'aarch64')
license=('GPL-3.0-only')
depends=(
'fuse3' 'openssl' 'boost-libs' 'jemalloc' 'xxhash' 'fmt'
'lz4' 'xz' 'zstd' 'brotli' 'libarchive' 'flac'
)
makedepends=(
'cmake'
'boost' 'libdwarf' 'chrono-date'
'utf8cpp' 'range-v3' 'nlohmann-json'
'gtest' 'parallel-hashmap'
)
source=("$pkgname-$pkgver.tar.xz::https://github.com/mhx/dwarfs/releases/download/v$pkgver/dwarfs-$pkgver.tar.xz")
sha256sums=('363c7fdbf7bad490a6b8d63186da8643c1aeb17ca54cce1193d7b0ebc57bc6bd')
b2sums=('25c37b19739ca2cf2a576a5d08f45b919738673af2314e45a0fc2dccdc48b93583893855ac5d78f7535978c335fe2c2db53930aa0a9608eb96f125fc4fb5d30e')
build() {
# Setting up release flags manually here so we get to use `CMAKE_BUILD_TYPE=None`
# and keep makepkg-defined flags for build
# cf. https://wiki.archlinux.org/title/CMake_package_guidelines#Fixing_the_automatic_optimization_flag_override
export CFLAGS="$CFLAGS -DNDEBUG"
export CXXFLAGS="$CXXFLAGS -DNDEBUG"
# Disable ccache here since makepkg already handly this
cmake -B build -S "$pkgname-$pkgver" \
-W no-dev \
-D CMAKE_INSTALL_PREFIX=/usr \
-D CMAKE_INSTALL_SBINDIR=bin \
-D CMAKE_BUILD_TYPE=None \
-D WITH_TESTS=ON \
-D PREFER_SYSTEM_GTEST=ON \
-D DISABLE_CCACHE=ON \
-D DISABLE_MOLD=ON
cmake --build build
}
check() {
# Sparse file tests fail in build environments where the filesystem does not
# support holes (e.g. tmpfs), so exclude them.
ctest --test-dir build --exclude-regex 'sparse|os_access_generic\.symlink_info'
}
package() {
cmake --install build --prefix "$pkgdir/usr"
rm "$pkgdir/usr/bin/mount.dwarfs"
ln -s dwarfs "$pkgdir/usr/bin/mount.dwarfs"
install -Dm0644 "$pkgname-$pkgver/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
|