[arch-commits] Commit in tlsh/trunk (3 files)

Levente Polyak anthraxx at archlinux.org
Thu Aug 8 00:21:31 UTC 2019


    Date: Thursday, August 8, 2019 @ 00:21:30
  Author: anthraxx
Revision: 498320

upgpkg: tlsh 3.17.0-1

Modified:
  tlsh/trunk/PKGBUILD
Deleted:
  tlsh/trunk/dont-use-rpath.patch
  tlsh/trunk/install-libraries.patch

-------------------------+
 PKGBUILD                |   39 ++++++++++++++++++---------------------
 dont-use-rpath.patch    |   46 ----------------------------------------------
 install-libraries.patch |   23 -----------------------
 3 files changed, 18 insertions(+), 90 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2019-08-08 00:21:08 UTC (rev 498319)
+++ PKGBUILD	2019-08-08 00:21:30 UTC (rev 498320)
@@ -2,27 +2,24 @@
 
 pkgbase=tlsh
 pkgname=('tlsh' 'python-tlsh' 'python2-tlsh')
-pkgver=3.4.5
-pkgrel=4
+pkgver=3.17.0
+pkgrel=1
 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' 'python2' 'gcc-libs')
-source=(${pkgname}-${pkgver}.tar.gz::https://github.com/trendmicro/${pkgname}/archive/v${pkgver}.tar.gz
-        dont-use-rpath.patch
-        install-libraries.patch)
-sha512sums=('039f9fb9fb467a9b22f85a621c46069bac1745da039657840e1ff1a53901392fcf29d3c953b0f47d831d022a5e2594925c726d4ff921614418a3bb023a4ebbdc'
-            '6b7d32c24151c6513918875011339990bdf4638a4f03c166b5144efe10a4bb5bf1da0401951f78a75f7e197c81a03b4ae540e22cd3ce9f2f2c99f0436780d510'
-            '448dc550df26c756b8fef7b774d193336d63f7fa2f01683308ddfd042edbe60677adad23c95e27b3d98ce7d6c734110cf218335bbc8bd0ce57dccf3eaa63a065')
+source=(https://github.com/trendmicro/${pkgbase}/archive/${pkgver}/${pkgbase}-${pkgver}.tar.gz)
+sha256sums=('810cecdda1632ecb836278e5a58560d5b2b7911d02ed7419dc02b6a38e635985')
+sha512sums=('81664da8cffb2fd7632ca63b7662a8de3d09ce9b697dbaac8b92aa40fb2d49c440c1489f01d16ff6475754bc1406bc6b30579941d85319b63811dd0dd22ef765')
 
 prepare() {
   cd ${pkgbase}-${pkgver}
-  patch -p1 < "${srcdir}/install-libraries.patch"
-  patch -p1 < "${srcdir}/dont-use-rpath.patch"
   cp -ra py_ext{,-py2}
-  cp Testing/python_test.sh Testing/python2_test.sh
-  sed 's|py_ext|py_ext-py2|g' -i Testing/python2_test.sh
+  # 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() {
@@ -30,9 +27,9 @@
   mkdir -p build
   (cd build
     cmake .. \
-      -DCMAKE_BUILD_TYPE=RELEASE \
+      -DCMAKE_BUILD_TYPE=None \
       -DCMAKE_INSTALL_PREFIX:PATH=/usr \
-      -DCMAKE_INSTALL_LIBDIR:PATH=/usr/lib
+      -DCMAKE_CXX_FLAGS="${CXXFLAGS} ${CPPFLAGS}"
     make
   )
   (cd bin
@@ -51,18 +48,18 @@
   (cd build
     make test
   )
-  Testing/python_test.sh
-  Testing/python2_test.sh python2
+  (cd Testing
+    ./test.sh
+  )
 }
 
 package_tlsh() {
   depends=('gcc-libs')
+  provides=('libtlsh.so')
   cd ${pkgbase}-${pkgver}
-  install -Dm 755 bin/tlsh_unittest "${pkgdir}/usr/bin/tlsh_unittest"
-  install -Dm 644 README.md "${pkgdir}/usr/share/doc/${pkgname}/README.md"
-  (cd build
-    make DESTDIR="${pkgdir}" install
-  )
+  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() {

Deleted: dont-use-rpath.patch
===================================================================
--- dont-use-rpath.patch	2019-08-08 00:21:08 UTC (rev 498319)
+++ dont-use-rpath.patch	2019-08-08 00:21:30 UTC (rev 498320)
@@ -1,46 +0,0 @@
-From 7363d0ec5c84e873d86defc8a02533e6debcb4bd Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Bobbio?= <lunar at debian.org>
-Date: Wed, 27 Jan 2016 17:43:44 +0100
-Subject: [PATCH 1/2] do not set RPATH for tlsh_unittest
-
-Using RPATH leads to problem when linked libraries have their own
-dependencies. See: https://wiki.debian.org/RpathIssue
----
- test/CMakeLists.txt | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
-index bc92ffc..8b9181f 100644
---- a/test/CMakeLists.txt
-+++ b/test/CMakeLists.txt
-@@ -26,3 +26,4 @@ add_executable(tlsh_unittest tlsh_unittest.cpp)
- target_link_libraries(tlsh_unittest tlsh_shared)
- set_target_properties(tlsh_unittest PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin)
- set_target_properties(tlsh_unittest PROPERTIES OUTPUT_NAME tlsh_unittest${BUILD_POSTFIX})
-+set_target_properties(tlsh_unittest PROPERTIES SKIP_BUILD_RPATH TRUE)
--- 
-2.7.0
-
-
-From 9f6f94efe8c900a522607e2cbf7f2d443511c3b5 Mon Sep 17 00:00:00 2001
-From: anthraxx <levente at leventepolyak.net>
-Date: Wed, 27 Jan 2016 19:01:12 +0100
-Subject: [PATCH 2/2] set LD_PRELOAD for running tests against local shared
- library
-
----
- Testing/CMakeLists.txt | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/Testing/CMakeLists.txt b/Testing/CMakeLists.txt
-index 42c739f..c7276b8 100644
---- a/Testing/CMakeLists.txt
-+++ b/Testing/CMakeLists.txt
-@@ -3,3 +3,4 @@
- # instead
- add_test(tlsh_unittest_len "${CMAKE_SOURCE_DIR}/Testing/test.sh")
- add_test(tlsh_unittest_xlen "${CMAKE_SOURCE_DIR}/Testing/test.sh" "-xlen")
-+set_tests_properties(tlsh_unittest_len tlsh_unittest_xlen PROPERTIES ENVIRONMENT "LD_PRELOAD=${CMAKE_SOURCE_DIR}/lib/libtlsh.so.0")
--- 
-2.7.0
-

Deleted: install-libraries.patch
===================================================================
--- install-libraries.patch	2019-08-08 00:21:08 UTC (rev 498319)
+++ install-libraries.patch	2019-08-08 00:21:30 UTC (rev 498320)
@@ -1,23 +0,0 @@
-From fb71fc45992a9adf73b3c8194bdd691391ca34d7 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Bobbio?= <lunar at debian.org>
-Date: Wed, 27 Jan 2016 17:44:06 +0100
-Subject: [PATCH] install the library in expected directories
-
-We add CMake install directives in order to see the library files installed in
-the expected multiarch compatible locations.
----
- src/CMakeLists.txt | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
-index b1c92fb..c8d3fd9 100644
---- a/src/CMakeLists.txt
-+++ b/src/CMakeLists.txt
-@@ -21,3 +21,7 @@ set_target_properties(tlsh_shared PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_SO
- set_target_properties(tlsh_shared PROPERTIES OUTPUT_NAME tlsh${BUILD_POSTFIX})
- set_target_properties(tlsh_shared PROPERTIES VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}"
-                                              SOVERSION "0")
-+
-+include(GNUInstallDirs)
-+install(TARGETS tlsh tlsh_shared DESTINATION ${CMAKE_INSTALL_LIBDIR})
-+install(FILES ../include/tlsh.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})


More information about the arch-commits mailing list