aboutsummaryrefslogtreecommitdiffstats
path: root/src/getname.sh
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2014-01-04 22:56:07 +0100
committerGuilhem Moulin <guilhem@fripost.org>2015-06-07 04:27:55 +0200
commit3510a345f0f083d2c34f27c1bb3f762325a92826 (patch)
tree82af6ccb35bb9460d85e43694f8ccf2a13b51996 /src/getname.sh
parent71f227f2e30630f7bfbe1e4520efb727779b3b16 (diff)
Use dpkg-architecture(1).
When compiling for x86_86 on a i386 machine or vice versa, the following warning appears: dpkg-architecture: warning: specified GNU system type x86_64-linux-gnu does not match gcc system type i486-linux-gnu, try setting a correct CC environment variable However this is harmless, even if the multilib approach is a bit hacky and does not replace a proper cross-compiler. Cf. bug #712000 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=712000
Diffstat (limited to 'src/getname.sh')
-rwxr-xr-xsrc/getname.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/getname.sh b/src/getname.sh
index f9ed5ec..3bd5bf6 100755
--- a/src/getname.sh
+++ b/src/getname.sh
@@ -21,7 +21,8 @@ else
if [ -r "$dir/debian/files" ]; then
echo src/$(cut -d' ' -f1 "$dir/debian/files")
else
- sed -nr 's@^(\S+) \(([0-9.]+)\).*@src/\1_\2_all.udeb@p' "$dir/debian/changelog"
+ deb_arch=$(dpkg-architecture -qDEB_HOST_ARCH ${ARCH:+-a$ARCH})
+ sed -nr "s@^(\S+) \(([0-9.]+)\).*@src/\1_\2_${deb_arch}.udeb@p" "$dir/debian/changelog"
fi
done
fi