summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
Diffstat (limited to 'debian')
-rw-r--r--debian/README.Debian12
-rw-r--r--debian/changelog25
-rw-r--r--debian/compat1
-rw-r--r--debian/control14
-rw-r--r--debian/copyright30
-rw-r--r--debian/dirs1
-rw-r--r--debian/postinst71
-rw-r--r--debian/postrm27
-rw-r--r--debian/prerm28
-rwxr-xr-xdebian/rules53
10 files changed, 262 insertions, 0 deletions
diff --git a/debian/README.Debian b/debian/README.Debian
new file mode 100644
index 0000000..a16b5e8
--- /dev/null
+++ b/debian/README.Debian
@@ -0,0 +1,12 @@
1applesmc DKMS module for Debian
2
3applesmc-dkms: This driver adds applesmc support for the latest
4intel-based Apple computers.
5
6* Install the debian package (uses dkms)
7
8* Reboot
9
10Enjoy!
11
12Henrik Rydberg <rydberg@euromail.se>
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..6586d19
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,25 @@
1applesmc-dkms (0.12.3) unstable; urgency=low
2
3 * Add support for iMac 6
4
5 -- Henrik Rydberg <rydberg@euromail.se> Sun, 09 Nov 2008 01:45:19 +0100
6
7applesmc-dkms (0.12.2) unstable; urgency=low
8
9 * Add support for MacBook 4
10
11 -- Henrik Rydberg <rydberg@euromail.se> Wed, 05 Nov 2008 22:06:56 +0100
12
13applesmc-dkms (0.12.1) unstable; urgency=low
14
15 * Add support for iMac 8
16
17 -- Henrik Rydberg <rydberg@euromail.se> Tue, 28 Oct 2008 21:11:07 +0100
18
19applesmc-dkms (0.11) unstable; urgency=low
20
21 * Add support for iMac 5
22 * Add support for new unibody MacBook 5,1
23 * Add support for new unibody MacBookPro 5,1
24
25 -- Henrik Rydberg <rydberg@euromail.se> Fri, 24 Oct 2008 11:38:10 +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..64e9c1c
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,14 @@
1Source: applesmc-dkms
2Section: misc
3Priority: optional
4Maintainer: Henrik Rydberg <rydberg@euromail.se>
5Build-Depends: debhelper (>= 5)
6Standards-Version: 3.7.2
7Homepage: http://web.comhem.se/rydberg/Bits/
8
9Package: applesmc-dkms
10Architecture: all
11Depends: dkms (>= 1.95), bash (>> 1.99)
12Description: Supplementary applesmc support
13 This driver adds applesmc support for the latest intel-based Apple
14 computers.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..28b7990
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,30 @@
1The applesmc-dkms package was created using DKMS <dkms-devel@dell.com>
2
3Source URL: http://web.comhem.se/rydberg/Bits/
4
5Upstream Author: Henrik Rydberg <rydberg@euromail.se>
6
7Copyright:
8 Copyright (C) 2008 Henrik Rydberg (rydberg@euromail.se)
9
10 See the applesmc.c kernel source for a full list of credits.
11
12License:
13
14 This program is free software; you can redistribute it and/or modify
15 it under the terms of the GNU General Public License as published by
16 the Free Software Foundation; either version 2 of the License, or
17 (at your option) any later version.
18
19 This program is distributed in the hope that it will be useful,
20 but WITHOUT ANY WARRANTY; without even the implied warranty of
21 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 GNU General Public License for more details.
23
24 You should have received a copy of the GNU General Public License
25 along with this program; if not, write to the Free Software
26 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
27
28Packaging:
29 Copyright (C) 2008 by Henrik Rydberg <rydberg@euromail.se>
30 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..4e33034
--- /dev/null
+++ b/debian/postinst
@@ -0,0 +1,71 @@
1#!/bin/sh
2
3set -e
4
5NAME=applesmc
6VERSION=0.12.3
7
8case "$1" in
9 configure)
10 # Determine current arch / kernel
11 c_arch=`uname -m`
12 c_kern=`uname -r`
13
14 if [ -e "/var/lib/dkms/$NAME/$VERSION" ]; then
15 echo "Removing old $NAME-$VERSION DKMS files..."
16 dkms remove -m $NAME -v $VERSION --all
17 fi
18
19 echo "Loading new $NAME-$VERSION DKMS files..."
20 #dkms add -m $NAME -v $VERSION
21 dkms ldtarball --archive "/usr/src/$NAME-$VERSION.dkms.tar.gz"
22 rm -f "/usr/src/$NAME-$VERSION.dkms.tar.gz"
23
24 echo "Installing prebuilt kernel module binaries (if any)"
25 set +e
26 IFS='
27'
28 for kern in `dkms status -m $NAME -v $VERSION -a $c_arch | grep ": built" | awk {'print $3'} | sed 's/,$//'`; do
29 echo "Trying kernel: $kern"
30 dkms install --force -m $NAME -v $VERSION -k $kern -a $c_arch
31 done
32 unset IFS
33 set -e
34
35 # If none installed, install.
36 ##if [ `dkms status -m $NAME -v $VERSION -k $c_kern -a $c_arch | grep -c ": installed"` -eq 0 ]; then
37 dkms_status=`dkms status -m $NAME -v $VERSION -k $c_kern -a $c_arch`
38 if [ `echo $dkms_status | grep -c ": installed"` -eq 0 ]; then
39 if [ `echo $c_kern | grep -c "BOOT"` -eq 0 ] && [ -e "/lib/modules/$c_kern/build/include" ]; then
40 # Only build if we need to.
41 if [ `echo $dkms_status | grep -c ": built"` -eq 0 ]; then
42 echo "Building module..."
43 dkms build -m $NAME -v $VERSION
44 fi
45 echo "Installing module..."
46 dkms install -m $NAME -v $VERSION
47 elif [ `echo $c_kern | grep -c "BOOT"` -gt 0 ]; then
48 echo -e ""
49 echo -e "Module build for the currently running kernel was skipped since you"
50 echo -e "are running a BOOT variant of the kernel."
51 else
52 echo -e ""
53 echo -e "Module build for the currently running kernel was skipped since the"
54 echo -e "kernel source for this kernel does not seem to be installed."
55 fi
56 fi
57 ;;
58
59 abort-upgrade|abort-remove|abort-deconfigure)
60 ;;
61
62 *)
63 echo "postinst called with unknown argument \`$1'" >&2
64 exit 1
65 ;;
66esac
67
68#DEBHELPER#
69
70exit 0
71
diff --git a/debian/postrm b/debian/postrm
new file mode 100644
index 0000000..98cbcc3
--- /dev/null
+++ b/debian/postrm
@@ -0,0 +1,27 @@
1#!/bin/sh
2
3NAME=applesmc
4VERSION=0.12.3
5
6set -e
7
8case "$1" in
9 purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
10 moddir="/lib/modules/`uname -r`/kernel/"
11 depmod
12 if [ -d "/usr/src/$NAME-$VERSION" ]; then
13 echo "Removing old module source..."
14 rm -rf "/usr/src/$NAME-$VERSION"
15 fi
16 ;;
17
18 *)
19 echo "postrm called with unknown argument \`$1'" >&2
20 exit 1
21 ;;
22esac
23
24#DEBHELPER#
25
26exit 0
27
diff --git a/debian/prerm b/debian/prerm
new file mode 100644
index 0000000..8bff368
--- /dev/null
+++ b/debian/prerm
@@ -0,0 +1,28 @@
1#!/bin/sh
2
3NAME=applesmc
4VERSION=0.12.3
5
6set -e
7
8case "$1" in
9 remove|upgrade|deconfigure)
10 if [ "`dkms status -m $NAME`" ]; then
11 dkms remove -m $NAME -v $VERSION --all
12 fi
13 ;;
14
15 failed-upgrade)
16 ;;
17
18 *)
19 echo "prerm called with unknown argument \`$1'" >&2
20 exit 1
21 ;;
22esac
23
24#DEBHELPER#
25
26exit 0
27
28
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..71f45eb
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,53 @@
1#!/usr/bin/make -f
2# -*- makefile -*-
3
4# Uncomment this to turn on verbose mode.
5#export DH_VERBOSE=1
6
7NAME=applesmc
8VERSION=0.12.3
9
10configure: configure-stamp
11configure-stamp:
12 dh_testdir
13 touch configure-stamp
14
15
16build: build-stamp
17
18build-stamp: configure-stamp
19 dh_testdir
20 $(MAKE)
21 touch $@
22
23clean:
24 dh_testdir
25 dh_testroot
26 rm -f build-stamp configure-stamp
27 -$(MAKE) clean
28 dh_clean
29
30install: build
31 dh_testdir
32 dh_testroot
33 dh_clean -k
34 dh_installdirs
35 $(MAKE) DESTDIR=$(CURDIR)/debian/$(NAME)-dkms NAME=$(NAME) VERSION=$(VERSION) install
36
37binary-arch: build install
38
39binary-indep: build install
40 dh_testdir
41 dh_testroot
42 dh_link
43 dh_strip
44 dh_compress
45 dh_fixperms
46 dh_installdeb
47 dh_shlibdeps
48 dh_gencontrol
49 dh_md5sums
50 dh_builddeb
51
52binary: binary-indep binary-arch
53.PHONY: build clean binary-indep binary-arch binary install configure