# Maintainer (arch): Dwayne Bent <dbb.1@liqd.org>

# parabola changes and rationale:
#  - upstream pkgbuild is gone, but we keep maintaining this.

pkgname=lua-cyrussasl
pkgver=1.1.0
pkgrel=1
pkgdesc="Lua bindings for Cyrus SASL library."
arch=('i686' 'x86_64' 'armv7h')
url="http://github.com/JorjBauer/lua-cyrussasl"
license=('BSD')
makedepends=('lua' 'libsasl')
source=("$pkgname-$pkgver.tar.gz::https://github.com/JorjBauer/$pkgname/archive/v$pkgver.tar.gz"
        "$pkgname.patch")
md5sums=('4466154ebdd18cf6f35951a46f53be78'
         '60387c1abeb59133712dd16be87d402d')

build() {
  cd $srcdir/$pkgname-$pkgver
  patch -Np1 -i ../$pkgname.patch
  make
}

package() {
  cd $srcdir/$pkgname-$pkgver

  mkdir -p "$pkgdir/usr/lib/lua/5.1"
  make DESTDIR=${pkgdir} install
  install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

