blob: 1e636dc04f5c13b0ace1b6e2921631402820a5dc (
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
|
# Maintainer: Luis Martinez <luis dot martinez at disroot dot org>
# Contributor: Andy Weidenbaum <archbaum@gmail.com>
pkgname=flatcc-git
pkgver=0.6.0.r195.g07ae7dc
pkgrel=1
epoch=1
pkgdesc="FlatBuffers Compiler and Library in C for C"
arch=('x86_64')
url="https://github.com/dvidelabs/flatcc"
license=('Apache')
depends=('glibc')
makedepends=('cmake' 'git')
provides=('flatcc' 'libflatcc.so' 'libflatccrt.so')
conflicts=('flatcc')
source=("$pkgname::git+$url")
sha256sums=('SKIP')
pkgver() {
git -C "$pkgname" describe --long --tags | sed 's/^v//;s/-/.r/;s/-/./'
}
prepare() {
cd "$pkgname"
mkdir -p build
}
build() {
cmake \
-S "$pkgname" \
-B build \
-DBUILD_SHARED_LIBS=on \
-DFLATCC_ALLOW_WERROR=off \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DFLATCC_INSTALL=on
make -C build
}
package() {
cd "$pkgname"
install -Dm644 LICENSE NOTICE -t "$pkgdir/usr/share/licenses/$pkgname"
install -Dm644 *.md doc/* -t "$pkgdir/usr/share/doc/$pkgname"
make DESTDIR="$pkgdir" install -C "$srcdir/build/"
}
|