void-packages/srcpkgs/tlsh/template

55 lines
1.2 KiB
Bash

# Template file for 'tlsh'
pkgname=tlsh
version=3.19.1
revision=6
build_style=cmake
build_helper=python3
hostmakedepends="python3-setuptools"
makedepends="python3-devel"
short_desc="Fuzzy matching library"
maintainer="Piotr Wójcik <chocimier@tlen.pl>"
license="Apache-2.0, BSD-3-Clause"
homepage="https://github.com/trendmicro/tlsh"
distfiles="https://github.com/trendmicro/tlsh/archive/${version}.tar.gz"
checksum=a8a7972d8bafb5fd66bd597b72037356dd9882e71a7e9b5f37281751a99ce686
pre_configure() {
vsed -i src/CMakeLists.txt -e 's/set(TLSH_SHARED_LIBRARY 0)/set(TLSH_SHARED_LIBRARY 1)/'
vsed -i Testing/CMakeLists.txt -e '/xlen/d'
}
post_build() {
cd py_ext
python3 setup.py build ${make_build_args}
}
pre_check() {
ln -sr bin/tlsh_unittest bin/tlsh
}
post_install() {
vlicense LICENSE
cd py_ext
python3 setup.py install --prefix=/usr --root=${DESTDIR} ${make_install_args}
}
tlsh-devel_package() {
depends="${sourcepkg}>=${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove "usr/lib/*.a"
vmove "usr/lib/*.so"
}
}
python3-tlsh_package() {
depends="python3"
short_desc+=" - python module"
pkg_install() {
vlicense LICENSE
vmove "${py3_lib}"
}
}