summaryrefslogtreecommitdiff
path: root/dh_makeshlibs
diff options
context:
space:
mode:
authorjoey <joey>1999-08-17 04:34:24 +0000
committerjoey <joey>1999-08-17 04:34:24 +0000
commit1e6dea44772a0c1f57e7cd50ff12e35a1cff0b96 (patch)
tree212e56dc8ea32cf27cd2a33ac901a92a701f063f /dh_makeshlibs
parentface7b5d7df5fb2b8f434bc7135f27b38329a5c5 (diff)
downloaddebhelper-1e6dea44772a0c1f57e7cd50ff12e35a1cff0b96.tar.gz
r11: Initial revision
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