[SCM] libav/experimental: Small helper utility to investigate sonames

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Aug 10 16:04:18 UTC 2014


The following commit has been merged in the experimental branch:
commit 66b69e4eed6c27c0105bc38b51ef0e69ae90506e
Author: Reinhard Tartler <siretart at tauware.de>
Date:   Sun Aug 10 09:56:47 2014 -0400

    Small helper utility to investigate sonames
    
    functiondebian/get_soname_version.sh is derived from helper functions
    from upstream's configure to inspect the soname versions of libav libraries.

diff --git a/debian/get_soname_version.sh b/debian/get_soname_version.sh
new file mode 100755
index 0000000..ebe2101
--- /dev/null
+++ b/debian/get_soname_version.sh
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+# small helper script to learn about library sonames
+# adapted from upstream's configure script
+
+# Avoid locale weirdness, besides we really just want to translate ASCII.
+toupper(){
+    echo "$@" | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ
+}
+
+get_version(){
+    lcname=${1}
+    name=$(toupper $lcname)
+    file=$lcname/version.h
+    eval $(awk "/#define ${name}_VERSION_M/ { print \$2 \"=\" \$3 }" "$file")
+    eval ${name}_VERSION=\$${name}_VERSION_MAJOR.\$${name}_VERSION_MINOR.\$${name}_VERSION_MICRO
+    eval echo "${lcname}_VERSION=\$${name}_VERSION"
+    eval echo "${lcname}_VERSION_MAJOR=\$${name}_VERSION_MAJOR"
+    eval echo "${lcname}_VERSION_MINOR=\$${name}_VERSION_MINOR"
+}
+
+get_version "$1"
+

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list