Port to dkms.
authorStefano Rivera <stefanor@debian.org>
Sun, 6 Sep 2015 01:20:34 +0000 (18:20 -0700)
committerStefano Rivera <stefanor@debian.org>
Sun, 6 Sep 2015 01:23:07 +0000 (18:23 -0700)
* Port to dkms.
* Switch to dh, compat level 9.

99-vizzini.rules [deleted file]
debian/changelog
debian/compat
debian/control
debian/control.modules.in [deleted file]
debian/copyright
debian/dkms [new file with mode: 0644]
debian/dkms.conf [new file with mode: 0644]
debian/install [new file with mode: 0755]
debian/rules
debian/udev [new file with mode: 0644]

diff --git a/99-vizzini.rules b/99-vizzini.rules
deleted file mode 100644 (file)
index 61ebe5c..0000000
+++ /dev/null
@@ -1 +0,0 @@
-SUBSYSTEM=="usb", ATTR{idVendor}=="04e2", RUN+="/bin/sh -c 'echo -n %k:1.0 >/sys/bus/usb/drivers/cdc_acm/unbind; echo -n %k:1.0 >/sys/bus/usb/drivers/vizzini/bind'"
index f9bf06e..70c2aab 100644 (file)
@@ -1,3 +1,10 @@
+vizzini (1.0.0-5) UNRELEASED; urgency=medium
+
+  * Port to dkms.
+  * Switch to dh, compat level 9.
+
+ -- Stefano Rivera <stefanor@debian.org>  Sat, 05 Sep 2015 17:57:22 -0700
+
 vizzini (1.0.0-4) unstable; urgency=low
 
   * Fixed log message and updated README.Debian
index 7ed6ff8..ec63514 100644 (file)
@@ -1 +1 @@
-5
+9
index 6fe5f3c..f061959 100644 (file)
@@ -2,12 +2,15 @@ Source: vizzini
 Section: misc
 Priority: optional
 Maintainer: Ard van Breemen <ard@kwaak.net>
-Build-Depends: debhelper (>= 5), bzip2
-Standards-Version: 3.7.3
+Build-Depends: debhelper (>= 9), dkms
+Standards-Version: 3.7.6
 Homepage: http://www.exar.com/connectivity/uart-and-bridging-solutions/usb-uarts/xr21v1414
 
-Package: vizzini-source
+Package: vizzini-dkms
 Architecture: all
-Depends: module-assistant, debhelper (>= 5), make, bzip2
-Description: Source for the exar XR21V1414 usb uart
- This package provides the source code for the vizzini kernel module.
+Depends: ${misc:Depends}
+Description: Kernel driver for Exar XR21V1414 USB UART
+ This package provides integration with the DKMS infrastructure for
+ automatically building out of tree kernel modules.
+ .
+ Vizzini is the driver for the Exar XR21V1414 UART.
diff --git a/debian/control.modules.in b/debian/control.modules.in
deleted file mode 100644 (file)
index 650bd0e..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-Source: vizzini
-Section: utils
-Priority: optional
-Maintainer: Ard van Breemen <ard@kwaak.net>
-Build-Depends: debhelper (>= 5)
-Standards-Version: 3.7.3
-Homepage: http://www.exar.com/connectivity/uart-and-bridging-solutions/usb-uarts/xr21v1414
-
-Package: vizzini-modules-_KVERS_
-Architecture: any
-Provides: vizzini-modules
-Description: Exar XR21V1414 usb uart drivers for Linux (kernel _KVERS_).
- This package provides the vizzini kernel modules for the Exar XR21V1414
index c869190..f79ac91 100644 (file)
@@ -4,7 +4,7 @@ Tue, 08 Jul 2014 10:24:22 +0000
 It was downloaded from
 http://www.exar.com/connectivity/uart-and-bridging-solutions/usb-uarts/xr21v1414
 
-Original copyright: 
+Original copyright:
     Copyright (c) 2013 Exar Corporation, Inc.
 
 Patches Author:
diff --git a/debian/dkms b/debian/dkms
new file mode 100644 (file)
index 0000000..11e85a7
--- /dev/null
@@ -0,0 +1 @@
+debian/dkms.conf
diff --git a/debian/dkms.conf b/debian/dkms.conf
new file mode 100644 (file)
index 0000000..7d9d70b
--- /dev/null
@@ -0,0 +1,5 @@
+PACKAGE_NAME="vizzini"
+PACKAGE_VERSION=#MODULE_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"
+DEST_MODULE_LOCATION[0]=/extra
diff --git a/debian/install b/debian/install
new file mode 100755 (executable)
index 0000000..19ed01f
--- /dev/null
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+set -eu
+
+VERSION=$(dpkg-parsechangelog -S Version | cut -d- -f 1)
+SRC=/usr/src/vizzini-$VERSION
+
+cat <<EOF
+Makefile      $SRC
+vizzini.c     $SRC
+vizzini.h     $SRC
+vzioctl.h     $SRC
+EOF
index 1faffd7..90520db 100755 (executable)
@@ -1,77 +1,13 @@
 #!/usr/bin/make -f
 
-# Uncomment this to turn on verbose mode. 
-export DH_VERBOSE=1
+%:
+       dh $@ --with dkms
 
-psource:=vizzini-source
-sname:=vizzini
-PACKAGE=vizzini-modules
-MA_DIR ?= /usr/share/modass
--include $(MA_DIR)/include/generic.make
--include $(MA_DIR)/include/common-rules.make
-DESTDIR = $(CURDIR)/debian/$(psource)/usr/src/modules/$(sname)
+override_dh_auto_configure:
+override_dh_auto_build:
+override_dh_auto_install:
+override_dh_auto_clean:
+       # We're only interested in the source
 
-kdist_config: prep-deb-files
-  
-kdist_clean: clean
-       $(MAKE) -f debian/rules clean
-
-kdist_image: binary-modules 
-
-binary-modules:
-       dh_testroot
-       dh_clean -k
-       dh_installdirs lib/modules/$(KVERS)/vizzini
-       $(MAKE) KERNELDIR=$(KSRC) KERNEL_VERSION=$(KVERS)
-       cp vizzini.ko debian/$(PKGNAME)/lib/modules/$(KVERS)/vizzini
-       dh_installdocs
-       dh_installchangelogs
-       dh_installmodules
-       cp debian/vizzini.udev debian/$(PKGNAME).udev
-       dh_installudev --priority=99
-       dh_compress
-       dh_fixperms
-       dh_installdeb
-       dh_gencontrol -- -v$(VERSION)
-       dh_md5sums
-       dh_builddeb --destdir=$(DEB_DESTDIR)
-       dh_clean -k
-       dh_testdir
-       touch $@
-
-clean:
-       dh_testdir
-       $(MAKE) clean
-       dh_clean
-
-install: build
-       dh_testdir
-       dh_testroot
-       dh_clean -k
-       dh_installdirs
-       dh_installdirs -p$(psource)  usr/src/modules/$(sname)/debian
-       cp Makefile README* vizzini.c vizzini.h vzioctl.h $(DESTDIR)
-       cp debian/*modules.in* debian/control debian/rules debian/changelog debian/copyright debian/compat $(DESTDIR)/debian
-       cp 99-vizzini.rules $(DESTDIR)/debian/vizzini.udev
-       cd debian/$(psource)/usr/src && tar c modules | bzip2 -9 > $(sname).tar.bz2 && rm -rf modules
-       dh_install
-
-binary-indep: build install
-       dh_testdir -i
-       dh_testroot -i
-       dh_installchangelogs  -i
-       dh_installdocs -i
-       dh_link -i
-       dh_compress -i
-       dh_fixperms -i
-       dh_installdeb -i
-       dh_installdeb -i
-       dh_shlibdeps -i
-       dh_gencontrol -i
-       dh_md5sums -i
-       dh_builddeb -i
-
-binary-arch:
-
-binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install configure binary-modules kdist kdist_configure kdist_image kdist_clean
+override_dh_dkms:
+       dh_dkms -V
diff --git a/debian/udev b/debian/udev
new file mode 100644 (file)
index 0000000..61ebe5c
--- /dev/null
@@ -0,0 +1 @@
+SUBSYSTEM=="usb", ATTR{idVendor}=="04e2", RUN+="/bin/sh -c 'echo -n %k:1.0 >/sys/bus/usb/drivers/cdc_acm/unbind; echo -n %k:1.0 >/sys/bus/usb/drivers/vizzini/bind'"