From eb8e529c4657c2e57e491ed8f38215708eed7fb5 Mon Sep 17 00:00:00 2001 From: Henrik Rydberg Date: Fri, 24 Oct 2008 23:53:30 +0200 Subject: Reorganize into a usable debian dkms package Signed-off-by: Henrik Rydberg --- debian/README.Debian | 23 +++++++ debian/changelog | 187 +++++++++++++++++++++++++++++++++++++++++++++++++++ debian/compat | 1 + debian/control | 16 +++++ debian/copyright | 41 +++++++++++ debian/dirs | 2 + debian/postinst | 71 +++++++++++++++++++ debian/postrm | 27 ++++++++ debian/prerm | 28 ++++++++ debian/rules | 53 +++++++++++++++ 10 files changed, 449 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..1fd7380 --- /dev/null +++ b/debian/README.Debian @@ -0,0 +1,23 @@ +bcm5974 DKMS module for Debian + +BCM5974: This driver adds support for the multitouch trackpad on the +new Apple Macbook Air and Macbook Pro Penryn laptops. It replaces the +appletouch driver on those computers, and integrates well with the +synaptics driver of the Xorg system. + +Known to work on Macbook Air and Macbook Pro Penryn. + +* Install the debian package (uses dkms) + +* Reboot + +Post installation + +* Make sure your /etc/X11/xorg.conf settings are sane. + +* If experiencing problems with your xorg settings, try the + bcm5974-diagnostics script (dkms installs the source under /usr/src/). + +Enjoy! + +Henrik Rydberg diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..fed1652 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,187 @@ +bcm5974-dkms (1.0) unstable; urgency=low + + * Add support for MacBookPro 5,1 (unibody) + * Distribute package at launchpad as version 1.0 + + -- Henrik Rydberg Fri, 24 Oct 2008 23:36:22 +0200 + +bcm5974-dkms (0.66) unstable; urgency=low + + * Add support for MacBook 5,1 (unibody) + + -- Henrik Rydberg Sun, 19 Oct 2008 17:23:26 +0200 + +bcm5974-dkms (0.65) unstable; urgency=low + + * Switch back to normal mode when closing + + -- Henrik Rydberg Sun, 14 Sep 2008 16:06:42 +0200 + +bcm5974-dkms (0.64) unstable; urgency=low + + * Finger counting improved further + + -- Henrik Rydberg Wed, 03 Sep 2008 21:58:38 +0200 + +bcm5974-dkms (0.63) unstable; urgency=low + + * Finger pressure hysteresis added + + -- Henrik Rydberg Wed, 03 Sep 2008 13:26:29 +0200 + +bcm5974-dkms (0.62) unstable; urgency=low + + * Compatibility mode reverted + * BTN_TOUCH event added for mousedev + + -- Henrik Rydberg Tue, 02 Sep 2008 20:46:51 +0200 + +bcm5974-dkms (0.61) unstable; urgency=low + + * Smoother motion in mouse interface + + -- Henrik Rydberg Mon, 01 Sep 2008 21:01:24 +0200 + +bcm5974-dkms (0.60) unstable; urgency=low + + * New default mouse driver mode + * Mouse configuration parameters + + -- Henrik Rydberg Mon, 01 Sep 2008 18:38:21 +0200 + +bcm5974-dkms (0.59) unstable; urgency=low + + * Cleanup patch from Dmitry Torokhov + * Auto-suspend patch from Dmitry Torokhov + + -- Henrik Rydberg Fri, 25 Jul 2008 20:14:05 +0200 + +bcm5974-dkms (0.58) unstable; urgency=low + + * Name changes; use usbhid definitions, rename atp to bcm5974 + * Input syncing moved to report functions, event type setup broken out + * Traffic functions added for open/close and suspend/resume logic + * Open/close and suspend/resume transition logic corrected + * Open/close serialized with respect to suspend/resume + + -- Henrik Rydberg Wed, 23 Jul 2008 02:20:10 +0200 + +bcm5974-dkms (0.57) unstable; urgency=low + + * Keep reset_resume around + * Submitted to kernel.org + + -- Henrik Rydberg Sat, 19 Jul 2008 01:42:52 +0200 + +bcm5974-dkms (0.56) unstable; urgency=low + + * Leave device initialization to hid; use mode-switch only + * Mode switch moved to atp_open and simplified + * Corrected cleanup action in atp_open + * Simplified control package detection + * Removed reset_resume, pre_reset, post_reset; not needed + + -- Henrik Rydberg Fri, 18 Jul 2008 02:42:52 +0200 + +bcm5974-dkms (0.55) unstable; urgency=low + + * Package updates. + * Reverting GFP_ATOMIC for irq handlers. + + -- Henrik Rydberg Wed, 09 Jul 2008 20:59:39 +0200 + +bcm5974-dkms (0.54) unstable; urgency=low + + * And another one... finally got the bright idea to test it by + emulating the different product ids. + + -- Henrik Rydberg Tue, 08 Jul 2008 20:59:39 +0200 + +bcm5974-dkms (0.53) unstable; urgency=low + + * Another typo in the post-install script. + + -- Henrik Rydberg Mon, 07 Jul 2008 20:59:39 +0200 + +bcm5974-dkms (0.52) unstable; urgency=low + + * Typo in the post-install script. + + -- Henrik Rydberg Mon, 07 Jul 2008 20:09:39 +0200 + +bcm5974-dkms (0.51) unstable; urgency=low + + * Fine-tuned signal-to-noise ratio, smoother mouse motion. + * Interrupt code got minor simplifications. + * GFP_ATOMIC completetly removed. + + -- Henrik Rydberg Mon, 07 Jul 2008 18:09:39 +0200 + +bcm5974-dkms (0.5) unstable; urgency=low + + * Working palm detection + * Changes for kernel.org + * DKMS introduced. + + -- Henrik Rydberg Sun, 06 Jul 2008 20:59:39 +0200 + +bcm5974-dkms (0.42) unstable; urgency=low + + * First button click registered. + * Hooks pre/post-reset added. + + -- Henrik Rydberg Tue, 01 Jul 2008 20:59:39 +0200 + +bcm5974-dkms (0.41) unstable; urgency=low + + * The reset_resume kernel function added. + + -- Henrik Rydberg Sun, 29 Jun 2008 20:59:39 +0200 + +bcm5974-dkms (0.4) unstable; urgency=low + + * Both finger pressure and width reported. + + -- Henrik Rydberg Sun, 29 Jun 2008 18:59:39 +0200 + +bcm5974-dkms (0.31) unstable; urgency=low + + * Administrative changes for kernel.org. + + -- Henrik Rydberg Fri, 27 Jun 2008 20:59:39 +0200 + +bcm5974-dkms (0.3) unstable; urgency=low + + * Explicit device structure, use all packages. + + -- Henrik Rydberg Fri, 27 Jun 2008 18:59:39 +0200 + +bcm5974-dkms (0.23) unstable; urgency=low + + * Finger release not reported properly. + + -- Henrik Rydberg Fri, 27 Jun 2008 17:59:39 +0200 + +bcm5974-dkms (0.22) unstable; urgency=low + + * ABS coordinates more stable with synaptics. + + -- Henrik Rydberg Thu, 26 Jun 2008 20:59:39 +0200 + +bcm5974-dkms (0.21) unstable; urgency=low + + * Fixed the relative coordinate scaling. + + -- Henrik Rydberg Wed, 25 Jun 2008 20:59:39 +0200 + +bcm5974-dkms (0.2) unstable; urgency=low + + * Misinterpreted pressure input, noise reduction. + + -- Henrik Rydberg Wed, 25 Jun 2008 20:59:39 +0200 + +bcm5974-dkms (0.1) unstable; urgency=low + + * First version. + + -- Henrik Rydberg Tue, 24 Jun 2008 20:59:39 +0200 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..07c8bcb --- /dev/null +++ b/debian/control @@ -0,0 +1,16 @@ +Source: bcm5974-dkms +Section: misc +Priority: optional +Maintainer: Henrik Rydberg +Build-Depends: debhelper (>= 5) +Standards-Version: 3.7.2 +Homepage: http://web.comhem.se/rydberg/Bits/ + +Package: bcm5974-dkms +Architecture: all +Depends: dkms (>= 1.95), bash (>> 1.99) +Description: Apple USB BCM5974 Multitouch trackpad support (DKMS) + This driver adds support for the multitouch trackpad on the new + Apple Macbook Air and Macbook Pro Penryn laptops. It replaces the + appletouch driver on those computers, and integrates well with the + synaptics driver of the Xorg system. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..e00b447 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,41 @@ +The bcm5974-dkms package was created using DKMS + +Source URL: http://web.comhem.se/rydberg/Bits/ + +Upstream Author: Henrik Rydberg + +Copyright: + Copyright (C) 2008 Henrik Rydberg (rydberg@euromail.se) + + The USB initialization and package decoding was made by + Scott Shawcroft as part of the touchd user-space driver project: + Copyright (C) 2008 Scott Shawcroft (scott.shawcroft@gmail.com) + + The BCM5974 driver is based on the appletouch driver: + Copyright (C) 2001-2004 Greg Kroah-Hartman (greg@kroah.com) + Copyright (C) 2005 Johannes Berg (johannes@sipsolutions.net) + Copyright (C) 2005 Stelian Pop (stelian@popies.net) + Copyright (C) 2005 Frank Arnold (frank@scirocco-5v-turbo.de) + Copyright (C) 2005 Peter Osterlund (petero2@telia.com) + Copyright (C) 2005 Michael Hanselmann (linux-kernel@hansmi.ch) + Copyright (C) 2006 Nicolas Boichat (nicolas@boichat.ch) + +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) 2008 by Henrik Rydberg + released under GPL 2 diff --git a/debian/dirs b/debian/dirs new file mode 100644 index 0000000..fee20a1 --- /dev/null +++ b/debian/dirs @@ -0,0 +1,2 @@ +etc/modprobe.d +usr/src diff --git a/debian/postinst b/debian/postinst new file mode 100644 index 0000000..3bc6c41 --- /dev/null +++ b/debian/postinst @@ -0,0 +1,71 @@ +#!/bin/sh + +set -e + +NAME=bcm5974 +VERSION=0.99 + +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..9a4ef29 --- /dev/null +++ b/debian/postrm @@ -0,0 +1,27 @@ +#!/bin/sh + +NAME=bcm5974 +VERSION=0.99 + +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..7c34eaa --- /dev/null +++ b/debian/prerm @@ -0,0 +1,28 @@ +#!/bin/sh + +NAME=bcm5974 +VERSION=0.99 + +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..649ebba --- /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=bcm5974 +VERSION=0.99 + +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