debian.rules: analog %ifarch

Hello everyone,

In spec-file I can use something like this for arch-specific build-rules:

%ifarch = x86_64
uname -p
%endif

How it works for debian.rules? Should I use dh_* macros or there are another ways to do this?

Thanks,
Alex

So, right now I use such solution:


DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH) 

install:
if  "$DEB_HOST_ARCH" = "amd64" ] ; then \
        echo "amd64" ; \
    else \
        echo "i386" ; \
    fi

If someone know better way to do this, please let me know.

Thanks,
Alex