# $Id: PKGBUILD 107442 2014-03-17 11:03:03Z spupykin $
# Maintainer: Giovanni Scafora <giovanni@archlinux.org>

pkgname=unshield
pkgver=1.0
pkgrel=1
pkgdesc="Extracts CAB files from InstallShield installers"
arch=('i686' 'x86_64')
url="https://github.com/twogood/unshield"
license=('custom')
depends=('zlib')
source=("$pkgname-$pkgver.tar.gz::https://github.com/twogood/unshield/archive/$pkgver.tar.gz")
md5sums=('b2abb96a73422590d17ce4415c6df07d')

prepare() {
  cd ${srcdir}/${pkgname}-${pkgver}
  sed -i 's|-Werror||g' configure.ac.in
}

build() {
  cd ${srcdir}/${pkgname}-${pkgver}
  ./bootstrap
  ./configure --prefix=/usr
  make
}

package() {
  cd ${srcdir}/${pkgname}-${pkgver}
  make DESTDIR=${pkgdir} install
  install -D -m644 LICENSE ${pkgdir}/usr/share/licenses/unshield/LICENSE
}

