2
2
# Copyright (C) 2007-2008 Mario Limonciello
5
CVERSION=`dpkg-query -W -f='${Version}' lirc-modules-source | awk -F "-" '{print $1}'`
6
PACKAGE_NAME=$NAME-modules-source
7
CVERSION=`dpkg-query -W -f='${Version}' $PACKAGE_NAME | awk -F "-" '{print $1}' | cut -d\: -f2`
9
ARCH=`dpkg --print-architecture`
21
echo "WARNING: unsupported arch: $ARCH"
28
for POSTINST in /usr/lib/dkms/common.postinst /usr/share/$PACKAGE_NAME/postinst; do
29
if [ -f $POSTINST ]; then
30
$POSTINST $NAME $CVERSION /usr/share/$PACKAGE_NAME $ARCH $2
33
echo "WARNING: $POSTINST does not exist."
35
echo "ERROR: DKMS version is too old and $PACKAGE_NAME was not"
36
echo "built with legacy DKMS support."
37
echo "You must either rebuild $PACKAGE_NAME with legacy postinst"
38
echo "support or upgrade DKMS to a more current version."
42
abort-upgrade|abort-remove|abort-deconfigure)
46
echo "postinst called with unknown argument \`$1'" >&2
11
echo "Adding Module to DKMS build system"
12
dkms add -m lirc -v $CVERSION > /dev/null
13
echo "Doing initial module build"
14
dkms build -m lirc -v $CVERSION > /dev/null
15
echo "Installing initial module"
16
dkms install -m lirc -v $CVERSION --force > /dev/null