void-packages/srcpkgs/tlsh/template

55 lines
1.2 KiB
Bash

# Template file for 'tlsh'
pkgname=tlsh
version=4.8.2
revision=1
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=0528294fbb1fe3659db564dd0b7b1b27fc41280a8408e4f7abf7e8b27f7b1ac6
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}"
}
}