From d52a7bed9fdeef77bdcafd66c748adce14fde42d Mon Sep 17 00:00:00 2001
From: "Jan Alexander Steffens (heftig)" <jan.steffens@gmail.com>
Date: Tue, 6 Nov 2018 07:11:37 +0000
Subject: [PATCH 5/5] build: Restore right soversion to libraries

The previous change did not leave the expected .0 symlinks.

'soversion' is the actual version linked against. To match the scheme
used by libtool, we need to give the libraries a 'version' as well.

(cherry picked from commit 282cd5aa85852cc7f9e603dae435f6b528c4712a)
---
 meson.build                               | 3 ++-
 src/libtracker-control/meson.build        | 1 +
 src/libtracker-miner/meson.build          | 1 +
 src/libtracker-sparql-backend/meson.build | 1 +
 4 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/meson.build b/meson.build
index 0fda24151..593b9db44 100644
--- a/meson.build
+++ b/meson.build
@@ -15,7 +15,8 @@ tracker_interface_age = 0
 tracker_binary_age = 100 * tracker_minor_version + tracker_micro_version - tracker_interface_age
 
 # This the .Z used in libtracker-sparql-2.0.so.Z
-soversion = '0.@0@.@1@'.format(tracker_binary_age - tracker_interface_age, tracker_interface_age)
+soversion = '0'
+libversion = '@0@.@1@.@2@'.format(soversion, tracker_binary_age - tracker_interface_age, tracker_interface_age)
 
 libdir = join_paths(get_option('prefix'), get_option('libdir'))
 datadir = join_paths(get_option('prefix'), get_option('datadir'))
diff --git a/src/libtracker-control/meson.build b/src/libtracker-control/meson.build
index 81578e306..533ac538e 100644
--- a/src/libtracker-control/meson.build
+++ b/src/libtracker-control/meson.build
@@ -10,6 +10,7 @@ libtracker_control = library('tracker-control-' + tracker_api_version,
     tracker_common_enum_header,
     c_args: tracker_c_args,
     soversion: soversion,
+    version: libversion,
     install: true,
     install_rpath: tracker_internal_libs_dir,
     # This doesn't depend on tracker_common_dep because of
diff --git a/src/libtracker-miner/meson.build b/src/libtracker-miner/meson.build
index e53b21cf9..49c879057 100644
--- a/src/libtracker-miner/meson.build
+++ b/src/libtracker-miner/meson.build
@@ -60,6 +60,7 @@ libtracker_miner = library(
     miner_enums[0], miner_enums[1], miner_sources,
     c_args: tracker_c_args,
     soversion: soversion,
+    version: libversion,
     install: true,
     install_rpath: tracker_internal_libs_dir,
     # This doesn't depend on tracker_common_dep because of
diff --git a/src/libtracker-sparql-backend/meson.build b/src/libtracker-sparql-backend/meson.build
index c8415efb8..e54333bec 100644
--- a/src/libtracker-sparql-backend/meson.build
+++ b/src/libtracker-sparql-backend/meson.build
@@ -8,6 +8,7 @@ libtracker_sparql = library('tracker-sparql-' + tracker_api_version,
     'tracker-backend.vala',
 
     soversion: soversion,
+    version: libversion,
 
     install: true,
     install_rpath: tracker_internal_libs_dir,
-- 
2.17.0

