diff -Nru cedarview-drm-drivers-20120705/debian/changelog cedarview-drm-drivers-20120705/debian/changelog --- cedarview-drm-drivers-20120705/debian/changelog 2012-07-19 10:56:43.000000000 +0000 +++ cedarview-drm-drivers-20120705/debian/changelog 2012-07-27 21:08:05.000000000 +0000 @@ -1,3 +1,9 @@ +cedarview-drm-drivers (20120705-0ubuntu2) precise-proposed; urgency=low + + * Adjustments to packaging. + + -- Steve Langasek Fri, 27 Jul 2012 21:07:54 +0000 + cedarview-drm-drivers (20120705-0ubuntu1) precise-proposed; urgency=low * Initial release (LP: #1025720). diff -Nru cedarview-drm-drivers-20120705/debian/clean cedarview-drm-drivers-20120705/debian/clean --- cedarview-drm-drivers-20120705/debian/clean 1970-01-01 00:00:00.000000000 +0000 +++ cedarview-drm-drivers-20120705/debian/clean 2012-07-27 20:12:49.000000000 +0000 @@ -0,0 +1 @@ +debian/dkms diff -Nru cedarview-drm-drivers-20120705/debian/control cedarview-drm-drivers-20120705/debian/control --- cedarview-drm-drivers-20120705/debian/control 2012-07-19 11:40:41.000000000 +0000 +++ cedarview-drm-drivers-20120705/debian/control 2012-07-27 21:08:47.000000000 +0000 @@ -7,9 +7,8 @@ Package: cedarview-drm Architecture: i386 -Depends: dkms (>= 1.95), +Depends: grub-gfxpayload, linux-headers-generic (>= 2.6) | linux-headers-generic-pae (>= 2.6), - findutils (>= 4), ${misc:Depends}, XB-Modaliases: ${modaliases} Description: Cedar Trail drm driver in DKMS format. diff -Nru cedarview-drm-drivers-20120705/debian/control.in cedarview-drm-drivers-20120705/debian/control.in --- cedarview-drm-drivers-20120705/debian/control.in 2012-07-19 10:24:18.000000000 +0000 +++ cedarview-drm-drivers-20120705/debian/control.in 2012-07-27 20:29:48.000000000 +0000 @@ -7,9 +7,8 @@ Package: #DRIVERNAME# Architecture: i386 -Depends: dkms (>= 1.95), +Depends: grub-gfxpayload, linux-headers-generic (>= 2.6) | linux-headers-generic-pae (>= 2.6), - findutils (>= 4), ${misc:Depends}, XB-Modaliases: ${modaliases} Description: Cedar Trail drm driver in DKMS format. diff -Nru cedarview-drm-drivers-20120705/debian/dirs cedarview-drm-drivers-20120705/debian/dirs --- cedarview-drm-drivers-20120705/debian/dirs 2012-07-19 11:40:41.000000000 +0000 +++ cedarview-drm-drivers-20120705/debian/dirs 2012-07-27 20:56:44.000000000 +0000 @@ -1,7 +0,0 @@ -usr/src -/usr/lib/pm-utils/video-quirks -etc/modprobe.d -/etc/grub.d -/etc/lightdm - -/usr/share/dkms/modules_to_force_install diff -Nru cedarview-drm-drivers-20120705/debian/dirs.in cedarview-drm-drivers-20120705/debian/dirs.in --- cedarview-drm-drivers-20120705/debian/dirs.in 2012-03-31 16:37:11.000000000 +0000 +++ cedarview-drm-drivers-20120705/debian/dirs.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,7 +0,0 @@ -usr/src -#PM_UTILS_DIR# -etc/modprobe.d -#GRUB_CONF_DIR# -#LIGHTDM_CONF_DIR# -#LIGHTDM_CUSTOM_CONF_DIR# -#DKMS_FORCE_DIR# diff -Nru cedarview-drm-drivers-20120705/debian/dkms.conf.in cedarview-drm-drivers-20120705/debian/dkms.conf.in --- cedarview-drm-drivers-20120705/debian/dkms.conf.in 2012-03-31 14:38:45.000000000 +0000 +++ cedarview-drm-drivers-20120705/debian/dkms.conf.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,16 +0,0 @@ -PACKAGE_NAME="#DRIVERNAME#" -PACKAGE_VERSION="#VERSION#" -MAKE[0]="make all KVER=$kernelver KMYDIR=#SRCPATH#" -BUILT_MODULE_LOCATION[0]="." -BUILT_MODULE_LOCATION[1]="." -BUILT_MODULE_LOCATION[2]="staging/cdv" -BUILT_MODULE_LOCATION[3]="ttm" -BUILT_MODULE_NAME[0]="drm" -BUILT_MODULE_NAME[1]="drm_kms_helper" -BUILT_MODULE_NAME[2]="cedarview_gfx" -BUILT_MODULE_NAME[3]="ttm" -DEST_MODULE_LOCATION[0]="/updates" -DEST_MODULE_LOCATION[1]="/updates" -DEST_MODULE_LOCATION[2]="/updates" -DEST_MODULE_LOCATION[3]="/updates" -AUTOINSTALL="yes" diff -Nru cedarview-drm-drivers-20120705/debian/dkms.in cedarview-drm-drivers-20120705/debian/dkms.in --- cedarview-drm-drivers-20120705/debian/dkms.in 1970-01-01 00:00:00.000000000 +0000 +++ cedarview-drm-drivers-20120705/debian/dkms.in 2012-03-31 14:38:45.000000000 +0000 @@ -0,0 +1,16 @@ +PACKAGE_NAME="#DRIVERNAME#" +PACKAGE_VERSION="#VERSION#" +MAKE[0]="make all KVER=$kernelver KMYDIR=#SRCPATH#" +BUILT_MODULE_LOCATION[0]="." +BUILT_MODULE_LOCATION[1]="." +BUILT_MODULE_LOCATION[2]="staging/cdv" +BUILT_MODULE_LOCATION[3]="ttm" +BUILT_MODULE_NAME[0]="drm" +BUILT_MODULE_NAME[1]="drm_kms_helper" +BUILT_MODULE_NAME[2]="cedarview_gfx" +BUILT_MODULE_NAME[3]="ttm" +DEST_MODULE_LOCATION[0]="/updates" +DEST_MODULE_LOCATION[1]="/updates" +DEST_MODULE_LOCATION[2]="/updates" +DEST_MODULE_LOCATION[3]="/updates" +AUTOINSTALL="yes" diff -Nru cedarview-drm-drivers-20120705/debian/grub.d/11_custom_cmdline cedarview-drm-drivers-20120705/debian/grub.d/11_custom_cmdline --- cedarview-drm-drivers-20120705/debian/grub.d/11_custom_cmdline 2012-06-15 11:01:31.000000000 +0000 +++ cedarview-drm-drivers-20120705/debian/grub.d/11_custom_cmdline 1970-01-01 00:00:00.000000000 +0000 @@ -1,26 +0,0 @@ -#! /bin/sh -set -e - -# grub-mkconfig helper script. -# Copyright (C) 2012 Canonical Ltd. -# -# GRUB 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 3 of the License, or -# (at your option) any later version. -# -# GRUB 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 GRUB. If not, see . - -# Override the generation of the gfxmode grub-script function -# so we never pass vt_handoff to the kernel -cat << 'EOF' -function gfxmode { - set vt_handoff= -} -EOF diff -Nru cedarview-drm-drivers-20120705/debian/install cedarview-drm-drivers-20120705/debian/install --- cedarview-drm-drivers-20120705/debian/install 1970-01-01 00:00:00.000000000 +0000 +++ cedarview-drm-drivers-20120705/debian/install 2012-07-27 21:08:47.000000000 +0000 @@ -0,0 +1,8 @@ +usr/src +etc/modprobe.d +usr/share/grub-gfxpayload-lists +debian/lightdm.conf /etc/lightdm +debian/lightdm.conf /usr/share/cedarview-drm +/usr/share/dkms/modules_to_force_install + +debian/quirks/pm-utils/* usr/lib/pm-utils/video-quirks diff -Nru cedarview-drm-drivers-20120705/debian/install.in cedarview-drm-drivers-20120705/debian/install.in --- cedarview-drm-drivers-20120705/debian/install.in 2012-07-17 14:13:09.000000000 +0000 +++ cedarview-drm-drivers-20120705/debian/install.in 2012-07-27 21:02:35.000000000 +0000 @@ -1,13 +1,8 @@ usr/src -#PM_UTILS_DIR# etc/modprobe.d -#GRUB_CONF_DIR# -#LIGHTDM_CONF_DIR# -#LIGHTDM_CUSTOM_CONF_DIR# +usr/share/grub-gfxpayload-lists +debian/lightdm.conf #LIGHTDM_CONF_DIR# +debian/lightdm.conf #LIGHTDM_CUSTOM_CONF_DIR# #DKMS_FORCE_DIR# -debian/quirks/pm-utils/* #PM_UTILS_DIR#/ -debian/grub.d/* #GRUB_CONF_DIR#/ - -lib/* /lib/ -usr/lib/dri/*.so /usr/lib/i386-linux-gnu/dri/ +debian/quirks/pm-utils/* usr/lib/pm-utils/video-quirks diff -Nru cedarview-drm-drivers-20120705/debian/postinst cedarview-drm-drivers-20120705/debian/postinst --- cedarview-drm-drivers-20120705/debian/postinst 2012-07-19 11:40:41.000000000 +0000 +++ cedarview-drm-drivers-20120705/debian/postinst 2012-07-27 21:08:47.000000000 +0000 @@ -6,131 +6,14 @@ set -e -PACKAGE_NAME=cedarview-drm - -CVERSION=`dpkg-query -W -f='${Version}' $PACKAGE_NAME | awk -F "-" '{print $1}' | cut -d\: -f2 \ - | sed -e 's/[+-].*//' -e 's/~//g')` - -ARCH=`dpkg --print-architecture` -case $ARCH in - amd64) - ARCH="x86_64" - ;; - lpia) - ARCH="i686" - ;; - i386) - ARCH="i686" - ;; - *) - echo "WARNING: unsupported arch: $ARCH" - ARCH="$ARCH" - ;; -esac - -# Check the existence of a kernel named as $1 -_is_kernel_name_correct() { - CORRECT="no" - KERNEL_NAME=$1 - - for kernel in /boot/config-*; do - KERNEL=${kernel#*-} - if [ "${KERNEL}" = "${KERNEL_NAME}" ]; then - CORRECT="yes" - break - fi - done - - echo $CORRECT -} - -# Get the most recent kernel on Debian based systems. This keeps -# into account both the version and the ABI. If the current kernel -# is the most recent kernel then the function will print a null string. -_get_newest_kernel_debian() { - NEWEST_KERNEL= - NEWEST_VERSION= - NEWEST_ABI= - - for kernel in /boot/config-*; do - KERNEL=${kernel#*-} - KERNEL_VERSION=${KERNEL%%-*} - ABI=${KERNEL#*-} - ABI=${ABI%%-*} - - if [ -z "$NEWEST_KERNEL" ]; then - # The 1st time get a version which is bigger than $1 - COMPARE_TO=$1 - else - # Get the biggest version - COMPARE_TO="$NEWEST_VERSION-$NEWEST_ABI" - fi - - # if $kernel is greater than $COMPARE_TO - if [ `dpkg --compare-versions "$KERNEL_VERSION-$ABI" gt "$COMPARE_TO" && echo "yes" || \ - echo "no"` = "yes" ]; then - NEWEST_KERNEL=$KERNEL - NEWEST_VERSION=$KERNEL_VERSION - NEWEST_ABI=$ABI - fi - done - - echo "$NEWEST_KERNEL" -} - - -get_newest_kernel() { - NEWEST_KERNEL= - # Try Debian first as rpm can be installed in Debian based distros - if [ -e /usr/bin/dpkg ]; then - # If DEB based - CURRENT_KERNEL=$1 - CURRENT_VERSION=${CURRENT_KERNEL%%-*} - CURRENT_ABI=${CURRENT_KERNEL#*-} - CURRENT_FLAVOUR=${CURRENT_ABI#*-} - CURRENT_ABI=${CURRENT_ABI%%-*} - NEWEST_KERNEL=$(_get_newest_kernel_debian "$CURRENT_VERSION-$CURRENT_ABI") - - elif [ `which rpm &>/dev/null` ]; then - # If RPM based - NEWEST_KERNEL=$(_get_newest_kernel_rhel) - fi - - # Make sure that kernel name that we extracted corresponds to an installed - # kernel - if [ -n "$NEWEST_KERNEL" ] && [ `_is_kernel_name_correct $NEWEST_KERNEL` = "no" ]; then - NEWEST_KERNEL= - fi - - echo $NEWEST_KERNEL -} - - -dkms_configure () { - for POSTINST in /usr/lib/dkms/common.postinst "/usr/share/$PACKAGE_NAME/postinst"; do - if [ -f "$POSTINST" ]; then - "$POSTINST" "$PACKAGE_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) # If there's not lightdm conf file, then we're in trouble # add a new one if [ ! -f /etc/lightdm/lightdm.conf ]; then - cp -f /usr/share/cedarview-drm/lightdm.conf /etc/lightdm/lightdm.conf + cp -f /lightdm.conf /etc/lightdm/lightdm.conf fi - dkms_configure - # Update initramfs so that the blacklist ends up in the initramfs update-initramfs -u @@ -138,7 +21,7 @@ # This can fail when dealing with a chroot see LP: #556653 update-initramfs -u -k $CURRENT_KERNEL || true - update-grub + update-grub-gfxpayload fi ;; diff -Nru cedarview-drm-drivers-20120705/debian/postinst.in cedarview-drm-drivers-20120705/debian/postinst.in --- cedarview-drm-drivers-20120705/debian/postinst.in 2012-03-31 16:37:11.000000000 +0000 +++ cedarview-drm-drivers-20120705/debian/postinst.in 2012-07-27 20:29:29.000000000 +0000 @@ -6,121 +6,6 @@ set -e -PACKAGE_NAME=#DRIVERNAME# - -CVERSION=`dpkg-query -W -f='${Version}' $PACKAGE_NAME | awk -F "-" '{print $1}' | cut -d\: -f2 \ - | sed -e 's/[+-].*//' -e 's/~//g')` - -ARCH=`dpkg --print-architecture` -case $ARCH in - amd64) - ARCH="x86_64" - ;; - lpia) - ARCH="i686" - ;; - i386) - ARCH="i686" - ;; - *) - echo "WARNING: unsupported arch: $ARCH" - ARCH="$ARCH" - ;; -esac - -# Check the existence of a kernel named as $1 -_is_kernel_name_correct() { - CORRECT="no" - KERNEL_NAME=$1 - - for kernel in /boot/config-*; do - KERNEL=${kernel#*-} - if [ "${KERNEL}" = "${KERNEL_NAME}" ]; then - CORRECT="yes" - break - fi - done - - echo $CORRECT -} - -# Get the most recent kernel on Debian based systems. This keeps -# into account both the version and the ABI. If the current kernel -# is the most recent kernel then the function will print a null string. -_get_newest_kernel_debian() { - NEWEST_KERNEL= - NEWEST_VERSION= - NEWEST_ABI= - - for kernel in /boot/config-*; do - KERNEL=${kernel#*-} - KERNEL_VERSION=${KERNEL%%-*} - ABI=${KERNEL#*-} - ABI=${ABI%%-*} - - if [ -z "$NEWEST_KERNEL" ]; then - # The 1st time get a version which is bigger than $1 - COMPARE_TO=$1 - else - # Get the biggest version - COMPARE_TO="$NEWEST_VERSION-$NEWEST_ABI" - fi - - # if $kernel is greater than $COMPARE_TO - if [ `dpkg --compare-versions "$KERNEL_VERSION-$ABI" gt "$COMPARE_TO" && echo "yes" || \ - echo "no"` = "yes" ]; then - NEWEST_KERNEL=$KERNEL - NEWEST_VERSION=$KERNEL_VERSION - NEWEST_ABI=$ABI - fi - done - - echo "$NEWEST_KERNEL" -} - - -get_newest_kernel() { - NEWEST_KERNEL= - # Try Debian first as rpm can be installed in Debian based distros - if [ -e /usr/bin/dpkg ]; then - # If DEB based - CURRENT_KERNEL=$1 - CURRENT_VERSION=${CURRENT_KERNEL%%-*} - CURRENT_ABI=${CURRENT_KERNEL#*-} - CURRENT_FLAVOUR=${CURRENT_ABI#*-} - CURRENT_ABI=${CURRENT_ABI%%-*} - NEWEST_KERNEL=$(_get_newest_kernel_debian "$CURRENT_VERSION-$CURRENT_ABI") - - elif [ `which rpm &>/dev/null` ]; then - # If RPM based - NEWEST_KERNEL=$(_get_newest_kernel_rhel) - fi - - # Make sure that kernel name that we extracted corresponds to an installed - # kernel - if [ -n "$NEWEST_KERNEL" ] && [ `_is_kernel_name_correct $NEWEST_KERNEL` = "no" ]; then - NEWEST_KERNEL= - fi - - echo $NEWEST_KERNEL -} - - -dkms_configure () { - for POSTINST in /usr/lib/dkms/common.postinst "/usr/share/$PACKAGE_NAME/postinst"; do - if [ -f "$POSTINST" ]; then - "$POSTINST" "$PACKAGE_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) # If there's not lightdm conf file, then we're in trouble @@ -129,8 +14,6 @@ cp -f #LIGHTDM_CUSTOM_CONF_FILE# #LIGHTDM_CONF_FILE# fi - dkms_configure - # Update initramfs so that the blacklist ends up in the initramfs update-initramfs -u @@ -138,7 +21,7 @@ # This can fail when dealing with a chroot see LP: #556653 update-initramfs -u -k $CURRENT_KERNEL || true - update-grub + update-grub-gfxpayload fi ;; diff -Nru cedarview-drm-drivers-20120705/debian/postrm cedarview-drm-drivers-20120705/debian/postrm --- cedarview-drm-drivers-20120705/debian/postrm 2012-07-19 11:40:41.000000000 +0000 +++ cedarview-drm-drivers-20120705/debian/postrm 2012-07-27 21:08:47.000000000 +0000 @@ -19,15 +19,12 @@ # * `disappear' overwrit>r> # for details, see /usr/share/doc/packaging-manual/ -PKGNAME=cedarview-drm BLACKLIST_FILE=/etc/modprobe.d/cedarview-drm.conf -GRUB_CONF=/etc/grub.d/11_custom_cmdline case "$1" in remove|purge) # Remove blacklist file rm -f $BLACKLIST_FILE - rm -f $GRUB_CONF_FILE # Restore the default lightdm.conf, if any if dpkg-divert --list /etc/lightdm/lightdm.conf | grep 'cedarview-drm' > /dev/null ; then @@ -36,10 +33,10 @@ fi # Update initramfs, in case we were loaded into it - /usr/sbin/update-initramfs -u + update-initramfs -u - if which update-grub >/dev/null 2>&1; then - update-grub + if which update-grub-gfxpayload >/dev/null 2>&1; then + update-grub-gfxpayload fi ;; diff -Nru cedarview-drm-drivers-20120705/debian/postrm.in cedarview-drm-drivers-20120705/debian/postrm.in --- cedarview-drm-drivers-20120705/debian/postrm.in 2012-03-31 11:00:21.000000000 +0000 +++ cedarview-drm-drivers-20120705/debian/postrm.in 2012-07-27 20:46:06.000000000 +0000 @@ -19,15 +19,12 @@ # * `disappear' overwrit>r> # for details, see /usr/share/doc/packaging-manual/ -PKGNAME=#DRIVERNAME# BLACKLIST_FILE=#BLACKLIST_FILE# -GRUB_CONF=#GRUB_CONF_FILE# case "$1" in remove|purge) # Remove blacklist file rm -f $BLACKLIST_FILE - rm -f $GRUB_CONF_FILE # Restore the default lightdm.conf, if any if dpkg-divert --list #LIGHTDM_CONF_FILE# | grep '#DRIVERNAME#' > /dev/null ; then @@ -36,10 +33,10 @@ fi # Update initramfs, in case we were loaded into it - /usr/sbin/update-initramfs -u + update-initramfs -u - if which update-grub >/dev/null 2>&1; then - update-grub + if which update-grub-gfxpayload >/dev/null 2>&1; then + update-grub-gfxpayload fi ;; diff -Nru cedarview-drm-drivers-20120705/debian/prerm cedarview-drm-drivers-20120705/debian/prerm --- cedarview-drm-drivers-20120705/debian/prerm 2012-07-19 11:40:41.000000000 +0000 +++ cedarview-drm-drivers-20120705/debian/prerm 1970-01-01 00:00:00.000000000 +0000 @@ -1,30 +0,0 @@ -#!/bin/sh - -NAME=cedarview-drm - -DEBVERS=$(dpkg-query -W -f='${Version}' $NAME | awk -F- '{print $1}') -VERSION=$(echo "$DEBVERS" | sed -e 's/[+-].*//' -e 's/~//g') - -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 -Nru cedarview-drm-drivers-20120705/debian/prerm.in cedarview-drm-drivers-20120705/debian/prerm.in --- cedarview-drm-drivers-20120705/debian/prerm.in 2012-03-31 11:00:21.000000000 +0000 +++ cedarview-drm-drivers-20120705/debian/prerm.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,30 +0,0 @@ -#!/bin/sh - -NAME=#DRIVERNAME# - -DEBVERS=$(dpkg-query -W -f='${Version}' $NAME | awk -F- '{print $1}') -VERSION=$(echo "$DEBVERS" | sed -e 's/[+-].*//' -e 's/~//g') - -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 -Nru cedarview-drm-drivers-20120705/debian/rules cedarview-drm-drivers-20120705/debian/rules --- cedarview-drm-drivers-20120705/debian/rules 2012-07-19 10:25:33.000000000 +0000 +++ cedarview-drm-drivers-20120705/debian/rules 2012-07-27 21:06:52.000000000 +0000 @@ -13,24 +13,21 @@ SRCPATH := /var/lib/dkms/$(PKG_driver)/$(PKG_version)/build NAME = $(shell dh_listpackages) -TMP = $(CURDIR)/debian/$(NAME) +TMP = $(CURDIR)/debian/tmp PKG_kernel_source_dir := /usr/src -PKG_pm_utils_dir := /usr/lib/pm-utils/video-quirks SRC = $(TMP)$(PKG_kernel_source_dir) -QUIRKS = $(TMP)$(PKG_pm_utils_dir) BLACKLISTS = $(TMP)/etc/modprobe.d -PKG_grub_config_dir := /etc/grub.d PKG_blacklist_file := /etc/modprobe.d/$(PKG_driver).conf -PKG_grub_config_file := $(PKG_grub_config_dir)/11_custom_cmdline + +GRUB_BLACKLISTS = $(TMP)/usr/share/grub-gfxpayload-lists/blacklist PKG_lightdm_config_dir := /etc/lightdm PKG_lightdm_config_file := $(PKG_lightdm_config_dir)/lightdm.conf LIGHTDM_CONF_DIR := $(TMP)$(PKG_lightdm_config_dir) -PKG_lightdm_custom_dir := /usr/share/$(PKG_driver) +PKG_lightdm_custom_config_dir := /usr/share/$(PKG_driver) PKG_lightdm_custom_config_file := $(PKG_lightdm_custom_dir)/lightdm.conf LIGHTDM_CUSTOM_CONF_DIR := $(TMP)$(PKG_lightdm_custom_dir) -GRUB_CONFDIR := $(TMP)$(PKG_grub_config_dir) PKG_dkms_force_dir := /usr/share/dkms/modules_to_force_install PKG_dkms_force_file := $(PKG_dkms_force_dir)/$(PKG_driver) DKMS_FORCE_DIR := $(TMP)$(PKG_dkms_force_dir) @@ -53,16 +50,15 @@ %: - dh --with dkms $@ + dh $@ --with dkms .PHONY: regen-from-templates regen-from-templates: - for i in $(CURDIR)/debian/dkms.conf \ - $(CURDIR)/debian/dirs \ + for i in $(CURDIR)/debian/dkms \ $(CURDIR)/debian/control \ + $(CURDIR)/debian/install \ $(CURDIR)/debian/preinst \ $(CURDIR)/debian/postinst \ - $(CURDIR)/debian/prerm \ $(CURDIR)/debian/postrm \ $(CURDIR)/Makefile; do \ sed -e 's|#VERSION#|$(PKG_version)|g' \ @@ -70,9 +66,6 @@ -e 's|#DRIVERNAME#|$(PKG_driver)|g' \ -e "s|#DRIVERSRCNAME#|$(PKG_source)|g" \ -e "s|#BLACKLIST_FILE#|$(PKG_blacklist_file)|g" \ - -e "s|#GRUB_CONF_FILE#|$(PKG_grub_config_file)|g" \ - -e "s|#GRUB_CONF_DIR#|$(PKG_grub_config_dir)|g" \ - -e "s|#PM_UTILS_DIR#|$(PKG_pm_utils_dir)|g" \ -e "s|#LIGHTDM_CONF_FILE#|$(PKG_lightdm_config_file)|g" \ -e "s|#LIGHTDM_CONF_DIR#|$(PKG_lightdm_config_dir)|g" \ -e "s|#LIGHTDM_CUSTOM_CONF_FILE#|$(PKG_lightdm_custom_config_file)|g" \ @@ -82,54 +75,39 @@ done override_dh_auto_build: -clean: regen-from-templates - dh_quilt_unpatch - rm -f $(CURDIR)/debian/dkms.conf - - dh clean +override_dh_auto_clean: regen-from-templates override_dh_auto_install: regen-from-templates - dh_quilt_patch install -d "$(SRC)" mkdir "$(SRC)/$(NAME)-$(PKG_version)" cp -a `ls | grep -v debian` "$(SRC)/$(NAME)-$(PKG_version)" chmod 644 -R "$(SRC)/$(NAME)-$(PKG_version)" find "$(SRC)/$(NAME)-$(PKG_version)" -type d -exec chmod 755 {} \; - cp $(CURDIR)/debian/dkms.conf $(SRC)/$(NAME)-$(PKG_version)/dkms.conf - - # Install quirks - install -d "$(QUIRKS)" - cp $(CURDIR)/debian/quirks/pm-utils/* $(QUIRKS)/ install -d "$(BLACKLISTS)" # Permanently blacklist psb_gfx so that cdv can be loaded printf '$(subst $(newline),\n,${blacklist_file})' > \ $(BLACKLISTS)/$(PKG_driver).conf - # Install grub headers - install -d "$(GRUB_CONFDIR)" - cp $(CURDIR)/debian/grub.d/* $(GRUB_CONFDIR)/ - chmod a+x $(GRUB_CONFDIR)/* - - # Install lightdm config file - install -d "$(LIGHTDM_CONF_DIR)" - cp $(CURDIR)/debian/lightdm.conf $(LIGHTDM_CONF_DIR)/ - install -d "$(LIGHTDM_CUSTOM_CONF_DIR)" - cp $(CURDIR)/debian/lightdm.conf $(LIGHTDM_CUSTOM_CONF_DIR)/ - # Install file to force DKMS to override modules install -d "$(DKMS_FORCE_DIR)" printf '$(PKG_driver)' > $(DKMS_FORCE_DIR)/$(PKG_driver) # Generate modaliases - $(shell grep "{0x8086, 0x" '$(CURDIR)/debian/patches/07_kernel-3.2-cdv.diff' | \ - cut -d "," -f 2 | cut -d " " -f 2 > $(readme_list) ) + sed -n -e 's/.*{0x8086, 0x\([^, ]*\).*/\1/p' \ + '$(CURDIR)/debian/patches/07_kernel-3.2-cdv.diff' \ + > $(readme_list) + + install -d $(GRUB_BLACKLISTS) + for id in $$(cat $(readme_list)); do \ + echo v8086d$$id.*; done \ + > $(GRUB_BLACKLISTS)/20_$(PKG_module) - rm -f debian/$(PKG_driver).modaliases - for id in $(shell cat $(readme_list)); do \ + for id in $$(cat $(readme_list)); do \ printf 'alias pci:v%08Xd%08Xsv*sd*bc03sc*i* %s %s\n' \ - 0x8086 "$$id" "$(PKG_module)" "$(PKG_driver)" >> debian/$(PKG_driver).modaliases; done + 0x8086 0x"$$id" "$(PKG_module)" "$(PKG_driver)"; done \ + > debian/$(PKG_driver).modaliases dh_modaliases rm debian/$(PKG_driver).modaliases - rm -f $(readme_list) + rm -f $(readme_list)