r3897: Automatic commit for debian_version_4_1_0-1
[ctsim.git] / debian / rules
index 0e73ff49be37fcb93707146205ef81cc8004ea7b..9dd19a4fa53b7f6a5d09e7137fca3a60b58baa9a 100755 (executable)
@@ -9,7 +9,7 @@ ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
        INSTALL_PROGRAM += -s
 endif
 
-host_arch      := $(dpkg-architecture -qDEB_HOST_ARCH)
+host_arch      := $(shell dpkg-architecture -qDEB_HOST_ARCH)
 
 pkg            := ctsim
 pkg-p4         := ctsim-pentium4
@@ -79,8 +79,9 @@ install: build
        #
        dh_installdirs -p $(pkg-help) $(ctsim-shared)
        ${MAKE} install
-       #
-ifneq (,$(findstring i386,$(host_Arch)))
+       echo Testing for i386 optimized builds
+       echo Host architecture is $(host_arch)
+ifneq (,$(findstring i386,$(host_arch)))
        echo Building CPU-specific i386 flavors
        # Pentium 4
        ${MAKE} clean
@@ -164,7 +165,11 @@ binary-arch: build install
        dh_shlibdeps -a
        dh_gencontrol -a
        dh_md5sums -a
-       dh_builddeb -a
+       dh_builddeb -p $(pkg)
+ifneq (,$(findstring i386,$(host_arch)))
+       dh_builddeb -p $(pkg-p4)
+       dh_builddeb -p $(pkg-athlon)
+endif
 
 binary: binary-indep binary-arch