summaryrefslogtreecommitdiff
path: root/libre/rapydscript-ng/PKGBUILD
blob: defe780cc5c6459c19f50fff6f0faff978542937 (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
# Maintainer (Arch): Eli Schwartz <eschwartz@archlinux.org>
# Maintainer:  <heckyel@parabola.nu>

pkgname=rapydscript-ng
pkgver=0.7.17
pkgrel=1.parabola1
pkgdesc="Pythonic JavaScript that doesn't suck"
arch=('any')
url="https://github.com/kovidgoyal/rapydscript-ng"
license=('BSD2')
depends=('nodejs')
makedepends=('npm')
provides=("${pkgname}")
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/kovidgoyal/${pkgname}/archive/v${pkgver}.tar.gz")
sha512sums=('a94061a48398b537eeaf4b6649344d3178cf76709e7f5ec76302846cc13a08de96cc350ca4d72502177aa6050c6b7e84eed86d3c07ed12cd0b1898d008ad2fe9')

build() {
    cd "${srcdir}/${pkgname}-${pkgver}"
    npm install --no-optional
    bin/rapydscript self --complete
    rm -rf release/ && mv dev/ release/
}

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

    mkdir -p "${pkgdir}"/usr/{bin,lib/node_modules/rapydscript-ng/}
    cp -r * "${pkgdir}"/usr/lib/node_modules/rapydscript-ng/

    ln -s ../lib/node_modules/rapydscript-ng/bin/rapydscript "${pkgdir}"/usr/bin/rapydscript

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