summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 072bd0d2c41693fcef31aed6dec120a6d4a4338c (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
# Maintainer: theguy147 <yakamoz147 (at) protonmail (dot) com>
pkgname=hal-git
pkgver=v3.3.0.r14.gccab704606
pkgrel=1
pkgdesc='The Hardware Analyzer for Hardware Reversing from emsec. (git version)'
arch=('x86_64')
url='https://github.com/emsec/hal'
license=('MIT')
depends=('lcov' 'gcovr' 'doxygen' 'boost' 'qt5-svg' 'libsodium' 'igraph' 'ninja' 'rapidjson' 'spdlog' 'python-sphinx' 'python-sphinx_rtd_theme' 'python-jedi' 'python-pip' 'python-dateutil' 'pybind11')
optdepends=('graphviz: for documentation')
makedepends=('git' 'cmake' 'ccache' 'z3')
source=("$pkgname::git+https://github.com/emsec/hal.git")
md5sums=('SKIP')

prepare() {
	cd "$pkgname"
	sed -i 's:enable_cxx_compiler_flag_if_supported("-fcolor-diagnostics" "")::g' ./CMakeLists.txt
}

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

build() {
	cd "$pkgname"

        mkdir -p build && cd build
        cmake -DCMAKE_INSTALL_PREFIX=/usr ..
        make
}

package() {
        cd "$pkgname/build"
        # install hal
        make DESTDIR="$pkgdir" install

        cd ..
        # install license
        install -Dm644 LICENSE "$pkgdir/usr/share/licenses/hal/LICENSE"
}