diff --git a/debian/libnvpair1linux.install b/debian/libnvpair1linux.install deleted file mode 100644 index 34a0f61..0000000 --- a/debian/libnvpair1linux.install +++ /dev/null @@ -1 +0,0 @@ -lib/libnvpair.so.* diff --git a/debian/libnvpair1linux.install.in b/debian/libnvpair1linux.install.in new file mode 100644 index 0000000..ed7b541 --- /dev/null +++ b/debian/libnvpair1linux.install.in @@ -0,0 +1 @@ +lib/@DEB_HOST_MULTIARCH@/libnvpair.so.* diff --git a/debian/libuutil1linux.install b/debian/libuutil1linux.install deleted file mode 100644 index c7fa63e..0000000 --- a/debian/libuutil1linux.install +++ /dev/null @@ -1 +0,0 @@ -lib/libuutil.so.* diff --git a/debian/libuutil1linux.install.in b/debian/libuutil1linux.install.in new file mode 100644 index 0000000..a197d03 --- /dev/null +++ b/debian/libuutil1linux.install.in @@ -0,0 +1 @@ +lib/@DEB_HOST_MULTIARCH@/libuutil.so.* diff --git a/debian/libzfs2linux.install b/debian/libzfs2linux.install deleted file mode 100644 index 660dede..0000000 --- a/debian/libzfs2linux.install +++ /dev/null @@ -1,2 +0,0 @@ -lib/libzfs.so.* -lib/libzfs_core.so.* diff --git a/debian/libzfs2linux.install.in b/debian/libzfs2linux.install.in new file mode 100644 index 0000000..6765aae --- /dev/null +++ b/debian/libzfs2linux.install.in @@ -0,0 +1,2 @@ +lib/@DEB_HOST_MULTIARCH@/libzfs.so.* +lib/@DEB_HOST_MULTIARCH@/libzfs_core.so.* diff --git a/debian/libzfslinux-dev.install b/debian/libzfslinux-dev.install deleted file mode 100644 index 1a74689..0000000 --- a/debian/libzfslinux-dev.install +++ /dev/null @@ -1,4 +0,0 @@ -lib/*.a usr/lib/ -usr/include -usr/lib/*.so -lib/pkgconfig/*.pc usr/lib/pkgconfig/ diff --git a/debian/libzfslinux-dev.install.in b/debian/libzfslinux-dev.install.in new file mode 100644 index 0000000..e515ddb --- /dev/null +++ b/debian/libzfslinux-dev.install.in @@ -0,0 +1,4 @@ +lib/@DEB_HOST_MULTIARCH@/*.a usr/lib/@DEB_HOST_MULTIARCH@/ +usr/include +usr/lib/@DEB_HOST_MULTIARCH@/*.so +/usr/lib/@DEB_HOST_MULTIARCH@/pkgconfig/*.pc diff --git a/debian/libzpool2linux.install b/debian/libzpool2linux.install deleted file mode 100644 index d886d29..0000000 --- a/debian/libzpool2linux.install +++ /dev/null @@ -1 +0,0 @@ -lib/libzpool.so.* diff --git a/debian/libzpool2linux.install.in b/debian/libzpool2linux.install.in new file mode 100644 index 0000000..b9e872d --- /dev/null +++ b/debian/libzpool2linux.install.in @@ -0,0 +1 @@ +lib/@DEB_HOST_MULTIARCH@/libzpool.so.* diff --git a/debian/rules b/debian/rules index 623cc61..0e168ee 100755 --- a/debian/rules +++ b/debian/rules @@ -28,7 +28,8 @@ override_dh_auto_configure: dh_auto_configure -- \ --bindir=/usr/bin \ --sbindir=/sbin \ - --libdir=/lib \ + --libdir=/lib/"$(DEB_HOST_MULTIARCH)" \ + --with-pkgconfigdir='/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig' \ --with-udevdir=/lib/udev \ --with-zfsexecdir=/usr/lib/zfs-linux \ --enable-systemd \ @@ -39,6 +40,11 @@ override_dh_auto_configure: --with-systemdgeneratordir=/lib/systemd/system-generators \ --with-config=user + for i in $(wildcard $(CURDIR)/debian/*.install.in) ; do \ + basename "$$i" | grep _KVERS_ && continue ; \ + sed 's/@DEB_HOST_MULTIARCH@/$(DEB_HOST_MULTIARCH)/g' "$$i" > "$${i%%.in}" ; \ + done + override_dh_auto_test: # The dh_auto_test rule is disabled because # `make check` cannot run in an unprivileged build environment. @@ -62,9 +68,9 @@ override_dh_auto_install: @# Zed has dependencies outside of the system root. mv '$(CURDIR)/debian/tmp/sbin/zed' '$(CURDIR)/debian/tmp/usr/sbin/zed' - mkdir -p $(CURDIR)/debian/tmp/usr/lib - for i in `ls $(CURDIR)/debian/tmp/lib/*.so`; do \ - ln -s /lib/`readlink $${i}` $(CURDIR)/debian/tmp/usr/lib/`basename $${i}`; \ + mkdir -p $(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH) + for i in `ls $(CURDIR)/debian/tmp/lib/$(DEB_HOST_MULTIARCH)/*.so`; do \ + ln -s /lib/$(DEB_HOST_MULTIARCH)/`readlink $${i}` $(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/`basename $${i}`; \ rm $${i}; \ done