aboutsummaryrefslogtreecommitdiffstats
path: root/community/flatbuffers/APKBUILD
blob: a8dab07e902142103d001523ba17b70b3f8449bd (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: Natanael Copa <ncopa@alpinelinux.org>
pkgname=flatbuffers
pkgver=1.10.0
pkgrel=0
pkgdesc="Memory Efficient Serialization Library"
url="https://google.github.io/flatbuffers/"
arch="all !s390x"
license="Apache-2.0"
depends=""
depends_dev=""
makedepends="$depends_dev cmake"
install=""
subpackages="$pkgname-dev"
source="flatbuffers-$pkgver.tar.gz::https://github.com/google/flatbuffers/archive/v$pkgver.tar.gz
	flatbuffers-fix-nontrivial-memset.patch"
builddir="$srcdir/flatbuffers-$pkgver"

build() {
	mkdir -p "$builddir"/build
	cd "$builddir"/build
	cmake .. \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DFLATBUFFERS_BUILD_SHAREDLIB=on \
		-DCMAKE_INSTALL_LIBDIR=lib
	make
}

check() {
	cd "$builddir"/build
	make test
}

package() {
	cd "$builddir"/build
	make install DESTDIR="$pkgdir"
	install -Dm755 "$builddir"/build/flatc \
		"$pkgdir"/usr/bin/flatc
}

sha512sums="b8382c8e9a45d6aca83270e93704b9ef2938e4ef9bb5165edbd8f286329e86353037ad6e54a99fd3d70b0c893d06cfd8766e00f05497e69be4b9e6c0506133d2  flatbuffers-1.10.0.tar.gz
c3882cb7934cf133aca66607c43778dd29564764a6400e4aa4ae4b76745587de03417576bb812ecbb70297d2895d1e0b537eda60e3bf981ba2d10f912d6952c1  flatbuffers-fix-nontrivial-memset.patch"