|  | @@ -8,6 +8,7 @@ endif
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  DEB_HOST_GNU_TYPE	?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
 | 
	
		
			
				|  |  |  DEB_BUILD_GNU_TYPE	?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
 | 
	
		
			
				|  |  | +DEB_HOST_ARCH		?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
 | 
	
		
			
				|  |  |  DEB_HOST_MULTIARCH	?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
 | 
	
	
		
			
				|  | @@ -61,7 +62,8 @@ override_dh_auto_configure:
 | 
	
		
			
				|  |  |  override_dh_auto_install:
 | 
	
		
			
				|  |  |  	dh_auto_install
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -	mv debian/tmp/usr/share/misc debian/tmp/usr/share/file
 | 
	
		
			
				|  |  | +	mkdir -p debian/tmp/lib/$(DEB_HOST_MULTIARCH)
 | 
	
		
			
				|  |  | +	mv debian/tmp/usr/share/misc debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/file
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  	install -D -m 0644 magic/magic.local debian/tmp/etc/magic
 | 
	
		
			
				|  |  |  	install -D -m 0644 magic/magic.local debian/tmp/etc/magic.mime
 | 
	
	
		
			
				|  | @@ -98,7 +100,7 @@ ifeq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
 | 
	
		
			
				|  |  |  	# use just built file in dh_shlibdeps
 | 
	
		
			
				|  |  |  	PATH=$(CURDIR)/debian/file/usr/bin:$$PATH \
 | 
	
		
			
				|  |  |  		LD_LIBRARY_PATH=$(CURDIR)/debian/libmagic1/usr/lib/$(DEB_HOST_MULTIARCH)$${LD_LIBRARY_PATH+:$${LD_LIBRARY_PATH}} \
 | 
	
		
			
				|  |  | -		MAGIC=$(CURDIR)/debian/libmagic1/usr/share/file/magic.mgc \
 | 
	
		
			
				|  |  | +		MAGIC=$(CURDIR)/debian/libmagic1/usr/lib/$(DEB_HOST_MULTIARCH)/file/magic.mgc \
 | 
	
		
			
				|  |  |  		dh_shlibdeps -Llibmagic1 -ldebian/libmagic1/usr/lib
 | 
	
		
			
				|  |  |  else
 | 
	
		
			
				|  |  |  	dh_shlibdeps -Llibmagic1 -ldebian/libmagic1/usr/lib
 | 
	
	
		
			
				|  | @@ -109,8 +111,12 @@ ifeq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
 | 
	
		
			
				|  |  |  	# use just built file in dh_strip
 | 
	
		
			
				|  |  |  	PATH=$(CURDIR)/debian/file/usr/bin:$$PATH \
 | 
	
		
			
				|  |  |  		LD_LIBRARY_PATH=$(CURDIR)/debian/libmagic1/usr/lib/$(DEB_HOST_MULTIARCH)$${LD_LIBRARY_PATH+:$${LD_LIBRARY_PATH}} \
 | 
	
		
			
				|  |  | -		MAGIC=$(CURDIR)/debian/libmagic1/usr/share/file/magic.mgc \
 | 
	
		
			
				|  |  | +		MAGIC=$(CURDIR)/debian/libmagic1/usr/lib/$(DEB_HOST_MULTIARCH)/file/magic.mgc \
 | 
	
		
			
				|  |  |  		dh_strip --dbg-package=file-dbg
 | 
	
		
			
				|  |  |  else
 | 
	
		
			
				|  |  |  	dh_strip --dbg-package=file-dbg
 | 
	
		
			
				|  |  |  endif
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +override_dh_installdeb:
 | 
	
		
			
				|  |  | +	debian/magic-symlink "$(DEB_HOST_ARCH)" "$(DEB_HOST_MULTIARCH)"
 | 
	
		
			
				|  |  | +	dh_installdeb
 |