summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: f972d6e5cca885a729eac904d893c6ecae64f623 (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: loathingkernel <loathingkernel @at gmail .dot com>
# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
# Contributor: scadu <scadu at yandex dot com>
# Contributor: speps <speps at aur dot archlinux dot org>
# Contributor: S├ębastien Luttringer
# Contributor: Alain Kalker <a dot c dot kalker at gmail dot com>

pkgname=('luajit-lgi')
pkgver=0.9.2
pkgrel=3
pkgdesc='LuaJIT bindings for gnome/gobject using gobject-introspection library'
url='https://github.com/pavouk/lgi'
arch=('x86_64')
license=('MIT')
depends=('glibc' 'glib2' 'libffi' 'luajit' 'gobject-introspection-runtime')
makedepends=('gobject-introspection')
#replaces=('lgi')
#conflicts=('lgi')
source=(lgi-${pkgver}.tar.gz::https://github.com/pavouk/lgi/archive/${pkgver}.tar.gz)
sha512sums=('755a96b78530f42da6d4e2664f8e37cb07a356419e7e6448003c3f841c9d98ad18b851715d9eb203ea7eb27b13ec46223fa8a1c90a99fd12960ce85b0a695335')

build() {
  cd lgi-${pkgver}
  make LUA_INCDIR=/usr/include/luajit-2.0/ \
       LUA_CFLAGS="$(pkg-config --cflags luajit) -O2"
}

check() {
  cd lgi-${pkgver}
  # TODO: fix cairo-gobject dependency
  # make check
}

package_luajit-lgi() {
  cd lgi-${pkgver}
  make \
    LUA_LIBDIR=/usr/lib/lua/5.1 \
    LUA_SHAREDIR=/usr/share/lua/5.1 \
    DESTDIR="${pkgdir}/" install

  install -Dm 755 tools/dump-typelib.lua "${pkgdir}/usr/bin/dump-typelib-luajit"

  install -Dm 644 README.md -t "${pkgdir}/usr/share/doc/${pkgname}"
  install -Dm 644 docs/* -t "${pkgdir}/usr/share/doc/${pkgname}"
  install -Dm 644 samples/*.lua -t "${pkgdir}/usr/share/${pkgname}/samples"
  install -Dm 644 samples/gtk-demo/* -t "${pkgdir}/usr/share/${pkgname}/samples/gtk-demo"
  install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
}

# vim: ts=2 sw=2 et: