--- old/usr/src/pkg/manifests/system-file-system-zfs.mf	2014-04-11 13:24:15.618131937 +0100
+++ new/usr/src/pkg/manifests/system-file-system-zfs.mf	2014-04-11 13:24:15.626208305 +0100
@@ -23,6 +23,7 @@
 # Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
 # Copyright (c) 2012 by Delphix. All rights reserved.
 # Copyright (c) 2013 by Saso Kiselkov. All rights reserved.
+# Copyright 2014 Andrew Stormont.
 #
 
 set name=pkg.fmri value=pkg:/system/file-system/zfs@$(PKGVERS)
@@ -51,21 +52,21 @@
 dir path=kernel/kmdb group=sys
 dir path=kernel/kmdb/$(ARCH64) group=sys
 dir path=lib
-dir path=lib/$(ARCH64)
+$(BUILD64)dir path=lib/$(ARCH64)
 dir path=sbin group=sys
 dir path=usr group=sys
 dir path=usr/lib
-dir path=usr/lib/$(ARCH64)
+$(BUILD64)dir path=usr/lib/$(ARCH64)
 dir path=usr/lib/devfsadm group=sys
 dir path=usr/lib/devfsadm/linkmod group=sys
 dir path=usr/lib/fs group=sys
 dir path=usr/lib/fs/zfs group=sys
 dir path=usr/lib/mdb group=sys
 dir path=usr/lib/mdb/kvm group=sys
-dir path=usr/lib/mdb/kvm/$(ARCH64) group=sys
+$(BUILD64)dir path=usr/lib/mdb/kvm/$(ARCH64) group=sys
 dir path=usr/lib/mdb/proc group=sys
-$(sparc_ONLY)dir path=usr/lib/mdb/proc/$(ARCH64) group=sys
-$(i386_ONLY)dir path=usr/lib/mdb/proc/$(ARCH64)
+$(sparc_BUILD64)dir path=usr/lib/mdb/proc/$(ARCH64) group=sys
+$(i386_BUILD64)dir path=usr/lib/mdb/proc/$(ARCH64)
 dir path=usr/lib/python2.6
 dir path=usr/lib/python2.6/vendor-packages
 dir path=usr/lib/python2.6/vendor-packages/zfs
@@ -74,7 +75,7 @@
 dir path=usr/lib/zfs
 dir path=usr/sbin
 $(i386_ONLY)dir path=usr/sbin/$(ARCH32)
-dir path=usr/sbin/$(ARCH64)
+$(BUILD64)dir path=usr/sbin/$(ARCH64)
 dir path=usr/share/man/man1m
 driver name=zfs perms="* 0600 root sys" perms="zfs 0666 root sys"
 file \
@@ -85,10 +86,10 @@
 file path=kernel/drv/zfs.conf group=sys
 file path=kernel/kmdb/$(ARCH64)/zfs group=sys mode=0555
 $(i386_ONLY)file path=kernel/kmdb/zfs group=sys mode=0555
-file path=lib/$(ARCH64)/libzfs.so.1
-file path=lib/$(ARCH64)/libzfs_core.so.1
-file path=lib/$(ARCH64)/llib-lzfs.ln
-file path=lib/$(ARCH64)/llib-lzfs_core.ln
+$(BUILD64)file path=lib/$(ARCH64)/libzfs.so.1
+$(BUILD64)file path=lib/$(ARCH64)/libzfs_core.so.1
+$(BUILD64)file path=lib/$(ARCH64)/llib-lzfs.ln
+$(BUILD64)file path=lib/$(ARCH64)/llib-lzfs_core.ln
 file path=lib/libzfs.so.1
 file path=lib/libzfs_core.so.1
 file path=lib/llib-lzfs
@@ -97,16 +98,16 @@
 file path=lib/llib-lzfs_core.ln
 file path=sbin/zfs mode=0555
 file path=sbin/zpool mode=0555
-file path=usr/lib/$(ARCH64)/libzfs_jni.so.1
-file path=usr/lib/$(ARCH64)/libzpool.so.1
+$(BUILD64)file path=usr/lib/$(ARCH64)/libzfs_jni.so.1
+$(BUILD64)file path=usr/lib/$(ARCH64)/libzpool.so.1
 file path=usr/lib/devfsadm/linkmod/SUNW_zfs_link.so group=sys
 file path=usr/lib/fs/zfs/bootinstall mode=0555
 file path=usr/lib/fs/zfs/fstyp.so.1 mode=0555
 file path=usr/lib/libzfs_jni.so.1
 $(i386_ONLY)file path=usr/lib/libzpool.so.1
-file path=usr/lib/mdb/kvm/$(ARCH64)/zfs.so group=sys mode=0555
+$(BUILD64)file path=usr/lib/mdb/kvm/$(ARCH64)/zfs.so group=sys mode=0555
 $(i386_ONLY)file path=usr/lib/mdb/kvm/zfs.so group=sys mode=0555
-file path=usr/lib/mdb/proc/$(ARCH64)/libzpool.so group=sys mode=0555
+$(BUILD64)file path=usr/lib/mdb/proc/$(ARCH64)/libzpool.so group=sys mode=0555
 file path=usr/lib/mdb/proc/libzpool.so group=sys mode=0555
 file path=usr/lib/python2.6/vendor-packages/zfs/__init__.py
 file path=usr/lib/python2.6/vendor-packages/zfs/__init__.pyc
@@ -132,7 +133,7 @@
 file path=usr/lib/zfs/pyzfs.py mode=0555
 file path=usr/lib/zfs/pyzfs.pyc mode=0555
 $(i386_ONLY)file path=usr/sbin/$(ARCH32)/zdb mode=0555
-file path=usr/sbin/$(ARCH64)/zdb mode=0555
+$(BUILD64)file path=usr/sbin/$(ARCH64)/zdb mode=0555
 file path=usr/sbin/zstreamdump mode=0555
 file path=usr/share/man/man1m/zdb.1m
 file path=usr/share/man/man1m/zfs.1m
@@ -153,23 +154,23 @@
     license=usr/src/uts/common/fs/zfs/THIRDPARTYLICENSE.lz4
 link path=etc/fs/zfs/mount target=../../../sbin/zfs
 link path=etc/fs/zfs/umount target=../../../sbin/zfs
-link path=lib/$(ARCH64)/libzfs.so target=libzfs.so.1
-link path=lib/$(ARCH64)/libzfs_core.so target=libzfs_core.so.1
+$(BUILD64)link path=lib/$(ARCH64)/libzfs.so target=libzfs.so.1
+$(BUILD64)link path=lib/$(ARCH64)/libzfs_core.so target=libzfs_core.so.1
 link path=lib/libzfs.so target=libzfs.so.1
 link path=lib/libzfs_core.so target=libzfs_core.so.1
-link path=usr/lib/$(ARCH64)/libzfs.so \
+$(BUILD64)link path=usr/lib/$(ARCH64)/libzfs.so \
     target=../../../lib/$(ARCH64)/libzfs.so.1
-link path=usr/lib/$(ARCH64)/libzfs.so.1 \
+$(BUILD64)link path=usr/lib/$(ARCH64)/libzfs.so.1 \
     target=../../../lib/$(ARCH64)/libzfs.so.1
-link path=usr/lib/$(ARCH64)/libzfs_core.so \
+$(BUILD64)link path=usr/lib/$(ARCH64)/libzfs_core.so \
     target=../../../lib/$(ARCH64)/libzfs_core.so.1
-link path=usr/lib/$(ARCH64)/libzfs_core.so.1 \
+$(BUILD64)link path=usr/lib/$(ARCH64)/libzfs_core.so.1 \
     target=../../../lib/$(ARCH64)/libzfs_core.so.1
-link path=usr/lib/$(ARCH64)/libzfs_jni.so target=libzfs_jni.so.1
-link path=usr/lib/$(ARCH64)/libzpool.so target=libzpool.so.1
-link path=usr/lib/$(ARCH64)/llib-lzfs.ln \
+$(BUILD64)link path=usr/lib/$(ARCH64)/libzfs_jni.so target=libzfs_jni.so.1
+$(BUILD64)link path=usr/lib/$(ARCH64)/libzpool.so target=libzpool.so.1
+$(BUILD64)link path=usr/lib/$(ARCH64)/llib-lzfs.ln \
     target=../../../lib/$(ARCH64)/llib-lzfs.ln
-link path=usr/lib/$(ARCH64)/llib-lzfs_core.ln \
+$(BUILD64)link path=usr/lib/$(ARCH64)/llib-lzfs_core.ln \
     target=../../../lib/$(ARCH64)/llib-lzfs_core.ln
 link path=usr/lib/fs/zfs/mount target=../../../../sbin/zfs
 link path=usr/lib/fs/zfs/umount target=../../../../sbin/zfs
