[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Multiarch: how to get arch in runtime?



Hi,

I am currently creating a package [1] that I want to have Multiarch
enabled. The program is started via a link to a shell script (for
historic reasons, this is C shell):

/usr/bin/iraf-cl -> /usr/share/iraf/unix/hlib/cl.csh

where the shell script contains some environmental settings, and then
shall finish with execing the "raw" binary:

[...]
setenv iraf_b /usr/lib/x86_64-linux-gnu/iraf/
exec ${iraf_b}bin/cl.e

(${iraf_b} is also used internally to find other libraries and
executables) My problem is now, how to find out the path here? I could
do a 

setenv iraf_b /usr/lib/`dpkg-architecture -qDEB_HOST_MULTIARCH`/iraf/

but, I thought dpkg-architecture to be a development helper and not a
common-user tool.

How could I solve this in a clean way?

Best regards

Ole

[1] IRAF, http://bugs.debian.org/690531


Reply to: