summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: da7bd7fca5fc1270b61d42100e2956bf96760d23 (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
# Maintainer: Atom Long <atom.long@hotmail.com>

pkgname=quickjspp-git
pkgver=20210913
pkgrel=5
pkgdesc='QuickJS C++ wrapper'
url='https://github.com/ftk/quickjspp'
arch=('x86_64' 'i686' 'arm' 'armv6h' 'armv7h' 'aarch64')
license=('CC0')
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}"
           "quickjs")
source=("${pkgname%-git}::git+${url}.git")
sha256sums=('SKIP')
makedepends=('cmake' 'git')
options=(!strip)

pkgver() {
  cd ${pkgname%-git}
  git show -s --format="%ci" HEAD | sed -e 's/-//g' -e 's/ .*//'
}

build() {
  cd ${pkgname%-git}
  cmake -DCMAKE_BUILD_TYPE=Release .
  make quickjs
}

package() {
  cd ${pkgname%-git}
  install -Dm644 quickjs/libquickjs.a -t ${pkgdir}/usr/lib/
  install -Dm644 quickjs/quickjs.h quickjs/quickjs-libc.h -t ${pkgdir}/usr/include/quickjs/
  install -m644 quickjspp.hpp ${pkgdir}/usr/include/
}