summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 29f7eb70861731a47ecc6ed7173dac399b4f81f1 (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
43
44
45
46
47
48
49
# vim:ts=2:sw=2:expandtab
# Maintainer: peelz <peelz.dev+arch@gmail.com>

_commit="3c4163e30896c9a22e996815d5e0f7876b3fc64f"
pkgname="readpe"
pkgver="0.84"
pkgrel="2"
pkgdesc="PE file analysis toolkit"
arch=("x86_64")
url="https://github.com/mentebinaria/readpe"
license=(
  "GPL-2.0-or-later"
  "OpenSSL"
)
conflicts=("pev")
depends=("openssl")
makedepends=("git")
source=(
  "readpe::git+https://github.com/mentebinaria/readpe.git#commit=${_commit}"
  "fix-install-prefix.diff"
)
sha256sums=(
  "SKIP"
  "SKIP"
)

prepare() {
  cd "${srcdir}/readpe"
  git apply < "${srcdir}/fix-install-prefix.diff"
}

build() {
  cd "${srcdir}/readpe"
  make all
}

package() {
  (
    cd "${srcdir}/readpe/src"
    make DESTDIR="${pkgdir}/" install
  )
  (
    cd "${srcdir}/readpe/lib/libpe"
    make DESTDIR="${pkgdir}/" install
  )
  install -Dm644 \
    -t "${pkgdir}/usr/share/licenses/${pkgname}/" \
    "${srcdir}/readpe/LICENSE.OpenSSL"
}