summaryrefslogtreecommitdiffstats
path: root/debian/patches/0003-add-versions-to-shared-libraries.patch
blob: 9c4901db6834a2532afea377d094fc9835fc7316 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
From: =?utf-8?q?Christian_G=C3=B6ttsche?= <cgzones@googlemail.com>
Date: Tue, 14 Jan 2020 22:02:02 +0100
Subject: add versions to shared libraries

Forwarded: not-needed
---
 contrib/aho-corasick/CMakeLists.txt | 2 ++
 contrib/kann/CMakeLists.txt         | 4 +++-
 contrib/libev/CMakeLists.txt        | 3 +++
 contrib/replxx/CMakeLists.txt       | 4 +++-
 src/CMakeLists.txt                  | 4 +++-
 5 files changed, 14 insertions(+), 3 deletions(-)

--- a/contrib/aho-corasick/CMakeLists.txt
+++ b/contrib/aho-corasick/CMakeLists.txt
@@ -12,3 +12,5 @@ ELSE()
 	ADD_LIBRARY(rspamd-actrie STATIC ${AHOCORASICSRC})
 	target_link_libraries(rspamd-actrie glib-2.0)
 ENDIF()
+
+SET_TARGET_PROPERTIES(rspamd-actrie PROPERTIES VERSION "${RSPAMD_VERSION}")
--- a/contrib/kann/CMakeLists.txt
+++ b/contrib/kann/CMakeLists.txt
@@ -8,9 +8,12 @@ ENDIF()
 
 target_link_libraries(rspamd-kann "${RSPAMD_REQUIRED_LIBRARIES}")
 target_link_libraries(rspamd-kann "m")
+
+SET_TARGET_PROPERTIES(rspamd-kann PROPERTIES VERSION "${RSPAMD_VERSION}")
+
 IF(WITH_BLAS)
     MESSAGE(STATUS "Use openblas to accelerate kann")
     TARGET_LINK_LIBRARIES(rspamd-kann ${BLAS_REQUIRED_LIBRARIES})
 ENDIF(WITH_BLAS)
 
-INSTALL(TARGETS rspamd-kann LIBRARY DESTINATION ${RSPAMD_LIBDIR})
\ No newline at end of file
+INSTALL(TARGETS rspamd-kann LIBRARY DESTINATION ${RSPAMD_LIBDIR})
--- a/contrib/libev/CMakeLists.txt
+++ b/contrib/libev/CMakeLists.txt
@@ -63,6 +63,9 @@ IF(ENABLE_STATIC MATCHES "ON")
 ELSE()
 	ADD_LIBRARY(rspamd-ev SHARED ${LIBEVSRC})
 ENDIF()
+
+SET_TARGET_PROPERTIES(rspamd-ev PROPERTIES VERSION "${RSPAMD_VERSION}")
+
 target_link_libraries(rspamd-ev "${RSPAMD_REQUIRED_LIBRARIES}")
 include_directories("${CMAKE_CURRENT_BINARY_DIR}")
 ADD_DEFINITIONS("-DEV_CONFIG_H=\"libev-config.h\""
--- a/contrib/replxx/CMakeLists.txt
+++ b/contrib/replxx/CMakeLists.txt
@@ -70,6 +70,8 @@ else()
 	add_library(rspamd-replxx SHARED ${REPLXX_SOURCES})
 endif()
 
+SET_TARGET_PROPERTIES(rspamd-replxx PROPERTIES VERSION "${RSPAMD_VERSION}")
+
 target_include_directories(
 	rspamd-replxx
 	PUBLIC ${PROJECT_SOURCE_DIR}/include
@@ -79,4 +81,4 @@ set( TARGETS ${TARGETS} rspamd-replxx )
 target_compile_definitions(rspamd-replxx PRIVATE REPLXX_BUILDING_DLL)
 target_link_libraries(rspamd-replxx "${RSPAMD_REQUIRED_LIBRARIES}")
 
-install( TARGETS ${TARGETS} LIBRARY DESTINATION ${RSPAMD_LIBDIR})
\ No newline at end of file
+install( TARGETS ${TARGETS} LIBRARY DESTINATION ${RSPAMD_LIBDIR})
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -191,6 +191,8 @@ FOREACH(_DEP ${LIBSERVER_DEPENDS})
 	ADD_DEPENDENCIES(rspamd-server "${_DEP}")
 ENDFOREACH()
 
+SET_TARGET_PROPERTIES(rspamd-server PROPERTIES VERSION "${RSPAMD_VERSION}")
+
 TARGET_LINK_LIBRARIES(rspamd-server rspamd-http-parser)
 TARGET_LINK_LIBRARIES(rspamd-server rspamd-fpconv)
 TARGET_LINK_LIBRARIES(rspamd-server rspamd-cdb)
@@ -243,4 +245,4 @@ ENDIF(NOT DEBIAN_BUILD)
 TARGET_LINK_LIBRARIES(rspamd rspamd-server)
 
 INSTALL(TARGETS rspamd RUNTIME DESTINATION bin)
-INSTALL(TARGETS rspamd-server LIBRARY DESTINATION ${RSPAMD_LIBDIR})
\ No newline at end of file
+INSTALL(TARGETS rspamd-server LIBRARY DESTINATION ${RSPAMD_LIBDIR})