From de63db0bd27b24c49ef15be379f55b777b8f219f Mon Sep 17 00:00:00 2001 From: Henrik Rydberg Date: Fri, 13 Aug 2010 17:52:16 +0100 Subject: initial version --- debian/README.Debian | 15 +++++++++++ debian/changelog | 6 +++++ debian/compat | 1 + debian/control | 13 ++++++++++ debian/copyright | 28 +++++++++++++++++++++ debian/dirs | 1 + debian/postinst | 71 ++++++++++++++++++++++++++++++++++++++++++++++++++++ debian/postrm | 27 ++++++++++++++++++++ debian/prerm | 28 +++++++++++++++++++++ debian/rules | 53 +++++++++++++++++++++++++++++++++++++++ 10 files changed, 243 insertions(+) create mode 100644 debian/README.Debian create mode 100644 debian/changelog create mode 100644 debian/compat create mode 100644 debian/control create mode 100644 debian/copyright create mode 100644 debian/dirs create mode 100644 debian/postinst create mode 100644 debian/postrm create mode 100644 debian/prerm create mode 100755 debian/rules (limited to 'debian') diff --git a/debian/README.Debian b/debian/README.Debian new file mode 100644 index 0000000..a96fb8a --- /dev/null +++ b/debian/README.Debian @@ -0,0 +1,15 @@ +hid-3m-pct DKMS module for Debian + +hid-3m-pct: This driver adds support for the 3M multitouch screen. + +* Install the debian package (uses dkms) + +* Reboot + +Post installation + +* Make sure your /etc/X11/xorg.conf settings are sane. + +Enjoy! + +Henrik Rydberg diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..2924291 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,6 @@ +hid-3m-pct-dkms (1.0.0-0ubuntu1) maverick; urgency=low + + * Fix problem with 3M touchscreen + + -- Henrik Rydberg Fri, 13 Aug 2010 17:32:59 +0100 + diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..7ed6ff8 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +5 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..ba90558 --- /dev/null +++ b/debian/control @@ -0,0 +1,13 @@ +Source: hid-3m-pct-dkms +Section: misc +Priority: optional +Maintainer: Henrik Rydberg +Build-Depends: debhelper (>= 5) +Standards-Version: 3.7.2 +Homepage: http://bitmath.org/code/hid-3m-pct-dkms/ + +Package: hid-3m-pct-dkms +Architecture: all +Depends: dkms (>= 1.95), bash (>> 1.99) +Description: HID 3M Multitouch screen support (DKMS) + This driver adds support for the 3M multitouch screens. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..7ee233d --- /dev/null +++ b/debian/copyright @@ -0,0 +1,28 @@ +The hid-3m-pct-dkms package was created using DKMS + +Source URL: http://bitmath.org/code/hid-3m-pct-dkms/ + +Upstream Author: Henrik Rydberg + +Copyright: + Copyright (C) 2010 Henrik Rydberg (rydberg@bitmath.org) + +License: + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +Packaging: + Copyright (C) 2010 by Henrik Rydberg + released under GPL 2 diff --git a/debian/dirs b/debian/dirs new file mode 100644 index 0000000..b601f22 --- /dev/null +++ b/debian/dirs @@ -0,0 +1 @@ +usr/src diff --git a/debian/postinst b/debian/postinst new file mode 100644 index 0000000..4d5043f --- /dev/null +++ b/debian/postinst @@ -0,0 +1,71 @@ +#!/bin/sh + +set -e + +NAME=hid-3m-pct +VERSION=1.0.0 + +case "$1" in + configure) + # Determine current arch / kernel + c_arch=`uname -m` + c_kern=`uname -r` + + if [ -e "/var/lib/dkms/$NAME/$VERSION" ]; then + echo "Removing old $NAME-$VERSION DKMS files..." + dkms remove -m $NAME -v $VERSION --all + fi + + echo "Loading new $NAME-$VERSION DKMS files..." + #dkms add -m $NAME -v $VERSION + dkms ldtarball --archive "/usr/src/$NAME-$VERSION.dkms.tar.gz" + rm -f "/usr/src/$NAME-$VERSION.dkms.tar.gz" + + echo "Installing prebuilt kernel module binaries (if any)" + set +e + IFS=' +' + for kern in `dkms status -m $NAME -v $VERSION -a $c_arch | grep ": built" | awk {'print $3'} | sed 's/,$//'`; do + echo "Trying kernel: $kern" + dkms install --force -m $NAME -v $VERSION -k $kern -a $c_arch + done + unset IFS + set -e + + # If none installed, install. + ##if [ `dkms status -m $NAME -v $VERSION -k $c_kern -a $c_arch | grep -c ": installed"` -eq 0 ]; then + dkms_status=`dkms status -m $NAME -v $VERSION -k $c_kern -a $c_arch` + if [ `echo $dkms_status | grep -c ": installed"` -eq 0 ]; then + if [ `echo $c_kern | grep -c "BOOT"` -eq 0 ] && [ -e "/lib/modules/$c_kern/build/include" ]; then + # Only build if we need to. + if [ `echo $dkms_status | grep -c ": built"` -eq 0 ]; then + echo "Building module..." + dkms build -m $NAME -v $VERSION + fi + echo "Installing module..." + dkms install -m $NAME -v $VERSION + elif [ `echo $c_kern | grep -c "BOOT"` -gt 0 ]; then + echo -e "" + echo -e "Module build for the currently running kernel was skipped since you" + echo -e "are running a BOOT variant of the kernel." + else + echo -e "" + echo -e "Module build for the currently running kernel was skipped since the" + echo -e "kernel source for this kernel does not seem to be installed." + fi + fi + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +#DEBHELPER# + +exit 0 + diff --git a/debian/postrm b/debian/postrm new file mode 100644 index 0000000..4b00926 --- /dev/null +++ b/debian/postrm @@ -0,0 +1,27 @@ +#!/bin/sh + +NAME=hid-3m-pct +VERSION=1.0.0 + +set -e + +case "$1" in + purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + moddir="/lib/modules/`uname -r`/kernel/" + depmod + if [ -d "/usr/src/$NAME-$VERSION" ]; then + echo "Removing old module source..." + rm -rf "/usr/src/$NAME-$VERSION" + fi + ;; + + *) + echo "postrm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +#DEBHELPER# + +exit 0 + diff --git a/debian/prerm b/debian/prerm new file mode 100644 index 0000000..3b2be24 --- /dev/null +++ b/debian/prerm @@ -0,0 +1,28 @@ +#!/bin/sh + +NAME=hid-3m-pct +VERSION=1.0.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 + +#DEBHELPER# + +exit 0 + + diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..03b35c8 --- /dev/null +++ b/debian/rules @@ -0,0 +1,53 @@ +#!/usr/bin/make -f +# -*- makefile -*- + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +NAME=hid-3m-pct +VERSION=1.0.0 + +configure: configure-stamp +configure-stamp: + dh_testdir + touch configure-stamp + + +build: build-stamp + +build-stamp: configure-stamp + dh_testdir + $(MAKE) + touch $@ + +clean: + dh_testdir + dh_testroot + rm -f build-stamp configure-stamp + -$(MAKE) clean + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + $(MAKE) DESTDIR=$(CURDIR)/debian/$(NAME)-dkms NAME=$(NAME) VERSION=$(VERSION) install + +binary-arch: build install + +binary-indep: build install + dh_testdir + dh_testroot + dh_link + dh_strip + dh_compress + dh_fixperms + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install configure -- cgit v1.2.3