blob: 8665d092687b01a82f8cbbc56b5307dcffdd130a (
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
|
# Maintainer: Pekka Ristola <pekkarr [at] protonmail [dot] com>
# Contributor: Morteza NourelahiAlamdari <m@0t1.me>
pkgname=google-crc32c
pkgver=1.1.2
pkgrel=4
pkgdesc="CRC32C implementation with support for CPU-specific acceleration instructions"
arch=(x86_64)
url="https://github.com/google/crc32c"
license=(BSD)
depends=(
gcc-libs
)
makedepends=(
cmake
)
source=("$pkgname-$pkgver.tar.gz::$url/archive/$pkgver.tar.gz")
sha256sums=('ac07840513072b7fcebda6e821068aa04889018f24e10e46181068fb214d7e56')
prepare() {
# fix version
sed -i "s/Crc32c VERSION 1.1.0 /Crc32c VERSION $pkgver /" "crc32c-$pkgver/CMakeLists.txt"
}
build() {
cmake -B build -S "crc32c-$pkgver" \
-DCMAKE_BUILD_TYPE=None \
-DCMAKE_INSTALL_PREFIX=/usr \
-DBUILD_SHARED_LIBS=yes \
-DCRC32C_BUILD_TESTS=OFF \
-DCRC32C_BUILD_BENCHMARKS=OFF \
-DCRC32C_USE_GLOG=OFF \
-DCRC32C_INSTALL=ON \
-Wno-dev
cmake --build build
}
package() {
DESTDIR="$pkgdir" cmake --install build
install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname" "crc32c-$pkgver/LICENSE"
}
|