summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 53d326eddb1ccb7bab8f316d9963a85d2d691284 (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
50
51
52
53
# Maintainer: Fabio 'Lolix' Loli <fabio.loli@disroot.org> -> https://github.com/FabioLolix

pkgname=pe-bear-git
pkgver=0.6.1.r4.g89ea8d4
pkgrel=2
pkgdesc="Portable Executable reversing tool with a friendly GUI"
arch=(x86_64 i686 arm armv6h armv7h aarch64)
url="https://hshrzd.wordpress.com/pe-bear/"
license=(GPL2)
depends=(qt5-base)
makedepends=(git cmake)
provides=(pe-bear)
conflicts=(pe-bear)
source=("git+https://github.com/hasherezade/pe-bear.git"
        "git+https://github.com/capstone-engine/capstone.git"
        "git+https://github.com/hasherezade/bearparser.git")
sha256sums=('SKIP'
            'SKIP'
            'SKIP')

pkgver() {
  cd pe-bear
  git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

prepare() {
  cd pe-bear
  git submodule init
  git config submodule.capstone.url "${srcdir}/capstone"
  git config submodule.bearparser.url "${srcdir}/bearparser"
  git -c protocol.file.allow=always submodule update

  [[ -d build ]] || mkdir build
}

build() {
  cd pe-bear/build
  cmake .. -Wno-dev \
    -DCMAKE_BUILD_TYPE=None

  make
}

package() {
  cd pe-bear
  #make DESTDIR="${pkgdir}" install
  install -D build/pe-bear/PE-bear -t "${pkgdir}/usr/lib/pe-bear/"
  install -D SIG.txt               -t "${pkgdir}/usr/lib/pe-bear/"
  install -d "${pkgdir}/usr/bin"
  ln -s /usr/lib/pe-bear/PE-bear "$pkgdir/usr/bin/pe-bear"

  install -D logo/main_ico.png "${pkgdir}/usr/share/pixmaps/pe-bear.png"
}