Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
faedaed
commit b57529c
Showing
3 changed files
with
87 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
Package: mk-arcade-joystick-rpi-dkms | ||
Version: 0.1.0 | ||
Architecture: all | ||
Maintainer: DigitalLumberjack <digitallumberjack@gmail.com> | ||
Installed-Size: 74 | ||
Depends: dkms (>= 1.95) | ||
Section: misc | ||
Priority: optional | ||
Description: mk_arcade_joystick_rpi driver in DKMS format. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
#!/bin/sh | ||
# Copyright (C) 2002-2005 Flavio Stanchina | ||
# Copyright (C) 2005-2006 Aric Cyr | ||
# Copyright (C) 2007 Mario Limonciello | ||
# Copyright (C) 2009 Alberto Milone | ||
|
||
set -e | ||
|
||
NAME=mk_arcade_joystick_rpi | ||
PACKAGE_NAME=$NAME-dkms | ||
DEB_NAME=$(echo $PACKAGE_NAME | sed 's,_,-,g') | ||
CVERSION=`dpkg-query -W -f='${Version}' $DEB_NAME | awk -F "-" '{print $1}' | cut -d\: -f2` | ||
ARCH=`arch` | ||
|
||
dkms_configure () { | ||
for POSTINST in /usr/lib/dkms/common.postinst "/usr/share/$PACKAGE_NAME/postinst"; do | ||
if [ -f "$POSTINST" ]; then | ||
"$POSTINST" "$NAME" "$CVERSION" "/usr/share/$PACKAGE_NAME" "$ARCH" "$2" | ||
return $? | ||
fi | ||
echo "WARNING: $POSTINST does not exist." >&2 | ||
done | ||
echo "ERROR: DKMS version is too old and $PACKAGE_NAME was not" >&2 | ||
echo "built with legacy DKMS support." >&2 | ||
echo "You must either rebuild $PACKAGE_NAME with legacy postinst" >&2 | ||
echo "support or upgrade DKMS to a more current version." >&2 | ||
return 1 | ||
} | ||
|
||
case "$1" in | ||
configure) | ||
dkms_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. | ||
|
||
|
||
|
||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/bin/sh | ||
|
||
NAME=mk_arcade_joystick_rpi | ||
VERSION=0.1.0 | ||
|
||
set -e | ||
|
||
case "$1" in | ||
remove|upgrade|deconfigure) | ||
if [ "`dkms status -m $NAME`" ]; then | ||
dkms remove -m $NAME -v $VERSION --all | ||
fi | ||
;; | ||
|
||
failed-upgrade) | ||
;; | ||
|
||
*) | ||
echo "prerm called with unknown argument \`$1'" >&2 | ||
exit 1 | ||
;; | ||
esac | ||
|
||
|
||
|
||
exit 0 | ||
|
||
|