+openvswitch (2.13.0+dfsg1-16) unstable; urgency=medium
+
+ * Generating postinst at build time to avoid using dpkg-architecture at
+ runtime.
+
+ -- Thomas Goirand <zigo@debian.org> Wed, 06 Jan 2021 22:13:51 +0100
+
openvswitch (2.13.0+dfsg1-15) unstable; urgency=medium
* Fix installing OVS alternatives on non-amd64 arch (Closes: #979366).
+++ /dev/null
-#!/bin/sh
-
-set -e
-
-if [ "${1}" = "configure" ] ; then
- update-alternatives --install /usr/sbin/ovs-vswitchd ovs-vswitchd /usr/lib/openvswitch-common/ovs-vswitchd 100 \
- --slave /usr/lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH)/libopenvswitch-2.13.so.0.0.0 libopenvswitch.so /usr/lib/openvswitch-common/libopenvswitch-2.13.so.0.0.0
-fi
-
-#DEBHELPER#
-
-exit 0
--- /dev/null
+#!/bin/sh
+
+set -e
+
+if [ "${1}" = "configure" ] ; then
+ update-alternatives --install /usr/sbin/ovs-vswitchd ovs-vswitchd /usr/lib/openvswitch-common/ovs-vswitchd 100 \
+ --slave /usr/lib/%%MULTIARCH_TRIPLETT%%/libopenvswitch-2.13.so.0.0.0 libopenvswitch.so /usr/lib/openvswitch-common/libopenvswitch-2.13.so.0.0.0
+fi
+
+#DEBHELPER#
+
+exit 0
+++ /dev/null
-#!/bin/sh
-
-set -e
-
-if [ "${1}" = "configure" ] ; then
- update-alternatives --install /usr/sbin/ovs-vswitchd ovs-vswitchd /usr/lib/openvswitch-switch-dpdk/ovs-vswitchd-dpdk 200 \
- --slave /usr/lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH)/libopenvswitch-2.13.so.0.0.0 libopenvswitch.so /usr/lib/openvswitch-switch-dpdk/libopenvswitch-2.13.so.0.0.0
-fi
-
-#DEBHELPER#
-
-exit 0
--- /dev/null
+#!/bin/sh
+
+set -e
+
+if [ "${1}" = "configure" ] ; then
+ update-alternatives --install /usr/sbin/ovs-vswitchd ovs-vswitchd /usr/lib/openvswitch-switch-dpdk/ovs-vswitchd-dpdk 200 \
+ --slave /usr/lib/%%MULTIARCH_TRIPLETT%%/libopenvswitch-2.13.so.0.0.0 libopenvswitch.so /usr/lib/openvswitch-switch-dpdk/libopenvswitch-2.13.so.0.0.0
+fi
+
+#DEBHELPER#
+
+exit 0
endif # nocheck
override_dh_auto_build:
+ set -e ; set -x ; for MYMAINTSCRIPT in openvswitch-common.postinst openvswitch-switch-dpdk.postinst ; do \
+ sed s/%%MULTIARCH_TRIPLETT%%/$$(dpkg-architecture -qDEB_HOST_MULTIARCH)/ debian/$$MYMAINTSCRIPT.in >debian/$$MYMAINTSCRIPT ; \
+ done
+
$(MAKE) $(PARALLEL) -C _debian dist distdir=openvswitch
$(MAKE) $(PARALLEL) -C _debian
ifneq (,$(filter i386 amd64 ppc64el arm64, $(DEB_HOST_ARCH)))
dh_auto_clean
set -e ; make python/ovs/version.py && cd python && python3 setup.py clean ; rm -f ovs/version.py ; cd ..
rm -rf _debian _dpdk
+ rm -f debian/openvswitch-common.postinst debian/openvswitch-switch-dpdk.postinst
override_dh_auto_install-arch:
$(MAKE) -C _debian DESTDIR=$(CURDIR)/debian/tmp install