aboutsummaryrefslogblamecommitdiffstats
path: root/testing/keystone/APKBUILD
blob: b8f89b2f9ba2e4242ad2bfd77e366c95a4f6ab00 (plain) (tree)
1
2
3
4
5
6
7
8
9


                                                           
            
        
                                                                                                                  
                                      

                


                                                                                                    

         
                                                

                                             
                                            


                                         
             



                                      


           
                                                      
 

                                                               




                                           
                              

 
                                                                                                                                                                    
# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=keystone
pkgver=0.9.2
pkgrel=1
pkgdesc="Keystone assembler framework: Core (Arm, Arm64, Hexagon, Mips, PowerPC, Sparc, SystemZ & X86) + bindings"
url="https://www.keystone-engine.org/"
arch="all"
license="custom"
makedepends="cmake python3-dev py3-setuptools"
subpackages="$pkgname-dev $pkgname-python"
source="$pkgname-$pkgver.tar.gz::https://github.com/keystone-engine/keystone/archive/$pkgver.tar.gz"

build() {
	mkdir -p build-shared && cd build-shared
	cmake \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DCMAKE_BUILD_TYPE=None \
		-DBUILD_SHARED_LIBS=ON \
		-G "Unix Makefiles" ..
	cd ..
	make -C build-shared

	cd "$builddir"/bindings/python
	python3 setup.py build
}

package() {
	make -C build-shared DESTDIR="$pkgdir" install

	cd "$builddir"/bindings/python
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

python() {
	pkgdesc="$pkgname python3 bindings"
	depends="python3 keystone"
	amove usr/lib/python3*
}

sha512sums="5d4dd30410410bc7848e75a2e31e8ecef6241ad25e21963aa7a07bbea21d95b75e235c80573129014102684c9647710ace3c0776a8401844d7e4b45cab7bd04b  keystone-0.9.2.tar.gz"