# Maintainer: Jesus E. pkgname=lua-lgi pkgbasename=lgi pkgver=0.9.2 _debver=$pkgver _debrel=2 pkgrel=2 pkgdesc="Lua bindings for gobject using gobject-introspection library" url='https://github.com/pavouk/lgi' arch=('i686' 'x86_64') license=('Expat') depends=('glibc' 'glib2' 'libffi' 'lua' 'gobject-introspection-runtime') makedepends=('gobject-introspection' 'quilt') source=("${pkgbasename}-${pkgver}.tar.gz::https://github.com/pavouk/lgi/archive/${pkgver}.tar.gz" "https://deb.debian.org/debian/pool/main/l/lua-lgi/lua-lgi_${_debver}-${_debrel}.debian.tar.xz") sha512sums=('755a96b78530f42da6d4e2664f8e37cb07a356419e7e6448003c3f841c9d98ad18b851715d9eb203ea7eb27b13ec46223fa8a1c90a99fd12960ce85b0a695335' 'bbdd2828ad5ffe27002dc07c472710b9978f3c2df3619c75b219f970b6a6d1a3e0d497e0162c18dcae263a4fc664b5de16511133398ca0ada37b4180447cf4cd') prepare() { cd ${pkgbasename}-${pkgver} if [[ ${pkgver%.*} = ${_debver%.*} ]]; then # Debian patches export QUILT_PATCHES=debian/patches export QUILT_REFRESH_ARGS='-p ab --no-timestamps --no-index' export QUILT_DIFF_ARGS='--no-timestamps' mv "$srcdir"/debian . quilt push -av fi } build() { cd ${pkgbasename}-${pkgver} CFLAGS="$CFLAGS -I/usr/include/lua5.3" make } package() { cd ${pkgbasename}-${pkgver} make \ LUA_LIBDIR=/usr/lib/lua/5.3 \ LUA_SHAREDIR=/usr/share/lua/5.3 \ DESTDIR="${pkgdir}/" install install -Dm 755 tools/dump-typelib.lua "${pkgdir}/usr/bin/dump-typelib" 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}" }