* Niels Thykier <niels@thykier.net>, 2013-06-30, 19:03:
+ eu-readelf -n "$1" | grep -i 'Build Id' | sed 's/.*:[[:blank:]]*\([[:digit:]|abcdef]*\).*/\1/g'
eu-readelf(1) is part of elfutils, but AFAICS lintian doesn't build-depend on it. You could use readelf(1) to extract build-id instead.
Also, resetting locale to C might be needed, in order to avoid a bug like #714187.
-- Jakub Wilk