aboutsummaryrefslogtreecommitdiffstats
path: root/tools/release-update-debian-soversions.sh
blob: fb2b8895cc1f72d7a16d78ddb76e57f948daedd0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/sh
#
# Compare ABIs of two Wireshark working copies
#
# Copyright 2017 Balint Reczey <balint.reczey@canonical.com>
#
# Wireshark - Network traffic analyzer
# By Gerald Combs <gerald@wireshark.org>
# Copyright 1998 Gerald Combs
#
# SPDX-License-Identifier: GPL-2.0-or-later

# Set shared library package names and library versions in Debian packaging
# matching the new major release's so versions

set -e

for i in codecs wireshark wiretap wsutil; do
    NEW_VERSION=$(grep SOVERSION "$(grep -l lib${i} ./*/CMakeLists.txt)" | sed 's/.*SOVERSION \([0-9]*\).*/\1/')
    rename "s/0\\./${NEW_VERSION}./" debian/lib${i}0.*
    grep -l -R "lib${i}0" debian/ | xargs sed -i "s/lib${i}0/lib${i}${NEW_VERSION}/"
    grep -l -R "lib${i}\\.so\\.0" debian/ | xargs sed -i "s/lib${i}\\.so\\.0/lib${i}.so.${NEW_VERSION}/"
done