File: update-manifest.sh

package info (click to toggle)
unixodbc 2.3.1-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 11,524 kB
  • ctags: 7,656
  • sloc: ansic: 89,405; sh: 15,975; makefile: 1,574; yacc: 969; sql: 1
file content (19 lines) | stat: -rw-r--r-- 634 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh
LC_COLLATE=C
export LC_COLLATE

echo Updating library manifest...
for package in $@; do
    manifest=debian/$package.manifest
    # file format version number
    echo "  VERSION 2" > $manifest; \
    for i in $(find $(pwd)/debian/$package -type f \
         \( -name '*.so' -or -name '*.so.*' \))
    do
	version=`dpkg-parsechangelog |awk '/Version:/ { print $2 }'`
	objdump -p $i | sed -n -e"s/\( SONAME.*\)/\\1 $version/p" >> $manifest
	objdump -T $i | grep -E ' [gw] .*\.text|__cxa_pure_virtual' \
	| grep -vE '\b((__gmon_start__|_ftext)\b|_(rest|save)[fg]pr)' \
	| cut -b34- | c++filt | sort >> $manifest
    done
done