Skip to content

Instantly share code, notes, and snippets.

@tonylambiris
Created May 11, 2019 23:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tonylambiris/eae8405bc638e59f5c87e46892e99b81 to your computer and use it in GitHub Desktop.
Save tonylambiris/eae8405bc638e59f5c87e46892e99b81 to your computer and use it in GitHub Desktop.
Updated PKGBUILD for lib32-capstone
# Maintainer: Tony Lambiris <tony@criticalstack.com>
pkgbase=capstone
pkgname=lib32-capstone
pkgver=4.0.1
pkgrel=1
pkgdesc='Lightweight multi-platform, multi-architecture disassembly framework (32-bit)'
url='https://www.capstone-engine.org/index.html'
arch=('x86_64')
license=('BSD')
options=('staticlibs')
source=(${pkgname}-${pkgver}.tar.gz::https://github.com/aquynh/capstone/archive/${pkgver}.tar.gz)
sha256sums=('79bbea8dbe466bd7d051e037db5961fdb34f67c9fac5c3471dd105cfb1e05dc7')
sha512sums=('43c52024065b41b45eff9423341db3f3d5163fa7aa01b360faa30437786740c8f2c34c36faa04dced5308e09d8bd78df3bad0ab9c06f98612169edb176f83c36')
build() {
cd ${pkgbase}-${pkgver}
CFLAGS=-m32 LDFLAGS=-m32 make
}
package() {
cd ${pkgbase}-${pkgver}
make DESTDIR="${pkgdir}" LIBDIR="${pkgdir}/usr/lib32" install
find ${pkgdir} -mindepth 2 -maxdepth 2 -type d -not -name lib32 -exec rm -rf "{}" \;
install -Dm 644 docs/README -t "${pkgdir}/usr/share/doc/${pkgname}"
install -Dm 644 LICENSE.TXT -t "${pkgdir}/usr/share/licenses/${pkgname}"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment