From a218ba2f19c43630e4e88bd8209f97d7c588fc7c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Mathieu=20B=C3=A9rard?= Date: Fri, 30 Jun 2006 21:31:07 +0000 Subject: [PATCH] Debian fix from Daniel Gimpelevich --- debian/changelog | 14 +- debian/control | 3 +- debian/control.module.in | 21 --- debian/control.modules.in | 3 +- debian/files | 2 +- debian/postinst.module.in | 46 ------ debian/postinst.modules.in | 2 + debian/postrm.module.in | 45 ------ debian/postrm.modules.in | 3 + debian/rules | 4 +- debian/rules.old | 321 ------------------------------------- 11 files changed, 24 insertions(+), 440 deletions(-) delete mode 100644 debian/control.module.in delete mode 100644 debian/postinst.module.in delete mode 100644 debian/postrm.module.in delete mode 100755 debian/rules.old diff --git a/debian/changelog b/debian/changelog index d1bf915..da17a4d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,18 @@ +omnibook (20060630) unstable; urgency=low + + * Locally built + + -- Mathieu Bérard Fri, 30 Jun 2006 23:24:17 +0200 + +omnibook (20060126-1) unstable; urgency=low + + * Minor build inconveniences corrected. + + -- Daniel Gimpelevich Sun, 18 Jun 2006 12:28:55 -0700 + omnibook (20060126-0) unstable; urgency=low * Locally built. - -- Peter Soos Wed, 25 Jan 2006 21:06:28 +0100 + -- Péter Soós Wed, 25 Jan 2006 21:06:28 +0100 diff --git a/debian/control b/debian/control index f401484..c68e932 100644 --- a/debian/control +++ b/debian/control @@ -7,8 +7,7 @@ Standards-Version: 3.6.2 Package: omnibook-source Architecture: all -Depends: make, module-assistant -Recommends: kernel-package +Depends: build-essential, debhelper, module-assistant, kernel-package Description: Source for the omnibook driver This package provides the source code for the omnibook kernel module. Kernel source is required to compile this module. diff --git a/debian/control.module.in b/debian/control.module.in deleted file mode 100644 index 0a67bbd..0000000 --- a/debian/control.module.in +++ /dev/null @@ -1,21 +0,0 @@ -Source: omnibook -Section: misc -Priority: optional -Maintainer: Peter Soos -Build-Depends: debhelper (>> 4.0.0) -Standards-Version: 3.6.2 - -Package: omnibook-module-_KVERS_ -Architecture: i386 -Provides: omnibook-module -Description: omnibook module for Linux (kernel _KVERS_) - 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. - . - This package contains the compiled kernel modules for _KVERS_ - . - If you have compiled your own kernel, you will most likely need to build - 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/control.modules.in b/debian/control.modules.in index 0a67bbd..acb4893 100644 --- a/debian/control.modules.in +++ b/debian/control.modules.in @@ -2,11 +2,12 @@ Source: omnibook Section: misc Priority: optional Maintainer: Peter Soos -Build-Depends: debhelper (>> 4.0.0) +Build-Depends: debhelper (>> 4.0.0), build-essential, module-assistant, kernel-package Standards-Version: 3.6.2 Package: omnibook-module-_KVERS_ Architecture: i386 +Depends: kernel-image-_KVERS_ Provides: omnibook-module Description: omnibook module for Linux (kernel _KVERS_) This package contains the loadable kernel modules for the HP OmniBooks, diff --git a/debian/files b/debian/files index 0ca39a5..35fdefb 100644 --- a/debian/files +++ b/debian/files @@ -1 +1 @@ -omnibook-source_20060126-0_all.deb misc optional +omnibook-source_20060630_all.deb misc optional diff --git a/debian/postinst.module.in b/debian/postinst.module.in deleted file mode 100644 index 83345e5..0000000 --- a/debian/postinst.module.in +++ /dev/null @@ -1,46 +0,0 @@ -#! /bin/sh -# postinst script for omnibook-module-* -# -# see: dh_installdeb(1) - -set -e - -# summary of how this script can be called: -# * `configure' -# * `abort-upgrade' -# * `abort-remove' `in-favour' -# -# * `abort-deconfigure' `in-favour' -# `removing' -# -# for details, see http://www.debian.org/doc/debian-policy/ or -# the debian-policy package -# - -case "$1" in - configure) - - if [ "`uname -r`" = "_KVERS_" ] ; then - depmod -a > /dev/null 2>&1 || true - fi - - ;; - - 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/debian/postinst.modules.in b/debian/postinst.modules.in index 83345e5..29a0a71 100644 --- a/debian/postinst.modules.in +++ b/debian/postinst.modules.in @@ -22,6 +22,8 @@ case "$1" in if [ "`uname -r`" = "_KVERS_" ] ; then depmod -a > /dev/null 2>&1 || true + else + depmod "_KVERS_" &> /dev/null || true fi ;; diff --git a/debian/postrm.module.in b/debian/postrm.module.in deleted file mode 100644 index dca24e8..0000000 --- a/debian/postrm.module.in +++ /dev/null @@ -1,45 +0,0 @@ -#! /bin/sh -# postrm script for omnibook-module-* -# -# see: dh_installdeb(1) - -set -e - -# summary of how this script can be called: -# * `remove' -# * `purge' -# * `upgrade' -# * `failed-upgrade' -# * `abort-install' -# * `abort-install' -# * `abort-upgrade' -# * `disappear' overwrit>r> -# for details, see http://www.debian.org/doc/debian-policy/ or -# the debian-policy package - - -case "$1" in - remove|disappear) - - if [ "`uname -r`" = "_KVERS_" ] ; then - depmod -a > /dev/null 2>&1 || true - fi - - ;; - - purge|upgrade|failed-upgrade|abort-install|abort-upgrade) - - ;; - - *) - echo "postrm 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/debian/postrm.modules.in b/debian/postrm.modules.in index dca24e8..c0105b5 100644 --- a/debian/postrm.modules.in +++ b/debian/postrm.modules.in @@ -23,6 +23,9 @@ case "$1" in if [ "`uname -r`" = "_KVERS_" ] ; then depmod -a > /dev/null 2>&1 || true + else + depmod "_KVERS_" &> /dev/null || true + fi ;; diff --git a/debian/rules b/debian/rules index 55f9bd1..c7a7323 100755 --- a/debian/rules +++ b/debian/rules @@ -85,7 +85,7 @@ build-arch-stamp: binary-modules: prep-deb-files dh_testroot dh_clean -k - dh_installdirs lib/modules/$(KVERS)/drivers/misc/omnibook + dh_installdirs lib/modules/$(KVERS)/kernel/drivers/misc/omnibook # Build the module #$(MAKE) -C drivers KERNEL_DIR=$(KSRC) KVERS=$(KVERS) @@ -134,7 +134,7 @@ install: build debian/$(psource)/usr/src/modules/$(sname)/debian cp debian/*.modules.in debian/$(psource)/usr/src/modules/$(sname)/debian - cp Makefile *.c *.h debian/$(psource)/usr/src/modules/$(sname)/ + cp Makefile *.c *.h *.lds debian/$(psource)/usr/src/modules/$(sname)/ cd debian/$(psource)/usr/src && tar c modules | gzip -9 > $(sname).tar.gz && rm -rf modules diff --git a/debian/rules.old b/debian/rules.old deleted file mode 100755 index 4f3d2ad..0000000 --- a/debian/rules.old +++ /dev/null @@ -1,321 +0,0 @@ -#!/usr/bin/make -f -# -*- makefile -*- -# Sample debian/rules that uses debhelper. -# This file was originally written by Joey Hess and Craig Small. -# As a special exception, when this file is copied by dh-make into a -# dh-make output file, you may use that output file without restriction. -# This special exception was added by Craig Small in version 0.37 of dh-make. -# -# This version is for a hypothetical package that can build a kernel modules -# architecture-dependant package via make-kpkg, as well as an -# architecture-independent module source package, and other packages -# either dep/indep for things like common files or userspace components -# needed for the kernel modules. - -# 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 - -### KERNEL SETUP -### Setup the stuff needed for making kernel module packages -### taken from /usr/share/kernel-package/sample.module.rules - -# Name of package -package = omnibook -# KSRC is the location of the kernel source. This is the default value, -# when make-kpkg is used it will supply to real value -KSRC = /usr/src/linux -# KDREV is the package-revision, as given to make-kpkg by the user. -# Just put a simply default value in here which we use when we test -# the packagebuilding without make-kpkg -ifeq ($(strip $(KDREV)),) -KDREV = "test1.0" -endif - -## Now to determine the kernel version, normally supplied by make-kpkg -ifeq ($(strip $(KVERS)),) -# Now we need to get the kernel-version somehow (we are not running -# under make-kpkg?) -ifeq ($(strip $(KSRC)),) -$(error Error. I do not know how to determine the kernel version) -else -kversion :=$(shell grep -E '^VERSION +=' $(KSRC)/Makefile 2>/dev/null | \ - sed -e 's/[^0-9]*\([0-9]*\)/\1/') -kplevel :=$(shell grep -E '^PATCHLEVEL +=' $(KSRC)/Makefile 2>/dev/null | \ - sed -e 's/[^0-9]*\([0-9]*\)/\1/') -ksublevel:=$(shell grep -E '^SUBLEVEL +=' $(KSRC)/Makefile 2>/dev/null | \ - sed -e 's/[^0-9]*\([0-9]*\)/\1/') -EXTRA_VERSION:=$(shell grep -E '^EXTRAVERSION +=' $(KSRC)/Makefile 2>/dev/null | \ - sed -e 's/EXTRAVERSION[\t ]*=[\t ]*\(.*\)/\1/') -kextra:=$(strip $(EXTRA_VERSION)) -HAVE_NEW_MODLIB:=$(shell grep -E '\(INSTALL_MOD_PATH\)' \ - $(KSRC)/Makefile 2>/dev/null ) - -# If you want to have more than one kernel configuration per kernel -# version, set FLAVOUR in the top level kernel Makefile *before* -# invoking make-kpkg -- it will be appended to UTS_RELEASE in -# version.h (separated by a hyphen). This affects everything -- the -# names and versions of the image, source, headers, and doc packages, -# and where the modules are searched for in /lib/modules. - -ifdef FLAVOUR -# uhm - should check if we really have a Makefile capable of Flavours? -endif - -FLAVOUR:=$(shell grep ^FLAVOUR $(KSRC)/Makefile 2>/dev/null | \ - perl -ple 's/FLAVOUR[\s:=]+//g') - -ifneq ($(strip $(FLAVOUR)),) -INT_FLAV := -$(FLAVOUR) -FLAV_ARG := FLAVOUR=$(FLAVOUR) -else -INT_FLAV := -FLAV_ARG := -endif - -## This is the replacement for FLAVOUR -ifneq ($(strip $(APPEND_TO_VERSION)),) -iatv := $(strip $(APPEND_TO_VERSION)) -EXTRAV_ARG := EXTRAVERSION=${EXTRA_VERSION}${iatv} -else -iatv := -EXTRAV_ARG := -endif - -KVERS = $(kversion).$(kplevel).$(ksublevel)$(kextra)$(iatv)$(INT_FLAV) - -endif -endif - -non_epoch_version=$(shell echo $(KVERS) | perl -pe 's/^\d+://') -epoch=$(shell echo $(KVERS) | perl -ne 'm/^(\d+:)/ && print $$1') - -# We also need the package version -pversion = $(shell sed -ne '1s/.*\((.*)\).*/\1/' debian/changelog) -pversion = $(shell sed -ne '1s/.*(\(.*\)).*/\1/p' debian/changelog) - -# MODDIR is the place where the final .deb package should be made. This is the -# default value, when make-kpkg is used it will supply to real value -MODDIR = .. - -pmodules = $(package)-module-$(non_epoch_version) -psource = $(package)-source - -# Prepares the package for distribution. Intended for the kernel -# maintainer. -kdist: kdist_clean kdist_config kdist_image - -# The kdist_configure target is called by make-kpkg modules_config. It -# should configure the module so it is ready for compilation (mostly -# useful for calling configure) -kdist_config: - @echo Nothing to configure - -# the kdist_image target is called by make-kpkg modules_image. It is -# responsible for compiling the module and creating the package. It -# should also clean up after making the module. Please note we use a -# seperate binary-modules target to make testing the package building -# easier -kdist_image: - $(ROOT_CMD) $(MAKE) $(MFLAGS) -f debian/rules binary-modules - $(MAKE) $(MFLAGS) -f debian/rules clean - -# the kdist_clean target is called by make-kpkg modules_clean. It is -# responsible for cleaning up any changes that have been made by the -# other kdist_commands (except for the .deb files created). -kdist_clean: - $(MAKE) $(MFLAGS) -f debian/rules clean - -### end KERNEL SETUP - -configure: configure-stamp -configure-stamp: - dh_testdir - # Add here commands to configure the package. - - touch configure-stamp - - -build-arch: configure-stamp build-arch-stamp -build-arch-stamp: - dh_testdir - - # Add here command to compile/build the package. - #$(MAKE) - - touch build-arch-stamp - -# the binary-modules target prepares the $(pmodules) package. -# It is called by make-kpkg and *not* during a normal build -binary-modules: - export DH_OPTIONS='-p$(pmodules)' - - # Is this needed for setting up a Depends? - #echo "kpkg:Package-Version=$(epoch)$(pversion)+$(non_epoch_version)" \ - # >> debian/$(package).substvars - echo "kpkg:Kernel-Version=$(non_epoch_version)" > \ - debian/$(pmodules).substvars - - # The substvars mechanism seems slightly broken, hack to get around it - # stolen from the qce-ga package. Yaaaa! - sed -e 's/$${kpkg\:Kernel\-Version}/$(non_epoch_version)/' \ - debian/control.modules.in > debian/control - - dh_testdir - dh_testroot - dh_clean -k - - dh_installdirs lib/modules/$(KVERS)/drivers/char/omnibook - - # Build the module - $(MAKE) - - # Install the module - $(MAKE) DESTDIR=$(CURDIR)/debian/$(pmodules) DEPMOD="" install - - dh_installdebconf - # FIXME dh_installdocs README - dh_installchangelogs - - # We're not using this yet - #dh_installmodules - - dh_compress - dh_fixperms - dh_installdeb - #dh_gencontrol -- -v$(epoch)$(pversion)+$(non_epoch_version)+$(KDREV) - dh_gencontrol -- -v$(epoch)$(pversion) - dh_md5sums - dh_builddeb --destdir=$(KSRC)/.. - - -build-indep: configure-stamp build-indep-stamp -build-indep-stamp: - dh_testdir - - # Add here command to compile/build the arch indep package. - # It's ok not to do anything here, if you don't need to build - # anything for this package. - #docbook-to-man debian/omnibook.sgml > omnibook.1 - - touch build-indep-stamp - -build: build-arch build-indep - -clean: - dh_testdir - #dh_testroot - rm -f build-arch-stamp build-indep-stamp configure-stamp - - # Add here commands to clean up after the build process. - -$(MAKE) clean - - dh_clean - -install: DH_OPTIONS= -install: build - dh_testdir - dh_testroot - dh_clean -k - dh_installdirs - - # Create the directories to install the source into - dh_installdirs -p$(psource) usr/src/modules/$(package) - dh_installdirs -p$(psource) usr/src/modules/$(package)/debian - - # Copy only the driver source to the proper location - cp Makefile *.c *.h debian/$(psource)/usr/src/modules/$(package) - # Copy the needed debian/ pieces to the proper location - cp debian/postinst.modules.in \ - debian/$(psource)/usr/src/modules/$(package)/debian/postinst - cp debian/postrm.modules.in \ - debian/$(psource)/usr/src/modules/$(package)/debian/postrm - cp debian/control.modules.in \ - debian/$(psource)/usr/src/modules/$(package)/debian/control - cp debian/control.modules.in \ - debian/$(psource)/usr/src/modules/$(package)/debian/control.modules.in - cp debian/rules \ - debian/$(psource)/usr/src/modules/$(package)/debian - cp debian/changelog \ - debian/$(psource)/usr/src/modules/$(package)/debian - cp debian/copyright \ - debian/$(psource)/usr/src/modules/$(package)/debian - (cd debian/$(psource)/usr/src/; tar cvfz $(package).tar.gz modules) - rm -rf debian/$(psource)/usr/src/modules - - dh_install - -# Build architecture-independent files here. -# Pass -i to all debhelper commands in this target to reduce clutter. -binary-indep: build install - dh_testdir -i - dh_testroot -i - dh_installchangelogs -i - dh_installdocs -i - dh_installexamples -i -# dh_install -i -# dh_installmenu -i -# dh_installdebconf -i -# dh_installlogrotate -i -# dh_installemacsen -i -# dh_installpam -i -# dh_installmime -i -# dh_installinit -i -# dh_installcron -i -# dh_installinfo -i - dh_installman -i - dh_link -i - dh_compress -i - dh_fixperms -i - dh_installdeb -i -# dh_perl -i -# dh_python -i -# dh_makeshlibs -i - dh_installdeb -i - dh_shlibdeps -i - dh_gencontrol -i - dh_md5sums -i - dh_builddeb -i - -# Build architecture-dependent files here. -binary-arch: build install - dh_testdir -s - dh_testroot -s -# dh_installdebconf -s - dh_installdocs -s - dh_installexamples -s - dh_installmenu -s -# dh_installlogrotate -s -# dh_installemacsen -s -# dh_installpam -s -# dh_installmime -s -# dh_installinit -s - dh_installcron -s -# dh_installman -s - dh_installinfo -s - dh_installchangelogs -s - dh_strip -s - dh_link -s - dh_compress -s - dh_fixperms -s -# dh_makeshlibs -s - dh_installdeb -s -# dh_perl -s - dh_shlibdeps -s - dh_gencontrol -s - dh_md5sums -s - dh_builddeb -s - -#binary: binary-indep binary-arch -binary: binary-indep -.PHONY: build clean binary-indep binary-arch binary install configure binary-modules kdist kdist_config kdist_image kdist_clean -- 2.43.5