[pve-devel] [PATCH zfsonlinux 2/9] Install files under multiarch directories
Stoiko Ivanov
s.ivanov at proxmox.com
Wed Dec 2 20:18:02 CET 2020
adapted from debian-upstream 8f137b115a89348e7816f60b5e8410fd303fec81
Signed-off-by: Stoiko Ivanov <s.ivanov at proxmox.com>
---
debian/libnvpair1linux.install | 1 -
debian/libnvpair1linux.install.in | 1 +
debian/libuutil1linux.install | 1 -
debian/libuutil1linux.install.in | 1 +
debian/libzfs2linux.install | 2 --
debian/libzfs2linux.install.in | 2 ++
debian/libzfslinux-dev.install | 4 ----
debian/libzfslinux-dev.install.in | 4 ++++
debian/libzpool2linux.install | 1 -
debian/libzpool2linux.install.in | 1 +
debian/rules | 14 ++++++++++----
11 files changed, 19 insertions(+), 13 deletions(-)
delete mode 100644 debian/libnvpair1linux.install
create mode 100644 debian/libnvpair1linux.install.in
delete mode 100644 debian/libuutil1linux.install
create mode 100644 debian/libuutil1linux.install.in
delete mode 100644 debian/libzfs2linux.install
create mode 100644 debian/libzfs2linux.install.in
delete mode 100644 debian/libzfslinux-dev.install
create mode 100644 debian/libzfslinux-dev.install.in
delete mode 100644 debian/libzpool2linux.install
create mode 100644 debian/libzpool2linux.install.in
diff --git a/debian/libnvpair1linux.install b/debian/libnvpair1linux.install
deleted file mode 100644
index 34a0f618..00000000
--- 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 00000000..ed7b541e
--- /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 c7fa63e7..00000000
--- 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 00000000..a197d030
--- /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 660dede8..00000000
--- 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 00000000..6765aaee
--- /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 1a74689a..00000000
--- 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 00000000..e515ddb8
--- /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 d886d295..00000000
--- 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 00000000..b9e872df
--- /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 623cc610..0e168ee1 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
--
2.20.1
More information about the pve-devel
mailing list