summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 23ec2a0fece417162666abcb030e332a4fc011d3 (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
42
43
44
45
46
47
48
49
50
# Maintainer: Eli Schwartz <eschwartz@archlinux.org>
# Contributor: Alexandre Filgueira <alexfilgueira@cinnarch.com>
# Contributor: Ionut Biru <ibiru@archlinux.org>

pkgname=cjs-git
pkgver=5.2.0.r2.g66962c83
pkgrel=1
pkgdesc="Javascript Bindings for Cinnamon"
arch=('i686' 'x86_64')
url="https://github.com/linuxmint/${pkgname%-git}"
license=('GPL')
depends=('dbus-glib' 'gtk3' 'gobject-introspection-runtime' 'js78')
makedepends=('git' 'meson' 'samurai' 'gobject-introspection')
checkdepends=('xorg-server-xvfb')
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
source=("git+${url}.git")
sha512sums=('SKIP')

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

    git describe --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
    mkdir -p "${srcdir}/${pkgname%-git}/builddir"
    cd "${srcdir}/${pkgname%-git}/builddir"

    meson --prefix=/usr \
          --libexecdir=/usr/lib \
          --buildtype=plain \
          -Dinstalled_tests=false \
          ..

    samu
}

check() {
    cd "${srcdir}/${pkgname%-git}/builddir"

    # Needs a display
    xvfb-run meson test --print-errorlogs
}

package() {
    cd "${srcdir}/${pkgname%-git}/builddir"

    DESTDIR="${pkgdir}" samu install
}