[arch-commits] Commit in tlsh/repos (2 files)

Evangelos Foutras foutrelis at archlinux.org
Mon Nov 9 16:46:51 UTC 2020


    Date: Monday, November 9, 2020 @ 16:46:51
  Author: foutrelis
Revision: 747521

archrelease: copy trunk to community-staging-x86_64

Added:
  tlsh/repos/community-staging-x86_64/
  tlsh/repos/community-staging-x86_64/PKGBUILD
    (from rev 747518, tlsh/trunk/PKGBUILD)

----------+
 PKGBUILD |   67 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 67 insertions(+)

Copied: tlsh/repos/community-staging-x86_64/PKGBUILD (from rev 747518, tlsh/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD	                        (rev 0)
+++ community-staging-x86_64/PKGBUILD	2020-11-09 16:46:51 UTC (rev 747521)
@@ -0,0 +1,67 @@
+# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
+
+pkgbase=tlsh
+pkgname=('tlsh' 'python-tlsh')
+pkgver=3.17.0
+pkgrel=3
+pkgdesc='Fuzzy matching library that generates a hash value which can be used for similarity comparisons'
+url='https://github.com/trendmicro/tlsh'
+arch=('x86_64')
+license=('Apache')
+makedepends=('cmake' 'python' 'gcc-libs')
+source=(https://github.com/trendmicro/${pkgbase}/archive/${pkgver}/${pkgbase}-${pkgver}.tar.gz)
+sha256sums=('810cecdda1632ecb836278e5a58560d5b2b7911d02ed7419dc02b6a38e635985')
+sha512sums=('81664da8cffb2fd7632ca63b7662a8de3d09ce9b697dbaac8b92aa40fb2d49c440c1489f01d16ff6475754bc1406bc6b30579941d85319b63811dd0dd22ef765')
+
+prepare() {
+  cd ${pkgbase}-${pkgver}
+  # remove garbage
+  sed '/set(CMAKE_EXE_LINKER_FLAGS/d' -i CMakeLists.txt
+  sed '/set(CMAKE_CXX_FLAGS/d' -i CMakeLists.txt
+  sed 's|TLSH_SHARED_LIBRARY 0|TLSH_SHARED_LIBRARY 1|' -i src/CMakeLists.txt
+}
+
+build() {
+  cd ${pkgbase}-${pkgver}
+  mkdir -p build
+  (cd build
+    cmake .. \
+      -DCMAKE_BUILD_TYPE=None \
+      -DCMAKE_INSTALL_PREFIX:PATH=/usr \
+      -DCMAKE_CXX_FLAGS="${CXXFLAGS} ${CPPFLAGS}"
+    make
+  )
+  (cd bin
+    cmake -E create_symlink tlsh_unittest tlsh
+  )
+  (cd py_ext
+    python setup.py build
+  )
+}
+
+check() {
+  cd ${pkgbase}-${pkgver}
+  (cd build
+    make test
+  )
+  (cd Testing
+    ./test.sh
+  )
+}
+
+package_tlsh() {
+  depends=('gcc-libs')
+  provides=('libtlsh.so')
+  cd ${pkgbase}-${pkgver}
+  make -C build DESTDIR="${pkgdir}" install
+  install -Dm 755 bin/tlsh_unittest -t "${pkgdir}/usr/bin"
+  install -Dm 644 README.md -t "${pkgdir}/usr/share/doc/${pkgname}"
+}
+
+package_python-tlsh() {
+  depends=('python')
+  cd ${pkgbase}-${pkgver}/py_ext
+  python setup.py install -O1 --root="${pkgdir}" --skip-build
+}
+
+# vim: ts=2 sw=2 et:



More information about the arch-commits mailing list