summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 0ac1e00b924ee699fa2b4b3fbd585703c8a590a4 (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
# Maintainer: GrayJack <gr41.j4ck@gmail.com>

_pkgname=janet
_pkgver=1.0.0
pkgname=janet-lang-git
pkgver=1.0.0.r1147.f2313b9
pkgrel=1
pkgdesc="A dynamic Lisp dialect and bytecode vm"
arch=('armv6h' 'armv7h' 'i686' 'x86_64' 'aarch64')
url="https://janet-lang.org/"
license=('MIT')
depends=()
makedepends=('git' 'clang')
provides=('janet')
conflicts=('janet-lang')
source=("git+https://github.com/janet-lang/janet.git")
sha256sums=('SKIP')

pkgver() {
    cd "${srcdir}/${_pkgname}"

    # Get the version number.
    printf "${_pkgver}.r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
    cd "${srcdir}/${_pkgname}"
    make PREFIX="/usr" CC=clang -j7
}

package() {
    cd "${srcdir}/${_pkgname}"
    make PREFIX="${pkgdir}/usr" install
    make PREFIX="${pkgdir}/usr" docs
    mkdir -p ${pkgdir}/usr/share/janet
    cp -a examples ${pkgdir}/usr/share/janet
    cp -a build/doc.html ${pkgdir}/usr/share/janet
}