libnet: Add SOVERSION guard

%ci:no-build
This commit is contained in:
Tee KOBAYASHI 2022-12-30 04:49:41 +09:00 committed by xtkoba
parent 419a4fd091
commit cca83ede92
1 changed files with 12 additions and 0 deletions

View File

@ -7,3 +7,15 @@ TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://github.com/libnet/libnet/releases/download/v$TERMUX_PKG_VERSION/libnet-$TERMUX_PKG_VERSION.tar.gz
TERMUX_PKG_SHA256=caa4868157d9e5f32e9c7eac9461efeff30cb28357f7f6bf07e73933fb4edaa7
TERMUX_PKG_AUTO_UPDATE=true
termux_step_post_get_source() {
# Do not forget to bump revision of reverse dependencies and rebuild them
# after SOVERSION is changed.
local _SOVERSION=9
local e=$(sed -En 's/^libnet_la_LDFLAGS\s*=.*\s+-version-info\s+([0-9]+):([0-9]+):([0-9]+).*/\1-\3/p' \
src/Makefile.am)
if [ ! "${e}" ] || [ "${_SOVERSION}" != "$(( "${e}" ))" ]; then
termux_error_exit "SOVERSION guard check failed."
fi
}