elif [ "$1" = 'library' ]; then
librarysymbols() {
- echo "Checking $1 in version $2"
+ local buildlib="build/bin/${1}.so.${2}"
+ if [ ! -r "$buildlib" ]; then
+ echo "ERROR: The library ${1} has to be built before symbols can be checked!"
+ return
+ fi
+ echo "Checking $1 in version $2 build at $(stat -L -c '%y' "$buildlib")"
local tmpfile=$(mktemp)
- dpkg-gensymbols -p${1}${2} -ebuild/bin/${1}.so.${2} -Idebian/${1}${2}.symbols -O/dev/null 2> /dev/null > $tmpfile || true
+ dpkg-gensymbols -p${1}${2} -e${buildlib} -Idebian/${1}${2}.symbols -O/dev/null 2> /dev/null > $tmpfile || true
librarysymbolsfromfile "$tmpfile" "$(echo "${1}" | cut -c 4- | tr -d '-' | tr 'a-z' 'A-Z')_${2}"
rm -f $tmpfile
}