# $Id: PKGBUILD 133218 2015-05-10 20:34:19Z spupykin $
# Maintainer: Giovanni Scafora <giovanni@archlinux.org>

pkgname=unshield
pkgver=1.1
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=('209d1b380bf54b25d9b1ee9b343d3090')

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
}

