]> Frank Brehm's Git Trees - config/lena/etc.git/commitdiff
committing changes in /etc after apt run
authorFrank Brehm <frank@brehm-online.com>
Wed, 7 Jun 2017 20:45:38 +0000 (22:45 +0200)
committerFrank Brehm <frank@brehm-online.com>
Wed, 7 Jun 2017 20:45:38 +0000 (22:45 +0200)
Package changes:
+dkms 2.3-2 all

25 files changed:
.etckeeper
bash_completion.d/dkms [new file with mode: 0644]
dkms/framework.conf [new file with mode: 0644]
dkms/template-dkms-mkbmdeb/Makefile [new file with mode: 0644]
dkms/template-dkms-mkbmdeb/debian/README.Debian [new file with mode: 0644]
dkms/template-dkms-mkbmdeb/debian/changelog [new file with mode: 0644]
dkms/template-dkms-mkbmdeb/debian/compat [new file with mode: 0644]
dkms/template-dkms-mkbmdeb/debian/control [new file with mode: 0644]
dkms/template-dkms-mkbmdeb/debian/copyright [new file with mode: 0644]
dkms/template-dkms-mkbmdeb/debian/rules [new file with mode: 0755]
dkms/template-dkms-mkdeb/Makefile [new file with mode: 0644]
dkms/template-dkms-mkdeb/debian/README.Debian [new file with mode: 0644]
dkms/template-dkms-mkdeb/debian/changelog [new file with mode: 0644]
dkms/template-dkms-mkdeb/debian/compat [new file with mode: 0644]
dkms/template-dkms-mkdeb/debian/control [new file with mode: 0644]
dkms/template-dkms-mkdeb/debian/copyright [new file with mode: 0644]
dkms/template-dkms-mkdeb/debian/dirs [new file with mode: 0644]
dkms/template-dkms-mkdeb/debian/postinst [new file with mode: 0755]
dkms/template-dkms-mkdeb/debian/prerm [new file with mode: 0755]
dkms/template-dkms-mkdeb/debian/rules [new file with mode: 0755]
dkms/template-dkms-mkdsc [new symlink]
kernel/header_postinst.d/dkms [new file with mode: 0755]
kernel/postinst.d/dkms [new file with mode: 0755]
kernel/prerm.d/dkms [new file with mode: 0755]
modprobe.d/dkms.conf [new file with mode: 0644]

index 39ae7eba95481894998b483becba37036e930e0c..f63e328a79a545e6db2ccc1dbf78c24f8d12b50e 100755 (executable)
@@ -21,7 +21,6 @@ mkdir -p './insserv.conf.d'
 mkdir -p './insserv/overrides'
 mkdir -p './kernel/install.d'
 mkdir -p './kernel/signed_postinst.d'
-mkdir -p './modprobe.d'
 mkdir -p './network/if-pre-up.d'
 mkdir -p './network/interfaces.d'
 mkdir -p './opt'
@@ -95,6 +94,7 @@ maybe chmod 0640 'at.deny'
 maybe chmod 0644 'bash.bashrc'
 maybe chmod 0644 'bash_completion'
 maybe chmod 0755 'bash_completion.d'
+maybe chmod 0644 'bash_completion.d/dkms'
 maybe chmod 0644 'bash_completion.d/dlocate-completion'
 maybe chmod 0644 'bash_completion.d/git-prompt'
 maybe chmod 0644 'bash_completion.d/grub'
@@ -226,6 +226,29 @@ maybe chmod 0755 'dictionaries-common'
 maybe chmod 0644 'discover-modprobe.conf'
 maybe chmod 0755 'discover.conf.d'
 maybe chmod 0644 'discover.conf.d/00discover'
+maybe chmod 0755 'dkms'
+maybe chmod 0644 'dkms/framework.conf'
+maybe chmod 0755 'dkms/template-dkms-mkbmdeb'
+maybe chmod 0644 'dkms/template-dkms-mkbmdeb/Makefile'
+maybe chmod 0755 'dkms/template-dkms-mkbmdeb/debian'
+maybe chmod 0644 'dkms/template-dkms-mkbmdeb/debian/README.Debian'
+maybe chmod 0644 'dkms/template-dkms-mkbmdeb/debian/changelog'
+maybe chmod 0644 'dkms/template-dkms-mkbmdeb/debian/compat'
+maybe chmod 0644 'dkms/template-dkms-mkbmdeb/debian/control'
+maybe chmod 0644 'dkms/template-dkms-mkbmdeb/debian/copyright'
+maybe chmod 0755 'dkms/template-dkms-mkbmdeb/debian/rules'
+maybe chmod 0755 'dkms/template-dkms-mkdeb'
+maybe chmod 0644 'dkms/template-dkms-mkdeb/Makefile'
+maybe chmod 0755 'dkms/template-dkms-mkdeb/debian'
+maybe chmod 0644 'dkms/template-dkms-mkdeb/debian/README.Debian'
+maybe chmod 0644 'dkms/template-dkms-mkdeb/debian/changelog'
+maybe chmod 0644 'dkms/template-dkms-mkdeb/debian/compat'
+maybe chmod 0644 'dkms/template-dkms-mkdeb/debian/control'
+maybe chmod 0644 'dkms/template-dkms-mkdeb/debian/copyright'
+maybe chmod 0644 'dkms/template-dkms-mkdeb/debian/dirs'
+maybe chmod 0755 'dkms/template-dkms-mkdeb/debian/postinst'
+maybe chmod 0755 'dkms/template-dkms-mkdeb/debian/prerm'
+maybe chmod 0755 'dkms/template-dkms-mkdeb/debian/rules'
 maybe chmod 0755 'dpkg'
 maybe chmod 0644 'dpkg/dpkg.cfg'
 maybe chmod 0755 'dpkg/dpkg.cfg.d'
@@ -429,14 +452,19 @@ maybe chmod 0644 'issue'
 maybe chmod 0644 'issue.net'
 maybe chmod 0755 'kernel'
 maybe chmod 0644 'kernel-img.conf'
+maybe chmod 0755 'kernel/header_postinst.d'
+maybe chmod 0755 'kernel/header_postinst.d/dkms'
 maybe chmod 0755 'kernel/install.d'
 maybe chmod 0755 'kernel/postinst.d'
 maybe chmod 0755 'kernel/postinst.d/apt-auto-removal'
+maybe chmod 0755 'kernel/postinst.d/dkms'
 maybe chmod 0755 'kernel/postinst.d/initramfs-tools'
 maybe chmod 0755 'kernel/postinst.d/zz-update-grub'
 maybe chmod 0755 'kernel/postrm.d'
 maybe chmod 0755 'kernel/postrm.d/initramfs-tools'
 maybe chmod 0755 'kernel/postrm.d/zz-update-grub'
+maybe chmod 0755 'kernel/prerm.d'
+maybe chmod 0755 'kernel/prerm.d/dkms'
 maybe chmod 0755 'kernel/signed_postinst.d'
 maybe chmod 0644 'ld.so.conf'
 maybe chmod 0755 'ld.so.conf.d'
@@ -489,6 +517,7 @@ maybe chmod 0644 'manpath.config'
 maybe chmod 0644 'mime.types'
 maybe chmod 0644 'mke2fs.conf'
 maybe chmod 0755 'modprobe.d'
+maybe chmod 0644 'modprobe.d/dkms.conf'
 maybe chmod 0644 'modules'
 maybe chmod 0755 'modules-load.d'
 maybe chmod 0644 'motd.tail'
diff --git a/bash_completion.d/dkms b/bash_completion.d/dkms
new file mode 100644 (file)
index 0000000..cbc619a
--- /dev/null
@@ -0,0 +1,119 @@
+# bash completion for dkms
+# Copied from the Mandriva dkms package
+
+# This function complete on available kernels
+#
+_kernels()
+{
+        COMPREPLY=( $( cd /lib/modules && compgen -d -- "$cur" ) )
+}
+
+# complete on full directory names under $1
+_subdirectories()
+{
+       COMPREPLY=( $( cd $1 && compgen -d -- "$cur" ) )
+}
+
+# complete on $2 part of filenames matching pattern $1 under /usr/src
+_filename_parts()
+{
+       COMPREPLY=( $( command ls -F /usr/src/ 2>/dev/null | grep -E '^'$1'/$' \
+               | sed -r -e 's/^([^-]+)-(.+)\/$/\'$2'/' | grep "^$cur" ) )
+}
+
+_dkms()
+{
+       local cur prev command module i
+
+       COMPREPLY=()
+       cur=${COMP_WORDS[COMP_CWORD]}
+
+       if [[ $COMP_CWORD -eq 1 ]] ; then
+               COMPREPLY=( $( compgen -W "add autoinstall remove build install uninstall \
+                       match mkdriverdisk mktarball ldtarball mkrpm mkdeb mkdsc mkkmp \
+                       status" -- $cur ) )
+       else
+
+               prev=${COMP_WORDS[COMP_CWORD-1]}
+               command=${COMP_WORDS[1]}
+               case $prev in
+                       -m)
+                               if [ "$command" = 'add' ]; then
+                                       _filename_parts '.*-.*' 1
+                               else
+                                       _subdirectories /var/lib/dkms
+                               fi
+                               return 0
+                               ;;
+                       -v)
+                               for (( i=1; i < COMP_CWORD; i++ )); do
+                                       if [[ "${COMP_WORDS[i]}" == -m ]]; then
+                                               module=${COMP_WORDS[i+1]}
+                                               break
+                                       fi
+                               done
+                               if [ -n "$module" ]; then
+                                       if [ "$command" = 'add' ]; then
+                                               _filename_parts "$module-.*" 2
+                                       else
+                                               _subdirectories /var/lib/dkms/$module
+                                       fi
+                                       return 0
+                               fi
+                               ;;
+                       -k)
+                               _kernels
+                               return 0
+                               ;;
+                       -@\(c|-spec|-archive|-config\))
+                               _filedir
+                               return 0
+                               ;;
+                       --kernelsourcedir)
+                               _filedir -d
+                               return 0
+                               ;;
+               esac
+
+
+               if [[ "$cur" == -* ]]; then
+                       case $command in
+                               add)
+                                       options='-c --rpm_safe_upgrade'
+                                       ;;
+                               remove)
+                                       options='--rpm_safe_upgrade'
+                                       ;;
+                               build)
+                                       options='--config'
+                                       ;;
+                               mkdriverdisk)
+                                       options='-d --distro -r --release --size'
+                                       ;;
+                               ldtarball)
+                                       options='--archive --force'
+                                       ;;
+                               mktarball)
+                                       options='--source-only --binaries-only'
+                                       ;;
+                               mkrpm)
+                                       options='--source-only'
+                                       ;;
+                               mkkmp)
+                                       options='--spec'
+                                       ;;
+                               match)
+                                       options='--templatekernel'
+                                       ;;
+                       esac
+
+                       options="$options -m -v -k -a --arch -q --quiet -V \
+                               --version --all --no-prepare-kernel \
+                               --no-clean-kernel --kernelsourcedir \
+                               --directive"
+
+                       COMPREPLY=( $( compgen -W "$options" -- $cur ) )
+               fi
+       fi
+}
+complete -F _dkms dkms
diff --git a/dkms/framework.conf b/dkms/framework.conf
new file mode 100644 (file)
index 0000000..852f3b7
--- /dev/null
@@ -0,0 +1,28 @@
+## This configuration file modifies the behavior of
+## DKMS (Dynamic Kernel Module Support) and is sourced
+## in by DKMS every time it is run.
+
+## Source Tree Location (default: /usr/src)
+# source_tree="/usr/src"
+
+## DKMS Tree Location (default: /var/lib/dkms)
+# dkms_tree="/var/lib/dkms"
+
+## Install Tree Location (default: /lib/modules)
+# install_tree="/lib/modules"
+
+## tmp Location (default: /tmp)
+# tmp_location="/tmp"
+
+## verbosity setting (verbose will be active if you set it to a non-null value)
+# verbose=""
+
+## symlink kernel modules (will be active if you set it to a non-null value)
+## This creates symlinks from the install_tree into the dkms_tree instead of
+## copying the modules. This preserves some space on the costs of being less
+## safe.
+# symlink_modules=""
+
+## Automatic installation and upgrade for all installed kernels (if set to a
+## non-null value)
+# autoinstall_all_kernels=""
diff --git a/dkms/template-dkms-mkbmdeb/Makefile b/dkms/template-dkms-mkbmdeb/Makefile
new file mode 100644 (file)
index 0000000..210b998
--- /dev/null
@@ -0,0 +1,18 @@
+#/usr/bin/make
+SRC = $(DESTDIR)/usr/src
+SHARE = $(DESTDIR)/usr/share/$(NAME)-dkms
+
+all:
+
+clean:
+
+install:
+
+#tarball, possibly with binaries
+ifeq ("$(wildcard $(NAME)-$(VERSION).dkms.tar.gz)", "$(NAME)-$(VERSION).dkms.tar.gz")
+       tar zxvf "$(NAME)-$(VERSION).dkms.tar.gz"
+       install -d "$(DESTDIR)/lib/modules/$(KVER)/updates/dkms/"
+       install -m 644 dkms_main_tree/$(KVER)/$(KARCH)/module/*.ko "$(DESTDIR)/lib/modules/$(KVER)/updates/dkms/"
+       rm -rf dkms_main_tree/ dkms_binaries_only/
+endif
+
diff --git a/dkms/template-dkms-mkbmdeb/debian/README.Debian b/dkms/template-dkms-mkbmdeb/debian/README.Debian
new file mode 100644 (file)
index 0000000..f8495d9
--- /dev/null
@@ -0,0 +1,5 @@
+MODULE_NAME DKMS module for Debian
+
+This package was automatically generated by the DKMS system,
+for distribution on Debian based operating systems.
+
diff --git a/dkms/template-dkms-mkbmdeb/debian/changelog b/dkms/template-dkms-mkbmdeb/debian/changelog
new file mode 100644 (file)
index 0000000..b6cc91d
--- /dev/null
@@ -0,0 +1,6 @@
+DEBIAN_PACKAGE-dkms-bin (MODULE_VERSION) stable; urgency=low
+
+  * Automatically packaged by DKMS.
+
+ -- Dynamic Kernel Modules Support Team <pkg-dkms-maint@lists.alioth.debian.org>  DATE_STAMP
+
diff --git a/dkms/template-dkms-mkbmdeb/debian/compat b/dkms/template-dkms-mkbmdeb/debian/compat
new file mode 100644 (file)
index 0000000..7f8f011
--- /dev/null
@@ -0,0 +1 @@
+7
diff --git a/dkms/template-dkms-mkbmdeb/debian/control b/dkms/template-dkms-mkbmdeb/debian/control
new file mode 100644 (file)
index 0000000..ef23975
--- /dev/null
@@ -0,0 +1,14 @@
+Source: DEBIAN_PACKAGE-dkms-bin
+Section: misc
+Priority: optional
+Maintainer: Dynamic Kernel Modules Support Team <pkg-dkms-maint@lists.alioth.debian.org>
+Build-Depends: debhelper (>= 7), dkms
+Standards-Version: 3.8.1
+
+Package: DEBIAN_PACKAGE-modules-KERNEL_VERSION
+Architecture: DEBIAN_BUILD_ARCH
+Depends: ${misc:Depends}, linux-image-KERNEL_VERSION
+Provides: DEBIAN_PACKAGE-modules
+Description: DEBIAN_PACKAGE binary drivers for linux-image-KERNEL_VERSION
+ This package contains DEBIAN_PACKAGE drivers for the KERNEL_VERSION Linux kernel,
+ built from DEBIAN_PACKAGE-dkms for the DEBIAN_BUILD_ARCH architecture.
diff --git a/dkms/template-dkms-mkbmdeb/debian/copyright b/dkms/template-dkms-mkbmdeb/debian/copyright
new file mode 100644 (file)
index 0000000..ad983f3
--- /dev/null
@@ -0,0 +1,2 @@
+
+This copyright has not been completed by the author of this package.
diff --git a/dkms/template-dkms-mkbmdeb/debian/rules b/dkms/template-dkms-mkbmdeb/debian/rules
new file mode 100755 (executable)
index 0000000..5cd0731
--- /dev/null
@@ -0,0 +1,58 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+DEB_NAME=DEBIAN_PACKAGE
+NAME=MODULE_NAME
+VERSION=MODULE_VERSION
+KVER=KERNEL_VERSION
+
+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_prep
+       dh_installdirs
+       $(MAKE) DESTDIR=$(CURDIR)/debian/$(DEB_NAME)-modules-$(KVER) NAME=$(NAME) VERSION=$(VERSION) install
+
+binary-arch: build install
+
+binary-indep: build install
+       dh_testdir
+       dh_testroot
+       dh_link
+       dh_strip
+       dh_compress
+       dh_installmodules
+       dh_installdocs
+       dh_installchangelogs
+       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
diff --git a/dkms/template-dkms-mkdeb/Makefile b/dkms/template-dkms-mkdeb/Makefile
new file mode 100644 (file)
index 0000000..57e13d8
--- /dev/null
@@ -0,0 +1,28 @@
+#/usr/bin/make
+SRC = $(DESTDIR)/usr/src
+SHARE = $(DESTDIR)/usr/share/$(NAME)-dkms
+
+all:
+
+clean:
+
+install:
+
+#source tree
+ifeq ("$(wildcard $(NAME)-$(VERSION))", "$(NAME)-$(VERSION)")
+       install -d "$(SRC)"
+       cp -a $(NAME)-$(VERSION) $(SRC)
+       chmod 644 -R "$(SRC)/$(NAME)-$(VERSION)"
+endif
+
+#tarball, possibly with binaries
+ifeq ("$(wildcard $(NAME)-$(VERSION).dkms.tar.gz)", "$(NAME)-$(VERSION).dkms.tar.gz")
+       install -d "$(SHARE)"
+       install -m 644 $(NAME)-$(VERSION).dkms.tar.gz "$(SHARE)"
+endif
+
+#postinst, only if we are supporting legacy mode
+ifeq ("$(wildcard common.postinst)", "common.postinst")
+       install -d "$(SHARE)"
+       install -m 755 $(PREFIX)/usr/lib/dkms/common.postinst $(SHARE)/postinst
+endif
diff --git a/dkms/template-dkms-mkdeb/debian/README.Debian b/dkms/template-dkms-mkdeb/debian/README.Debian
new file mode 100644 (file)
index 0000000..f8495d9
--- /dev/null
@@ -0,0 +1,5 @@
+MODULE_NAME DKMS module for Debian
+
+This package was automatically generated by the DKMS system,
+for distribution on Debian based operating systems.
+
diff --git a/dkms/template-dkms-mkdeb/debian/changelog b/dkms/template-dkms-mkdeb/debian/changelog
new file mode 100644 (file)
index 0000000..2434da0
--- /dev/null
@@ -0,0 +1,6 @@
+DEBIAN_PACKAGE-dkms (MODULE_VERSION) stable; urgency=low
+
+  * Automatically packaged by DKMS.
+
+ -- Dynamic Kernel Modules Support Team <pkg-dkms-maint@lists.alioth.debian.org>  DATE_STAMP
+
diff --git a/dkms/template-dkms-mkdeb/debian/compat b/dkms/template-dkms-mkdeb/debian/compat
new file mode 100644 (file)
index 0000000..7f8f011
--- /dev/null
@@ -0,0 +1 @@
+7
diff --git a/dkms/template-dkms-mkdeb/debian/control b/dkms/template-dkms-mkdeb/debian/control
new file mode 100644 (file)
index 0000000..e561c00
--- /dev/null
@@ -0,0 +1,11 @@
+Source: DEBIAN_PACKAGE-dkms
+Section: misc
+Priority: optional
+Maintainer: Dynamic Kernel Modules Support Team <pkg-dkms-maint@lists.alioth.debian.org>
+Build-Depends: debhelper (>= 7), dkms
+Standards-Version: 3.8.1
+
+Package: DEBIAN_PACKAGE-dkms
+Architecture: all
+Depends: dkms (>= 1.95), ${misc:Depends}
+Description: DEBIAN_PACKAGE driver in DKMS format.
diff --git a/dkms/template-dkms-mkdeb/debian/copyright b/dkms/template-dkms-mkdeb/debian/copyright
new file mode 100644 (file)
index 0000000..ad983f3
--- /dev/null
@@ -0,0 +1,2 @@
+
+This copyright has not been completed by the author of this package.
diff --git a/dkms/template-dkms-mkdeb/debian/dirs b/dkms/template-dkms-mkdeb/debian/dirs
new file mode 100644 (file)
index 0000000..b601f22
--- /dev/null
@@ -0,0 +1 @@
+usr/src
diff --git a/dkms/template-dkms-mkdeb/debian/postinst b/dkms/template-dkms-mkdeb/debian/postinst
new file mode 100755 (executable)
index 0000000..c4ad0da
--- /dev/null
@@ -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=MODULE_NAME
+PACKAGE_NAME=$NAME-dkms
+DEB_NAME=$(echo $PACKAGE_NAME | sed 's,_,-,')
+CVERSION=`dpkg-query -W -f='${Version}' $DEB_NAME | awk -F "-" '{print $1}' | cut -d\: -f2`
+ARCH=`dpkg --print-architecture`
+
+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.
+
+#DEBHELPER#
+
+exit 0
diff --git a/dkms/template-dkms-mkdeb/debian/prerm b/dkms/template-dkms-mkdeb/debian/prerm
new file mode 100755 (executable)
index 0000000..f42d293
--- /dev/null
@@ -0,0 +1,28 @@
+#!/bin/sh
+
+NAME=MODULE_NAME
+VERSION=MODULE_VERSION
+
+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/dkms/template-dkms-mkdeb/debian/rules b/dkms/template-dkms-mkdeb/debian/rules
new file mode 100755 (executable)
index 0000000..7426e58
--- /dev/null
@@ -0,0 +1,54 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+DEB_NAME=DEBIAN_PACKAGE
+NAME=MODULE_NAME
+VERSION=MODULE_VERSION
+
+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_prep
+       dh_installdirs
+       $(MAKE) DESTDIR=$(CURDIR)/debian/$(DEB_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
diff --git a/dkms/template-dkms-mkdsc b/dkms/template-dkms-mkdsc
new file mode 120000 (symlink)
index 0000000..7b79121
--- /dev/null
@@ -0,0 +1 @@
+template-dkms-mkdeb
\ No newline at end of file
diff --git a/kernel/header_postinst.d/dkms b/kernel/header_postinst.d/dkms
new file mode 100755 (executable)
index 0000000..3752bee
--- /dev/null
@@ -0,0 +1,46 @@
+#!/bin/bash
+
+# We're passed the version of the kernel being installed
+inst_kern=$1
+
+uname_s=$(uname -s)
+
+_get_kernel_dir() {
+    KVER=$1
+    case ${uname_s} in
+       Linux)          DIR="/lib/modules/$KVER/build" ;;
+       GNU/kFreeBSD)   DIR="/usr/src/kfreebsd-headers-$KVER/sys" ;;
+    esac
+    echo $DIR
+}
+
+_check_kernel_dir() {
+    DIR=$(_get_kernel_dir $1)
+    case ${uname_s} in
+       Linux)          test -e $DIR/include ;;
+       GNU/kFreeBSD)   test -e $DIR/kern && test -e $DIR/conf/kmod.mk ;;
+       *)              return 1 ;;
+    esac
+    return $?
+}
+
+case "${uname_s}" in
+    Linux)
+        header_pkg="linux-headers-$inst_kern"
+        kernel="Linux"
+    ;;
+    GNU/kFreeBSD)
+        header_pkg="kfreebsd-headers-$inst_kern"
+        kernel="kFreeBSD"
+    ;;
+esac
+
+if [ -x /usr/lib/dkms/dkms_autoinstaller ]; then
+    exec /usr/lib/dkms/dkms_autoinstaller start $inst_kern > /dev/null
+fi
+
+if ! _check_kernel_dir $inst_kern ; then
+    echo "dkms: WARNING: $kernel headers are missing, which may explain the above failures." >&2
+    echo "      please install the $header_pkg package to fix this." >&2
+fi
+
diff --git a/kernel/postinst.d/dkms b/kernel/postinst.d/dkms
new file mode 100755 (executable)
index 0000000..3752bee
--- /dev/null
@@ -0,0 +1,46 @@
+#!/bin/bash
+
+# We're passed the version of the kernel being installed
+inst_kern=$1
+
+uname_s=$(uname -s)
+
+_get_kernel_dir() {
+    KVER=$1
+    case ${uname_s} in
+       Linux)          DIR="/lib/modules/$KVER/build" ;;
+       GNU/kFreeBSD)   DIR="/usr/src/kfreebsd-headers-$KVER/sys" ;;
+    esac
+    echo $DIR
+}
+
+_check_kernel_dir() {
+    DIR=$(_get_kernel_dir $1)
+    case ${uname_s} in
+       Linux)          test -e $DIR/include ;;
+       GNU/kFreeBSD)   test -e $DIR/kern && test -e $DIR/conf/kmod.mk ;;
+       *)              return 1 ;;
+    esac
+    return $?
+}
+
+case "${uname_s}" in
+    Linux)
+        header_pkg="linux-headers-$inst_kern"
+        kernel="Linux"
+    ;;
+    GNU/kFreeBSD)
+        header_pkg="kfreebsd-headers-$inst_kern"
+        kernel="kFreeBSD"
+    ;;
+esac
+
+if [ -x /usr/lib/dkms/dkms_autoinstaller ]; then
+    exec /usr/lib/dkms/dkms_autoinstaller start $inst_kern > /dev/null
+fi
+
+if ! _check_kernel_dir $inst_kern ; then
+    echo "dkms: WARNING: $kernel headers are missing, which may explain the above failures." >&2
+    echo "      please install the $header_pkg package to fix this." >&2
+fi
+
diff --git a/kernel/prerm.d/dkms b/kernel/prerm.d/dkms
new file mode 100755 (executable)
index 0000000..19dfd63
--- /dev/null
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+# We're passed the version of the kernel being installed
+inst_kern=$1
+
+if [ -x /usr/sbin/dkms ]; then
+while read line; do
+   name=`echo "$line" | awk '{print $1}' | sed 's/,$//'`
+   vers=`echo "$line" | awk '{print $2}' | sed 's/,$//'`
+   arch=`echo "$line" | awk '{print $4}' | sed 's/:$//'`
+   echo "dkms: removing: $name $vers ($inst_kern) ($arch)" >&2
+   dkms remove -m $name -v $vers -k $inst_kern -a $arch
+done < <(dkms status -k $inst_kern 2>/dev/null | grep ": installed")
+fi
+
+rmdir --ignore-fail-on-non-empty \
+       "/lib/modules/$inst_kern/updates/dkms" \
+       "/lib/modules/$inst_kern/updates" 2>/dev/null
+
+exit 0
diff --git a/modprobe.d/dkms.conf b/modprobe.d/dkms.conf
new file mode 100644 (file)
index 0000000..508b7f4
--- /dev/null
@@ -0,0 +1,4 @@
+# modprobe information used for DKMS modules
+#
+# This is a stub file, should be edited when needed,
+# used by default by DKMS.