--- /dev/null
+#! /bin/sh
+
+if [ "$1" = configure ]; then
+ if [ -d /usr/doc -a ! -e /usr/doc/dpkg-dev -a -d /usr/share/doc/dpkg-dev ] ; then
+ ln -s ../share/doc/dpkg-dev /usr/doc/dpkg-dev
+ fi
+
+ if [ -x /usr/lib/emacsen-common/emacs-package-install ]; then
+ /usr/lib/emacsen-common/emacs-package-install dpkg-dev
+ fi
+fi
--- /dev/null
+#!/bin/sh
+
+set -e
+
+if [ "$1" = remove ]; then
+ if [ -x /usr/lib/emacsen-common/emacs-package-remove ]; then
+ /usr/lib/emacsen-common/emacs-package-remove dpkg-dev
+ fi
+fi
+
+if [ "$1" = remove -o "$1" = "upgrade" ]; then
+ if [ -L /usr/doc/dpkg-dev ]; then
+ rm -f /usr/doc/dpkg-dev
+ fi
+fi
+
--- /dev/null
+#!/bin/sh
+set -e
+
+FLAVOR=$1
+PACKAGE=dpkg-dev
+
+ELDIR=/usr/share/emacs/site-lisp/${PACKAGE}
+ELCDIR=/usr/share/${FLAVOR}/site-lisp/${PACKAGE}
+files="debian-changelog-mode.el"
+flags="-batch --no-site-file -l path.el -f batch-byte-compile"
+
+if [ ${FLAVOR} != emacs ]; then
+ echo install/${PACKAGE}: Byte-compiling for ${FLAVOR}
+
+ install -m 755 -d ${ELCDIR}
+ cd ${ELDIR}
+ cp ${files} ${ELCDIR}
+ cd ${ELCDIR}
+ cat << EOF > path.el
+(setq load-path (cons "." load-path) byte-compile-warnings nil)
+EOF
+ ${FLAVOR} ${flags} ${files}
+ rm -f *.el path.el
+fi
--- /dev/null
+#!/bin/sh
+set -e
+
+FLAVOR=$1
+PACKAGE=dpkg-dev
+
+if [ ${FLAVOR} != emacs ]; then
+ echo remove/${PACKAGE}: Purging byte-compiled files for ${FLAVOR}
+ rm -rf /usr/share/${FLAVOR}/site-lisp/${PACKAGE}
+ rm -f /etc/${FLAVOR}/site-start.d/50dpkg-dev.el
+fi
--- /dev/null
+--- ltconfig.orig Tue Jul 6 15:55:36 1999
++++ ltconfig Tue Jul 6 15:59:12 1999
+@@ -1200,8 +1200,8 @@ EOF
+ esac
+
+ if test "$ld_shlibs" = yes; then
+- runpath_var=LD_RUN_PATH
+- hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
++ runpath_var=LD_LIBRARY_PATH
++ hardcode_libdir_flag_spec=''
+ export_dynamic_flag_spec='${wl}--export-dynamic'
+ case $host_os in
+ cygwin* | mingw*)