Section: misc
Priority: optional
Maintainer: Dynamic Kernel Modules Support Team <pkg-dkms-maint@lists.alioth.debian.org>
-Build-Depends: debhelper (>= 7), dkms, gawk
+Build-Depends: debhelper (>= 7), dkms, gawk, dh-exec
Standards-Version: 3.8.1
Package: sapphire-remote-dkms
Package: sapphire-remote
Architecture: all
-Depends: sapphire-remote-dkms, ${misc:Depends}
+Pre-Depends: sapphire-remote-dkms
+Depends: gawk, ${misc:Depends}
Description: sapphire-remote tools
--- /dev/null
+#!/usr/bin/dh-exec
+sapphire-remote-7.1/extract_keydefs.sh => /usr/lib/sapphire-remote
+sapphire-remote-7.1/sapphire_keymap.sh.part1 => /usr/lib/sapphire-remote
+sapphire-remote-7.1/sapphire_keymap.sh.part3 => /usr/lib/sapphire-remote
+sapphire-remote-7.1/sapphire_startup.sh => /usr/lib/sapphire-remote
+sapphire-remote-7.1/keymap.default => /etc/sapphire.keymap
+
--- /dev/null
+#!/bin/sh
+# postinst script for sapphire-remote
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * <postinst> `configure' <most-recently-configured-version>
+# * <old-postinst> `abort-upgrade' <new version>
+# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+# <new-version>
+# * <postinst> `abort-remove'
+# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+# <failed-install-package> <version> `removing'
+# <conflicting-package> <version>
+# for details, see https://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+NAME=sapphire-remote
+PACKAGE_NAME=$NAME
+DEB_NAME=$(echo $PACKAGE_NAME | sed 's,_,-,')
+MODNAME=/usr/src/${NAME}-7.1/sapphire
+KEYMAP_SCRIPT=/usr/lib/${NAME}/sapphire_keymap.sh
+EXTRACT_KEYDEFS=extract_keydefs.sh
+
+pkg_configure () {
+ if [ -e /usr/include/linux/input-event-codes.h ]
+ then
+ INPUT_H=/usr/include/linux/input-event-codes.h
+ else
+ INPUT_H=/usr/include/linux/input.h
+ fi
+
+ /usr/lib/${NAME}/${EXTRACT_KEYDEFS} ${INPUT_H} ${MODNAME}.h | cat ${KEYMAP_SCRIPT}.part1 - ${KEYMAP_SCRIPT}.part3 > ${KEYMAP_SCRIPT}
+ chmod 0755 ${KEYMAP_SCRIPT}
+}
+
+
+case "$1" in
+ configure)
+ pkg_configure
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0