summaryrefslogtreecommitdiff
path: root/dh_makeshlibs
diff options
context:
space:
mode:
authorjoey <joey>1999-08-17 04:34:25 +0000
committerjoey <joey>1999-08-17 04:34:25 +0000
commitd079e6683cfcbef6a979eb7a02780eebdf480a74 (patch)
tree7cd6ba28701185b0facf84b98b9f4f92f56a8c3a /dh_makeshlibs
parentdd838eee7e75da018b2722f0ce4dbccd9f6d1a5d (diff)
downloaddebhelper-d079e6683cfcbef6a979eb7a02780eebdf480a74.tar.gz
r12: Initial Import
Diffstat (limited to 'dh_makeshlibs')
-rwxr-xr-xdh_makeshlibs30
1 files changed, 30 insertions, 0 deletions
diff --git a/dh_makeshlibs b/dh_makeshlibs
new file mode 100755
index 00000000..a09e26f6
--- /dev/null
+++ b/dh_makeshlibs
@@ -0,0 +1,30 @@
+#!/bin/sh -e
+#
+# Automatically generate shlibs files.
+
+PATH=debian:$PATH:/usr/lib/debhelper
+. dh_lib
+
+for PACKAGE in $DH_DOPACKAGES; do
+ TMP=`tmpdir $PACKAGE`
+
+ if [ -e "debian/$TMP/DEBIAN/shlibs" ]; then
+ error "debian/$TMP/DEBIAN/shlibs already exists."
+ fi
+
+ for file in `find debian/$TMP -type f -name "*.so*" | tr "\n" " "` ; do
+ LIBRARY=`expr $file : ".*/\(.*\)\.so\..*"` || true
+ VERSION=`expr $file : ".*/.*\.so\.\(.*\)"` || true
+ MAJOR=`expr $VERSION : "\([0-9]*\)\."` || true
+ LIBSTUB=`expr $file : "\(.*\/.*\.so\)\..*"` || true
+ if [ ! -d "debian/$TMP/DEBIAN" ] ; then
+ doit "install -d debian/$TMP/DEBIAN"
+ fi
+ verbose_echo "echo \"$LIBRARY $MAJOR $PACKAGE\" >>debian/$TMP/DEBIAN/shlibs"
+ echo "$LIBRARY $MAJOR $PACKAGE" >>debian/$TMP/DEBIAN/shlibs
+ done
+
+ if [ -e "debian/$TMP/DEBIAN/shlibs" ]; then
+ doit "chown root.root debian/$TMP/DEBIAN/shlibs"
+ fi
+done