blob: bacd6aeacdaa4d205884708abb7c43eafbffe598 (
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
54
55
56
57
|
pkgname=capstone-git
pkgver=20250706.5292.56db8c2b6
pkgrel=1
pkgdesc="A lightweight multi-platform, multi-architecture disassembly framework."
arch=('i686' 'x86_64')
url="http://www.capstone-engine.org/"
license=('BSD')
makedepends=('git')
# if you want the bindings uncomment the appropriae line below, and
# comment out the line above
#makedepends=('git' 'python')
optdepends=('python: for python3 bindings')
provides=('capstone')
conflicts=('capstone')
source=("${pkgname}::git+https://github.com/capstone-engine/capstone.git#branch=next")
md5sums=('SKIP')
pkgver () {
cd "${srcdir}/${pkgname}"
_date=`date +"%Y%m%d"`
echo "$_date.$(git rev-list --count makepkg).$(git rev-parse --short makepkg)"
#git log -1 --date=short --format="%cd.%h" | tr -d -
}
build() {
cd ${srcdir}/${pkgname}
cmake -B build -DCMAKE_BUILD_TYPE=Release -DCAPSTONE_BUILD_CSTEST=ON -DCAPSTONE_BUILD_SHARED_LIBS=ON
cmake --build build
# uncomment as approriate
#cd bindings/python
#python setup.py build -b ./build/py3
}
check() {
cd ${srcdir}/${pkgname}
build/suite/cstest/cstest tests
# uncomment as needed
#cd bindings/python
#local python_version=$(python -c 'import sys; print("".join(map(str, sys.version_info[:2])))')
#PYTHONPATH="$PWD/build/py3/lib.linux-$CARCH-cpython-$python_version" python tests/test_all.py
}
package() {
cd ${srcdir}/${pkgname}
#make DESTDIR="${pkgdir}" install
cmake --install build --prefix ${pkgdir}
install -d -m755 ${pkgdir}/usr/share/licenses/capstone-git
install LICENSES/LICENSE.TXT ${pkgdir}/usr/share/licenses/capstone-git/LICENSE.TXT
# uncomment as needed
#cd ${srcdir}/${pkgname}/bindings/python
#python setup.py install --root ${pkgdir}
}
# vim:set ts=2 sw=2 et:
|