From 0c30dfae814458ad81e23267b5c9fa284035a6ee Mon Sep 17 00:00:00 2001 From: Julien Valroff Date: Sat, 25 Jun 2011 07:52:22 +0200 Subject: [PATCH] Add -dkms Debian package and various packaging improvements --- debian/README.Debian | 3 +- debian/changelog | 7 ++- debian/compat | 2 +- debian/control | 69 ++++++++++++++++++++++++---- debian/control.modules.in | 9 ++-- debian/dkms.conf.in | 7 +++ debian/omnibook-dkms.install.in | 4 ++ debian/omnibook-dkms.postinst | 18 ++++++++ debian/omnibook-dkms.prerm | 14 ++++++ debian/patches/01_disable-debug.diff | 0 debian/rules | 31 ++----------- debian/watch | 1 - 12 files changed, 119 insertions(+), 46 deletions(-) create mode 100644 debian/dkms.conf.in create mode 100644 debian/omnibook-dkms.install.in create mode 100644 debian/omnibook-dkms.postinst create mode 100644 debian/omnibook-dkms.prerm mode change 100755 => 100644 debian/patches/01_disable-debug.diff diff --git a/debian/README.Debian b/debian/README.Debian index 4978147..651ac14 100644 --- a/debian/README.Debian +++ b/debian/README.Debian @@ -22,9 +22,8 @@ The omnibook-source package can be used in several ways, and install a module specific to the system you are building on and is not under control of the packaging system. -If your are not using module-assisatant, you have to unpack +If your are not using module-assistant, you have to unpack /usr/src/omnibook-source.tar.bz2 to /usr/src. -- Peter Soos , Wed, 25 Jan 2006 21:06:28 +0100 -- Julien Valroff Sun, 07 Oct 2007 10:38:07 +0200 - diff --git a/debian/changelog b/debian/changelog index d66035f..b08a440 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,11 +1,14 @@ omnibook (2:2.20070211+svn20100520-2) unstable; urgency=low * Update my email address - * Bump Debian policy to 3.9.1 + * Bump Debian policy to 3.9.2 * Apply patch from Ryan Martin to fix alignment issue with kernel >= 2.6.33 + * Add omnibook-dkms package + * Rephrase package description + * Various packaging improvements - -- Julien Valroff Sat, 15 Jan 2011 10:12:15 +0100 + -- Julien Valroff Sat, 25 Jun 2011 07:49:52 +0200 omnibook (2:2.20070211+svn20100520-1) unstable; urgency=low diff --git a/debian/compat b/debian/compat index 7f8f011..45a4fb7 100644 --- a/debian/compat +++ b/debian/compat @@ -1 +1 @@ -7 +8 diff --git a/debian/control b/debian/control index 655f013..0988800 100644 --- a/debian/control +++ b/debian/control @@ -1,22 +1,73 @@ Source: omnibook Section: misc Priority: optional -Maintainer: Julien Valroff -Build-Depends: debhelper (>> 7.0.0) +Maintainer: Julien Valroff +Build-Depends: debhelper (>= 8.0.0) Build-Depends-Indep: bzip2 -Standards-Version: 3.9.1 +Standards-Version: 3.9.2 Homepage: http://omnibook.sf.net Vcs-Git: git://omnibook.git.sourceforge.net/gitroot/omnibook/omnibook Vcs-Browser: http://omnibook.git.sourceforge.net/ Package: omnibook-source Architecture: all -Depends: debhelper (>= 7.0.0), make, module-assistant, kernel-package, bzip2 -Description: Source for the omnibook driver - This package contains the loadable kernel modules for the HP OmniBooks, - Pavilions, Toshiba Satellites and some other laptops manufactured by - Compal Electronics, Inc as ODM. +Depends: ${misc:Depends}, module-assistant, debhelper (>= 7), make, bzip2 +Description: Source for the omnibook kernel module + The omnibook kernel module is intended to provide Linux kernel support for many + laptops such as: + * HP OmniBook and Pavilion + * Toshiba Satellite and Tecra which are not supported by the toshiba_acpi module + * Compal ACL00 + * Many laptops manufactured by Compal Electronics, Inc as ODM + . + Supported features depends on the exact laptop model but may include: + * Enabling hotkey buttons + * Console (LCD display) blanking + * Battery status monitoring. + * Fan and fan policy support + * Touchpad control + * AC Adapter status monitoring + * External display monitors status monitoring and control + * LCD brightness (backlight) monitoring and control + * Docking station/port replicator status + * CPU temperature monitoring + * Mute LED monitoring and control + * Wifi and Bluetooth adapters monitoring and control + * Cooling method control + * CPU Throttling control . This module is only compatible with Linux kernels >= 2.6.9 . - Kernel source is required to compile this module. + This package provides the source code for the acerhdf kernel module. + Kernel source or headers are required to compile this module. + +Package: omnibook-dkms +Architecture: all +Depends: ${misc:Depends}, dkms (>= 1.95) +Description: omnibook kernel module sources for dkms + The omnibook kernel module is intended to provide Linux kernel support for many + laptops such as: + * HP OmniBook and Pavilion + * Toshiba Satellite and Tecra which are not supported by the toshiba_acpi module + * Compal ACL00 + * Many laptops manufactured by Compal Electronics, Inc as ODM + . + Supported features depends on the exact laptop model but may include: + * Enabling hotkey buttons + * Console (LCD display) blanking + * Battery status monitoring. + * Fan and fan policy support + * Touchpad control + * AC Adapter status monitoring + * External display monitors status monitoring and control + * LCD brightness (backlight) monitoring and control + * Docking station/port replicator status + * CPU temperature monitoring + * Mute LED monitoring and control + * Wifi and Bluetooth adapters monitoring and control + * Cooling method control + * CPU Throttling control + . + This package provides the source code for the omnibook kernel module to be + built with dkms. Kernel sources or headers are required to compile this + module. diff --git a/debian/control.modules.in b/debian/control.modules.in index f5a0a46..cd41423 100644 --- a/debian/control.modules.in +++ b/debian/control.modules.in @@ -1,13 +1,13 @@ Source: omnibook Section: misc Priority: optional -Maintainer: Julien Valroff -Build-Depends: debhelper (>> 7.0.0) -Standards-Version: 3.8.4 +Maintainer: Julien Valroff +Build-Depends: debhelper (>= 7) +Standards-Version: 3.9.2 Package: omnibook-module-_KVERS_ Architecture: i386 amd64 -Recommends: _STEM_-image-_KVERS_ +Recommends: linux-image-_KVERS_ Provides: omnibook-module Description: omnibook module for Linux (kernel _KVERS_) This package contains the loadable kernel modules for the HP OmniBooks, @@ -20,4 +20,3 @@ Description: omnibook module for Linux (kernel _KVERS_) your own omnibook-module. The omnibook-source package has been provided for use with the Debian kernel-package utility to produce a version of omnibook-module for your kernel. - diff --git a/debian/dkms.conf.in b/debian/dkms.conf.in new file mode 100644 index 0000000..acad9dc --- /dev/null +++ b/debian/dkms.conf.in @@ -0,0 +1,7 @@ +PACKAGE_NAME="omnibook" +PACKAGE_VERSION="__VERSION__" +MAKE[0]="make -C ${kernel_source_dir} M=${dkms_tree}/${PACKAGE_NAME}/${PACKAGE_VERSION}/build" +CLEAN="make -C ${kernel_source_dir} M=${dkms_tree}/${PACKAGE_NAME}/${PACKAGE_VERSION}/build clean" +AUTOINSTALL=yes +BUILT_MODULE_NAME[0]="omnibook" +DEST_MODULE_LOCATION[0]=/extra diff --git a/debian/omnibook-dkms.install.in b/debian/omnibook-dkms.install.in new file mode 100644 index 0000000..be0b8ac --- /dev/null +++ b/debian/omnibook-dkms.install.in @@ -0,0 +1,4 @@ +*.c usr/src/omnibook-_VERSION_/ +*.h usr/src/omnibook-_VERSION_/ +Makefile usr/src/omnibook-_VERSION_/ +debian/dkms.conf usr/src/omnibook-_VERSION_/ diff --git a/debian/omnibook-dkms.postinst b/debian/omnibook-dkms.postinst new file mode 100644 index 0000000..3e2b75e --- /dev/null +++ b/debian/omnibook-dkms.postinst @@ -0,0 +1,18 @@ +#!/bin/sh +set -e + +CVERSION=`dpkg-query -W -f='${Version}' omnibook-dkms | awk -F "-" '{print $1}' | cut -d\: -f2` + +#DEBHELPER# + +case "$1" in + configure) + echo "Adding Module to DKMS build system" + dkms add -m omnibook -v $CVERSION > /dev/null + echo "Doing initial module build" + dkms build -m omnibook -v $CVERSION > /dev/null + echo "Installing initial module" + dkms install -m omnibook -v $CVERSION --force > /dev/null + echo "Done." + ;; +esac diff --git a/debian/omnibook-dkms.prerm b/debian/omnibook-dkms.prerm new file mode 100644 index 0000000..5048b57 --- /dev/null +++ b/debian/omnibook-dkms.prerm @@ -0,0 +1,14 @@ +#!/bin/sh +set -e + +#DEBHELPER# + +CVERSION=`dpkg-query -W -f='${Version}' omnibook-dkms | awk -F "-" '{print $1}' | cut -d\: -f2` + +case "$1" in + remove|upgrade) + echo "Removing all DKMS Modules" + dkms remove -m omnibook -v $CVERSION --all > /dev/null + echo "Done." + ;; +esac diff --git a/debian/patches/01_disable-debug.diff b/debian/patches/01_disable-debug.diff old mode 100755 new mode 100644 diff --git a/debian/rules b/debian/rules index 176f096..96b89f3 100755 --- a/debian/rules +++ b/debian/rules @@ -1,33 +1,22 @@ #!/usr/bin/make -f -# -*- makefile -*- # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 -CFLAGS = -Wall -g - -ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) - CFLAGS += -O0 -else - CFLAGS += -O2 -endif - # Name of the source package psource := omnibook-source # The short upstream name, used for the module source directory sname := omnibook -# prefix of the target package name -PACKAGE=omnibook-module - -### end KERNEL SETUP +UPSTREAM_VERSION := $(shell dpkg-parsechangelog|grep "^Version:"|cut -d" " -f2|rev|cut -d- -f2-|rev|cut -d':' -f2) configure: configure-stamp configure-stamp: dh_testdir touch configure-stamp - + sed -e 's#_VERSION_#$(UPSTREAM_VERSION)#' < debian/omnibook-dkms.install.in > debian/omnibook-dkms.install + sed -e 's#_VERSION_#$(UPSTREAM_VERSION)#' < debian/dkms.conf.in > debian/dkms.conf build-arch: configure-stamp build-arch-stamp build-arch-stamp: @@ -37,7 +26,6 @@ build-arch-stamp: build-indep: configure-stamp build-indep-stamp build-indep-stamp: dh_testdir - touch build-indep-stamp build: build-arch build-indep @@ -45,7 +33,7 @@ build: build-arch build-indep clean: dh_testdir rm -f build-arch-stamp build-indep-stamp configure-stamp - + -rm -f debian/dkms.conf debian/omnibook-dkms.install dh_clean install: DH_OPTIONS= @@ -60,7 +48,7 @@ install: build cp debian/compat debian/rules debian/changelog \ debian/control debian/copyright debian/*.modules.in \ debian/$(psource)/usr/src/modules/$(sname)/debian - cp Makefile *.c *.h *.lds debian/$(psource)/usr/src/modules/$(sname) + cp Makefile *.c *.h debian/$(psource)/usr/src/modules/$(sname) cd debian/$(psource)/usr/src && tar c modules | bzip2 -9 > $(sname).tar.bz2 && rm -rf modules dh_install @@ -94,19 +82,10 @@ MA_DIR ?= /usr/share/modass # load default rules, including kdist, kdist_image, ... -include $(MA_DIR)/include/common-rules.make -ifndef KPKG_STEM -STEM:=linux -else -STEM:=${KPKG_STEM} -endif - kdist_clean: prep-deb-files [ ! -f Makefile ] || $(MAKE) KSRC=$(KSRC) clean dh_clean -kdist_config: prep-deb-files - sed -i -e 's/_STEM_/$(STEM)/g' debian/control - binary-modules: kdist_config prep-deb-files dh_testroot dh_prep diff --git a/debian/watch b/debian/watch index 6a6761a..4ad4f17 100644 --- a/debian/watch +++ b/debian/watch @@ -1,3 +1,2 @@ version=3 http://sf.net/omnibook/omnibook-(.*)\.tar\.gz - -- 2.43.5