Unify Dragora 2.x dragbuild script

About using just one dragbuild script for build ix86 and x86_64 dragora packages

Hi dragorians, I was trying to build some upgrades to D2 (Dragora 2.x) packages, and usually I found that the difference between dragbuild-32 and dragbuild-64 scripts are just the ARCH (i486 or x86_64) variable and the library directory (lib for 32 bits and lib64 for for 64 bits) I found that a little use of some coreutils commands like uname and the information provided by /proc/cpuinfo allow to autodetect architecture at runtime, and some bash lines to set up properly the library directory. I have a code prototype, based on some scripts the selk provides

case "$(uname -m)" in
	i?86)	export ARCH=i486
		BANDERAS="-march=i486 -mtune=i686"
	x86_64)	export ARCH=x86_64
	*) export ARCH=$(uname -m)

Then for the library directory
./configure \
 --prefix=/usr \
 --datarootdir=/usr \
 --sysconfdir=/etc \
 --libdir=/usr/lib${SUFARQ} \
 --libexecdir=/lib \

It can be improved if we think in cross compilation, maybe we can add arguments checking to the script for setting up the architecture.
Is just an idea, to your consideration. What do you say ?


Thanks, it works well.


You need to add DCFLAGS=${DCFLAGS:=-O2 ${BANDERAS}} and CFLAGS="$DCFLAGS" \ before ./configure \ otherwise what is the point of BANDERAS?


Necrobumping, yes you are right frusen BANDERAS should be used in DCFLAGS and then asigned to CFLAGS / CXXFLAGS before or in the same line that configure.

Miss you all dragorians