summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: f0e9ea4c6d087ff37dfe2d559190791a8c26ff39 (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
# Maintainer: maz-1 < ohmygod19993@gmail.com >

_pkgname=unshield
pkgname=${_pkgname}-git
pkgver=r155.24bdf98
pkgrel=1
pkgdesc="Extracts CAB files from InstallShield installers"
arch=('i686' 'x86_64')
url="https://github.com/twogood/unshield"
license=('MIT')
depends=('zlib' 'openssl')
makedepends=('cmake' 'git')
provides=${_pkgname}
conflicts=${_pkgname}
source=("git+https://github.com/twogood/unshield")
md5sums=('SKIP')

pkgver() {
	cd "$srcdir/$_pkgname"
	echo "r$(git rev-list --count HEAD).$(git rev-parse --short HEAD)"
}

prepare() {
  cd ${srcdir}/${_pkgname}/src
  #temporary fix
  sed -i 's:if (!isprint(\*p))$:if (0 \&\& !isprint(\*p)):g' unshield.c
}

build() {
  cd ${srcdir}/${_pkgname}
  cmake \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_INSTALL_LIBDIR=lib \
    .
  make
}

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