1 # Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
4 pkgname=('tlsh' 'python-tlsh')
7 pkgdesc='Fuzzy matching library that generates a hash value which can be used for similarity comparisons'
8 url='https://github.com/trendmicro/tlsh'
11 makedepends=('cmake' 'python' 'gcc-libs')
12 source=(https://github.com/trendmicro/${pkgbase}/archive/${pkgver}/${pkgbase}-${pkgver}.tar.gz)
13 sha256sums=('0528294fbb1fe3659db564dd0b7b1b27fc41280a8408e4f7abf7e8b27f7b1ac6')
14 sha512sums=('5355c7734f5356a3a7a31ccc078254835871fc0369f1889a34131a0f810735201c68f674eb18e975b6a03a32e5c284899ca9ffdc1f583e42192188c172d2aad0')
17 cd ${pkgbase}-${pkgver}
19 sed '/set(CMAKE_EXE_LINKER_FLAGS/d' -i CMakeLists.txt
20 sed '/set(CMAKE_CXX_FLAGS/d' -i CMakeLists.txt
21 sed 's|TLSH_SHARED_LIBRARY 0|TLSH_SHARED_LIBRARY 1|' -i src/CMakeLists.txt
25 cd ${pkgbase}-${pkgver}
29 -DCMAKE_BUILD_TYPE=None \
30 -DCMAKE_INSTALL_PREFIX:PATH=/usr \
31 -DCMAKE_CXX_FLAGS="${CXXFLAGS} ${CPPFLAGS}"
35 cmake -E create_symlink tlsh_unittest tlsh
43 cd ${pkgbase}-${pkgver}
54 provides=('libtlsh.so')
55 cd ${pkgbase}-${pkgver}
56 make -C build DESTDIR="${pkgdir}" install
57 install -Dm 755 bin/tlsh_unittest -t "${pkgdir}/usr/bin"
58 install -Dm 644 README.md -t "${pkgdir}/usr/share/doc/${pkgname}"
61 package_python-tlsh() {
63 cd ${pkgbase}-${pkgver}/py_ext
64 python setup.py install -O1 --root="${pkgdir}" --skip-build