blob: ae2f8b92e3ae20f2cdca59c4c73c337a072a1da4 (
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
58
59
60
|
pkgname=capstone-git
pkgver=20190702.4335.626bd6ab
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' 'python2' 'python')
#makedepends=('git' 'python')
#makedepends=('git' 'python2')
optdepends=('python: for python3 bindings'
'python2: for python2 bindings')
provides=('capstone')
conflicts=('capstone')
source=("${pkgname}::git+https://github.com/aquynh/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}
make
# uncomment as approriate
#cd "./bindings/python"
#python2 setup.py build -b ./build/py2
#python setup.py build -b ./build/py3
}
check() {
cd "${srcdir}/${pkgname}"
LD_PRELOAD="./tests/libcapstone.so" make check
# uncomment as needed
#cd "./bindings/python"
#python test_basic.py
#python2 test_basic.py
}
package() {
cd ${srcdir}/${pkgname}
make DESTDIR="${pkgdir}" install
install -d -m755 ${pkgdir}/usr/share/licenses/capstone-git
install LICENSE.TXT ${pkgdir}/usr/share/licenses/capstone-git/LICENSE.TXT
# uncomment as needed
#cd ${srcdir}/${pkgname}/bindings/python
#python2 setup.py install --root ${pkgdir}
#python setup.py install --root ${pkgdir}
}
# vim:set ts=2 sw=2 et:
|