summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 813f9bcc146ca8df1de17692db4747ea4c47a99d (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: Andrew Sun <adsun701@gmail.com>
# Contributor: Andy Weidenbaum <archbaum@gmail.com>

pkgname=flatcc
pkgver=0.5.3
pkgrel=1
pkgdesc="FlatBuffers Compiler and Library in C for C"
arch=('i686' 'x86_64')
makedepends=('cmake')
url="https://github.com/dvidelabs/flatcc"
license=('Apache')
options=('staticlibs')
source=("${pkgname}-${pkgver}.tar.gz"::"https://github.com/dvidelabs/flatcc/archive/v${pkgver}.tar.gz")
sha256sums=('d7519a97569ebdc9d12b162be0f9861fdc2724244f68595264a411ac48e4e983')

build() {
  cd "${srcdir}/${pkgname}-${pkgver}"

  mkdir -p build && cd build

  cmake \
    -DBUILD_SHARED_LIBS=on \
    -DFLATCC_ALLOW_WERROR=off \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DFLATCC_INSTALL=on \
    ..

  make
}

package() {
  cd "${srcdir}/${pkgname}-${pkgver}"

  install -Dm644 LICENSE NOTICE -t "${pkgdir}/usr/share/licenses/${pkgname}"

  install -Dm644 *.md doc/* -t "${pkgdir}/usr/share/doc/${pkgname}"

  cd build
  make DESTDIR="${pkgdir}" install
}