summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: a7da18eb4432bd336d1ae1e466572716e340035f (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
# Maintainer: Frederick Gnodtke <fgnodtke at cronosx dot de>

pkgname=jolly
pkgver=0.1.0
pkgrel=1
pkgdesc="Static image gallery generator."
arch=('any')
url="https://gitlab.com/prior99/jolly"
license=('GPL3')
depends=(
    'nodejs'
    'zsh')
makedepends=('yarn')
provides=('jolly')
source=("https://gitlab.com/prior99/${pkgname}/-/archive/${pkgver}/${pkgname}-${pkgver}.tar.gz")
options=('!strip')
sha256sums=('42b874530de376facb5138fc7a5ae2d8f5d7aae8192e57abbc1ce3708fe2a516')

_jsdir=${pkgname}-${pkgver}

build() {
    cd $srcdir/$_jsdir
    yarn install
    yarn build
    rm -rf node_modules
    yarn install --production
    cd ..
    echo -e '#!/bin/sh\nexec node /usr/share/jolly "$@"' > jolly
    chmod +x jolly
}

package() {
  mkdir -p $pkgdir/usr/share/jolly
  cp -r $srcdir/$_jsdir/dist/* $pkgdir/usr/share/jolly/
  cp -r $srcdir/$_jsdir/node_modules $pkgdir/usr/share/jolly/
  install -Dm755 $srcdir/jolly $pkgdir/usr/bin/jolly
}