summaryrefslogtreecommitdiff
path: root/community/lgi/PKGBUILD
blob: a59c2817c4f72d67aa8d480f5286942571daf13a (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
51
52
# $Id: PKGBUILD 81847 2013-01-02 00:52:50Z seblu $
# Maintainer: speps <speps at aur dot archlinux dot org>
# Maintainer: Sébastien Luttringer <seblu@archlinux.org>

pkgbase=lgi
pkgname=(lua-lgi)
pkgver=0.6.2
pkgrel=1
pkgdesc='Lua bindings for gnome/gobject using gobject-introspection library'
arch=(i686 x86_64)
url='https://github.com/pavouk/lgi'
license=('custom:MIT')
depends=('glibc' 'glib2' 'libffi' 'lua' 'gobject-introspection')
replaces=('lgi')
conflicts=('lgi')
source=("https://github.com/downloads/pavouk/lgi/$pkgbase-$pkgver.tar.gz")
md5sums=('9ae2c0740e9ea536b6b6afacea5bd21b')

build() {
  cd $pkgbase-$pkgver
  make
}

package_lua-lgi() {
  cd $pkgbase-$pkgver
  make \
    LUA_LIBDIR=/usr/lib/lua/5.2 \
    LUA_SHAREDIR=/usr/share/lua/5.2 \
    DESTDIR="$pkgdir/" install

  # dump typelib tool
  install -Dm755 tools/dump-typelib.lua \
    "$pkgdir/usr/bin/dump-typelib"

  # docs
  install -d "$pkgdir/usr/share/doc/$pkgname"
  install -Dm644 docs/* \
    "$pkgdir/usr/share/doc/$pkgname"

  # samples
  install -d "$pkgdir/usr/share/$pkgname/samples/gtk-demo"
  install -Dm644 samples/*.lua \
    "$pkgdir/usr/share/$pkgname/samples"
  install -Dm644 samples/gtk-demo/* \
    "$pkgdir/usr/share/$pkgname/samples/gtk-demo"

  # license
  install -Dm644 LICENSE \
    "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

# vim:set ts=2 sw=2 et: