Explicitely specify the architecture dependent lib directory for setcap
diff --git a/debian/changelog b/debian/changelog
index 073eb29..a6bba5f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,13 @@
+gstreamer1.0 (1.5.1-3) experimental; urgency=medium
+
+  * debian/rules,
+    debian/libgstreamer.postinst:
+    + Explicitely specify the architecture dependent lib directory, otherwise
+      setcap will fail if the package is installed for multiple architures.
+      It only allows one filename at a time (Closes: #788282).
+
+ -- Sebastian Dröge <slomo@debian.org>  Wed, 10 Jun 2015 10:13:10 +0200
+
 gstreamer1.0 (1.5.1-2) experimental; urgency=medium
 
   * debian/patches/0001-ptp-Check-for-the-actual-API-we-use-instead-of-just-.patch:
diff --git a/debian/libgstreamer.postinst b/debian/libgstreamer.postinst
index 4d0c42a..b46f64b 100644
--- a/debian/libgstreamer.postinst
+++ b/debian/libgstreamer.postinst
@@ -6,15 +6,15 @@
     # If we have setcap is installed, try setting cap_net_bind_service,cap_net_admin+ep,
     # which allows us to install our helper binary without the setuid bit.
     if command -v setcap > /dev/null; then
-        if setcap cap_net_bind_service,cap_net_admin+ep /usr/lib/*/gstreamer1.0/gstreamer-1.0/gst-ptp-helper; then
+        if setcap cap_net_bind_service,cap_net_admin+ep /usr/lib/@MULTIARCH@/gstreamer@GST_ABI@/gstreamer-@GST_ABI@/gst-ptp-helper; then
             echo "Setcap worked! gst-ptp-helper is not suid!"
         else
             echo "Setcap failed on gst-ptp-helper, falling back to setuid" >&2
-            chmod u+s /usr/lib/*/gstreamer1.0/gstreamer-1.0/gst-ptp-helper
+            chmod u+s /usr/lib/@MULTIARCH@/gstreamer@GST_ABI@/gstreamer-@GST_ABI@/gst-ptp-helper
         fi
     else
         echo "Setcap is not installed, falling back to setuid" >&2
-        chmod u+s /usr/lib/*/gstreamer1.0/gstreamer-1.0/gst-ptp-helper
+        chmod u+s /usr/lib/@MULTIARCH@/gstreamer@GST_ABI@/gstreamer-@GST_ABI@/gst-ptp-helper
     fi
 fi
 
diff --git a/debian/rules b/debian/rules
index b623fd0..688a171 100755
--- a/debian/rules
+++ b/debian/rules
@@ -108,7 +108,10 @@
 
 debian/$(gst_lib).postinst: debian/libgstreamer.postinst debian/rules
 	rm -f $@
-	cp -v $< $@
+	cat $< | \
+		sed 's/@MULTIARCH@/$(DEB_HOST_MULTIARCH)/g' | \
+		sed 's/@GST_ABI@/$(gst_abi)/g' \
+		> $@
 
 debian/gir1.2-gstreamer-$(gst_abi).install: debian/gir1.2-gstreamer.install debian/rules
 	rm -f $@