mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-08-31 19:31:10 +02:00
64 lines
1.7 KiB
Plaintext
64 lines
1.7 KiB
Plaintext
# Contributor: Valery Kartel <valery.kartel@gmail.com>
|
|
# Maintainer: Valery Kartel <valery.kartel@gmail.com>
|
|
pkgname=capstone
|
|
pkgver=3.0.4
|
|
pkgrel=3
|
|
pkgdesc="The Ultimate Disassembler"
|
|
url="http://www.capstone-engine.org"
|
|
arch="all"
|
|
license="BSD-3-Clause-Clear"
|
|
depends=""
|
|
depends_dev="$pkgname"
|
|
makedepends="cmake python2-dev python3-dev py-setuptools"
|
|
install=""
|
|
subpackages="$pkgname-dev py2-${pkgname}:_py2:noarch py3-${pkgname}:_py3:noarch"
|
|
source="$pkgname-$pkgver.tar.gz::https://github.com/aquynh/$pkgname/archive/$pkgver.tar.gz
|
|
$pkgname.pc"
|
|
builddir="$srcdir"/$pkgname-$pkgver
|
|
|
|
build() {
|
|
cd "$builddir"
|
|
cmake \
|
|
-DCMAKE_INSTALL_PREFIX=/usr \
|
|
-DCMAKE_INSTALL_LIBDIR=lib \
|
|
-DBUILD_SHARED_LIBS=True \
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
-DCMAKE_CXX_FLAGS="$CXXFLAGS" \
|
|
-DCMAKE_C_FLAGS="$CFLAGS" \
|
|
-DCAPSTONE_BUILD_STATIC=OFF
|
|
make
|
|
}
|
|
|
|
package() {
|
|
cd "$builddir"
|
|
make DESTDIR="$pkgdir" install
|
|
install -Dm644 "$srcdir"/$pkgname.pc \
|
|
"$pkgdir"/usr/lib/pkgconfig/$pkgname.pc
|
|
|
|
sed -i \
|
|
-e "s/#pkgname/$pkgname/" \
|
|
-e "s/#pkgdesc/$pkgdesc/" \
|
|
-e "s/#pkgver/$pkgver/" \
|
|
"$pkgdir"/usr/lib/pkgconfig/$pkgname.pc
|
|
}
|
|
|
|
_py2() {
|
|
_py python2
|
|
}
|
|
|
|
_py3() {
|
|
_py python3
|
|
}
|
|
|
|
_py() {
|
|
local python="$1"
|
|
pkgdesc="$pkgdesc (for $python)"
|
|
install_if="$pkgname=$pkgver-r$pkgrel $python"
|
|
|
|
cd "$builddir/bindings/python"
|
|
$python setup.py install --prefix=/usr --root="$subpkgdir"
|
|
}
|
|
|
|
sha512sums="a5c29e7c559b5391d6a4ec9a7f766699ea6d321aa2f1fc57fdcec893107fa3ef2f5f6323629971c1129f1ca087df4f3ad03d0a8234d2eae368c8ccfec04dbf4d capstone-3.0.4.tar.gz
|
|
87eacef80df36be18fe86f540a452b7e290c9dfc85d01c7926d263f2e5060f6d5fd6a6c68c350caf532f4926902a77fba24e59cb5e9b606be9706980ae4c8235 capstone.pc"
|