initial import
This commit is contained in:
53
capstone/PKGBUILD
Normal file
53
capstone/PKGBUILD
Normal file
@@ -0,0 +1,53 @@
|
||||
# Maintainer: Jesus E. <heckyel@riseup.net>
|
||||
|
||||
pkgbase=capstone
|
||||
pkgname=('capstone' 'python-capstone')
|
||||
pkgver=5.0.1
|
||||
_debver=$pkgver
|
||||
_debrel=1
|
||||
pkgrel=1
|
||||
pkgdesc="Lightweight multi-platform, multi-architecture disassembly framework"
|
||||
url='https://www.capstone-engine.org/index.html'
|
||||
arch=('i686' 'x86_64')
|
||||
license=('Modified-BSD')
|
||||
makedepends=('glibc' 'python' 'python-setuptools' 'quilt')
|
||||
options=('staticlibs')
|
||||
source=("https://github.com/aquynh/capstone/archive/${pkgver}/${pkgname}-${pkgver}.tar.gz"
|
||||
"https://deb.debian.org/debian/pool/main/c/capstone/capstone_${_debver}-${_debrel}~exp1.debian.tar.xz")
|
||||
sha512sums=('350aba77ce2d96b5c25764913591ba80e4497177ae0a8b2c820c6755ee8310848fbfc54e7ccac27fafc2dbc6778118ad92c53d1b5cb601d4fa146dec7d7e11e5'
|
||||
'da7af494882d5da4388fbc9153b514419528c8130f7f31f61f8214d711fd37a7d128be8b7a7fa131d9671fcd53d8977b214e8c4a398a527787addec2064430ca')
|
||||
|
||||
prepare() {
|
||||
cd ${pkgbase}-${pkgver}
|
||||
if [[ ${pkgver%.*} = ${_debver%.*} ]]; then
|
||||
# Debian patches
|
||||
export QUILT_PATCHES=debian/patches
|
||||
export QUILT_REFRESH_ARGS='-p ab --no-timestamps --no-index'
|
||||
export QUILT_DIFF_ARGS='--no-timestamps'
|
||||
|
||||
mv "$srcdir"/debian .
|
||||
|
||||
quilt push -av
|
||||
fi
|
||||
}
|
||||
|
||||
build() {
|
||||
cd ${pkgbase}-${pkgver}
|
||||
CFLAGS+=" ${CPPFLAGS} -ffat-lto-objects"
|
||||
make V=1
|
||||
}
|
||||
|
||||
package_capstone() {
|
||||
depends=('glibc')
|
||||
cd ${pkgbase}-${pkgver}
|
||||
make DESTDIR="${pkgdir}" install
|
||||
install -Dm 644 docs/README -t "${pkgdir}/usr/share/doc/${pkgname}"
|
||||
install -Dm 644 LICENSE.TXT -t "${pkgdir}/usr/share/licenses/${pkgname}"
|
||||
}
|
||||
|
||||
package_python-capstone() {
|
||||
depends=('capstone' 'python')
|
||||
cd ${pkgbase}-${pkgver}/bindings/python
|
||||
python setup.py install -O1 --root="${pkgdir}" --prefix=/usr
|
||||
install -Dm 644 ../../LICENSE.TXT -t "${pkgdir}/usr/share/licenses/${pkgname}"
|
||||
}
|
||||
Reference in New Issue
Block a user