]> git.proxmox.com Git - mirror_spl-debian.git/commitdiff
Retrieve the arch from 'dpkg', don't hardcode it to 'amd64'.
authorTurbo Fredriksson <turbo@bayour.com>
Wed, 22 May 2013 20:14:26 +0000 (22:14 +0200)
committerAron Xu <aron@debian.org>
Fri, 12 Jul 2013 18:20:38 +0000 (02:20 +0800)
+ Also install modules to '/lib/modules/<VERSION>-<ARCH>/'.

debian/control.modules.in
debian/rules
debian/spl-modules-_KVERS_-_ARCH_-di.dirs.in [new file with mode: 0644]
debian/spl-modules-_KVERS_-_ARCH_-di.install.in [new file with mode: 0644]
debian/spl-modules-_KVERS_-_ARCH_.dirs.in [new file with mode: 0644]
debian/spl-modules-_KVERS_-_ARCH_.install.in [new file with mode: 0644]
debian/spl-modules-_KVERS_-amd64-di.dirs.in [deleted file]
debian/spl-modules-_KVERS_-amd64-di.install.in [deleted file]
debian/spl-modules-_KVERS_.dirs.in [deleted file]
debian/spl-modules-_KVERS_.install.in [deleted file]

index 10e791579f8806360cd3e87f666230acbb8bb2ba..5f88c9b27e844a730b7a1e541fbabee26325e606 100644 (file)
@@ -10,14 +10,14 @@ Build-Depends: autotools-dev,
  dkms (>> 2.1.1.2-5),
  libtool,
  linux-headers-_KVERS_-common,
- linux-headers-_KVERS_-amd64
+ linux-headers-_KVERS_-_ARCH_
 Standards-Version: 3.8.4
 Homepage: http://www.zfsonlinux.org/
 Vcs-Git: git://anonscm.debian.org/pkg-zfsonlinux/spl.git
 Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-zfsonlinux/spl.git
 
-Package: spl-modules-_KVERS_
-Architecture: amd64
+Package: spl-modules-_KVERS_-_ARCH_
+Architecture: _ARCH_
 Provides: spl-module
 Description: Solaris Porting Layer kernel modules for Linux (kernel _KVERS_)
  The Solaris Porting Layer (SPL) is a Linux kernel module which provides
@@ -32,12 +32,12 @@ Description: Solaris Porting Layer kernel modules for Linux (kernel _KVERS_)
  provided for use with the Debian kernel-package utility to produce a 
  version of spl-module for your kernel.
 
-Package: spl-modules-_KVERS_-amd64-di
+Package: spl-modules-_KVERS_-_ARCH_-di
 Package-Type: udeb
-Provides: spl-modules-_KVERS_-udeb
+Provides: spl-modules-_KVERS_-_ARCH_-udeb
 Section: debian-installer
-Architecture: amd64
-Depends: ${shlibs:Depends}, ${misc:Depends}, zlib-modules-_KVERS_-amd64-di
+Architecture: _ARCH_
+Depends: ${shlibs:Depends}, ${misc:Depends}, zlib-modules-_KVERS_-_ARCH_-di
 Description: Solaris Porting Layer kernel modules for Linux (debian-installar version for kernel _KVERS_)
  The Solaris Porting Layer (SPL) is a Linux kernel module which provides
  many of the Solaris kernel APIs. This shim layer makes it possible to
index d8f066af42b9d03d199d7e35a5d25ae38be01aa0..5185f9df5979fe8786662b20a4ba09b784ada3f8 100755 (executable)
@@ -7,9 +7,13 @@ VERSION := $(shell dpkg-parsechangelog \
 DKMSFILES := module include config spl.release.in autogen.sh \
                META AUTHORS DISCLAIMER
 
+ifndef DEB_HOST_ARCH
+DEB_HOST_ARCH = $(shell dpkg-architecture -qDEB_HOST_ARCH)
+endif
+
 non_epoch_version=$(shell echo $(KVERS) | perl -pe 's/^\d+://')
 PACKAGE=spl
-pmodules = $(PACKAGE)-modules-$(non_epoch_version)
+pmodules = $(PACKAGE)-modules-$(non_epoch_version)-$(DEB_HOST_ARCH)
 
 %:
        dh $@ --with dkms
@@ -75,10 +79,10 @@ override_dh_auto_clean:
 
 override_dh_prep-deb-files:
        for templ in $(wildcard $(CURDIR)/debian/*_KVERS_*.in); do \
-               sed -e 's/##KVERS##/$(KVERS)/g ; s/#KVERS#/$(KVERS)/g ; s/_KVERS_/$(KVERS)/g ; s/##KDREV##/$(KDREV)/g ; s/#KDREV#/$(KDREV)/g ; s/_KDREV_/$(KDREV)/g  ' \
-               < $$templ > `echo $$templ | sed -e 's/_KVERS_/$(KVERS)/g' -e 's/\.in$$//'` ; \
+               sed -e 's/##KVERS##/$(KVERS)/g ; s/#KVERS#/$(KVERS)/g ; s/_KVERS_/$(KVERS)/g ; s/##KDREV##/$(KDREV)/g ; s/#KDREV#/$(KDREV)/g ; s/_KDREV_/$(KDREV)/g ;  s/_ARCH_/$(DEB_HOST_ARCH)/g' \
+               < $$templ > `echo $$templ | sed -e 's/_KVERS_/$(KVERS)/g ; s/_ARCH_/$(DEB_HOST_ARCH)/g ; s/\.in$$//'` ; \
        done
-       sed -e 's/##KVERS##/$(KVERS)/g ; s/#KVERS#/$(KVERS)/g ; s/_KVERS_/$(KVERS)/g ; s/##KDREV##/$(KDREV)/g ; s/#KDREV#/$(KDREV)/g ; s/_KDREV_/$(KDREV)/g  ' \
+       sed -e 's/##KVERS##/$(KVERS)/g ; s/#KVERS#/$(KVERS)/g ; s/_KVERS_/$(KVERS)/g ; s/##KDREV##/$(KDREV)/g ; s/#KDREV#/$(KDREV)/g ; s/_KDREV_/$(KDREV)/g ; s/_ARCH_/$(DEB_HOST_ARCH)/g' \
        < debian/control.modules.in > debian/control
 
 override_dh_configure_modules: override_dh_configure_modules_stamp
@@ -94,11 +98,11 @@ override_dh_binary-modules-udeb: override_dh_prep-deb-files override_dh_configur
 
        $(MAKE) -C $(CURDIR)/module modules
 
-       dh_installdirs -p${pmodules}-amd64-di
-       dh_install -p${pmodules}-amd64-di
-       dh_gencontrol -p${pmodules}-amd64-di
+       dh_installdirs -p${pmodules}-di
+       dh_install -p${pmodules}-di
+       dh_gencontrol -p${pmodules}-di
 
-       dh_builddeb -p${pmodules}-amd64-di --destdir=$(DEB_DESTDIR)
+       dh_builddeb -p${pmodules}-di --destdir=$(DEB_DESTDIR)
 
 override_dh_binary-modules: override_dh_prep-deb-files override_dh_configure_modules
        dh_testdir
diff --git a/debian/spl-modules-_KVERS_-_ARCH_-di.dirs.in b/debian/spl-modules-_KVERS_-_ARCH_-di.dirs.in
new file mode 100644 (file)
index 0000000..4542423
--- /dev/null
@@ -0,0 +1,2 @@
+lib/modules/_KVERS_-_ARCH_/extra/spl
+lib/modules/_KVERS_-_ARCH_/extra/splat
diff --git a/debian/spl-modules-_KVERS_-_ARCH_-di.install.in b/debian/spl-modules-_KVERS_-_ARCH_-di.install.in
new file mode 100644 (file)
index 0000000..45a0cb5
--- /dev/null
@@ -0,0 +1,2 @@
+module/spl/spl.ko      lib/modules/_KVERS_-_ARCH_/extra/spl/
+module/splat/splat.ko  lib/modules/_KVERS_-_ARCH_/extra/splat/
diff --git a/debian/spl-modules-_KVERS_-_ARCH_.dirs.in b/debian/spl-modules-_KVERS_-_ARCH_.dirs.in
new file mode 100644 (file)
index 0000000..4542423
--- /dev/null
@@ -0,0 +1,2 @@
+lib/modules/_KVERS_-_ARCH_/extra/spl
+lib/modules/_KVERS_-_ARCH_/extra/splat
diff --git a/debian/spl-modules-_KVERS_-_ARCH_.install.in b/debian/spl-modules-_KVERS_-_ARCH_.install.in
new file mode 100644 (file)
index 0000000..45a0cb5
--- /dev/null
@@ -0,0 +1,2 @@
+module/spl/spl.ko      lib/modules/_KVERS_-_ARCH_/extra/spl/
+module/splat/splat.ko  lib/modules/_KVERS_-_ARCH_/extra/splat/
diff --git a/debian/spl-modules-_KVERS_-amd64-di.dirs.in b/debian/spl-modules-_KVERS_-amd64-di.dirs.in
deleted file mode 100644 (file)
index b37016e..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-lib/modules/_KVERS_/extra/spl
-lib/modules/_KVERS_/extra/splat
diff --git a/debian/spl-modules-_KVERS_-amd64-di.install.in b/debian/spl-modules-_KVERS_-amd64-di.install.in
deleted file mode 100644 (file)
index 946e3f2..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-module/spl/spl.ko      lib/modules/_KVERS_/extra/spl/
-module/splat/splat.ko  lib/modules/_KVERS_/extra/splat/
diff --git a/debian/spl-modules-_KVERS_.dirs.in b/debian/spl-modules-_KVERS_.dirs.in
deleted file mode 100644 (file)
index b37016e..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-lib/modules/_KVERS_/extra/spl
-lib/modules/_KVERS_/extra/splat
diff --git a/debian/spl-modules-_KVERS_.install.in b/debian/spl-modules-_KVERS_.install.in
deleted file mode 100644 (file)
index 946e3f2..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-module/spl/spl.ko      lib/modules/_KVERS_/extra/spl/
-module/splat/splat.ko  lib/modules/_KVERS_/extra/splat/