Request Custombuild small modification to Webalizer

redesb

Verified User
Joined
May 10, 2004
Messages
193
Location
Spain
As many know, when you compile Webalizer can add several extra options which unfortunately can not be added by default for all users, for obvious reasons.

Personally, I would like to add the option '--with-language=<language>' and some other, but as 'CustomBuild' is built does not allow me to.

The amendment, as far as I know, it's not too complicated, we should add the following code where appropriate.
Code:
# Variable for Webalizer
WEBALIZER_CONFIGURE=configure/webalizer/configure.webalizer
if [ -e custom/webalizer/configure.webalizer ]; then
	WEBALIZER_CONFIGURE=custom/webalizer/configure.webalizer
fi
Slightly modify the 'doWebalizer' function (The last line is the important)
Code:
doWebalizer() {
	quitIfLocked doWebalizer

	if [ "${WEBALIZER_OPT}" != "yes" ]; then
		echo "You cannot install webalizer, because you do not have it set in options.conf file."
		setVal webalizer 0 ${DACONF_TEMPLATE_FILE}
		setVal webalizer 0 ${DACONF_FILE}
		exit 1
	fi

	if [ -e ${PREFIX}/bin/webalizer ]; then
		echo "The webalizer binary exists, aborting.  Delete ${PREFIX}/bin/webalizer if you wish to compile."
		removeLockfile
		return
	fi

	[[ ${OS} = "FreeBSD" ]] && BSD_PATH=/local || BSD_PATH=
	PREFIX=/usr${BSD_PATH}
	LIBPATH=/usr${BSD_PATH}/lib
	INCPATH=/usr${BSD_PATH}/include

	cd ${CWD};
	getFile ${WEBALIZER_FILE} webalizer
	tar xzf ${WEBALIZER_FILE} --no-same-owner
	cd ${WEBALIZER}

	${CWD}/${WEBALIZER_CONFIGURE} ${PREFIX} ${LIBPATH} ${INCPATH}
And add the following bash script (webalizer.configure) in the 'configure/webalizer' directory
Code:
#!/bin/sh
export LD_LIBRARY_PATH=$2
"./configure" \
"--prefix=$1" \
"--with-png=$2" \
"--with-gdlib=$2" \
"--with-gd=$3" \
"--enable-dns" \
"--with-dblib" \
"--with-db" \
"--with-z-inc" \
"--with-zlib"
Everything will still work the same, but this would allow us to copy the script 'webalizer.configure' to 'custom' directory and make the changes that everyone needs.

Would it be possible to add such modifications?

Ramón
 
Webalizer is very old, and not updated :) So, 1-time custom compilation and setting webalizer=no in the options.conf would do the trick for you, it should be fine for many years, don't you think so?
 
You're absolutely right, that's another solution. However, since it is possible to disable 'Webalizer' in 'CustomBuild' I wondered if you currently still need to have it installed for the proper performance of 'DirectAdmin'.
 
Martynas, I finally took your advice and have disabled 'webalizer' in 'custombuild' (2.0) and I have compiled manually. However, I found some problems related to 'GD' which apparently is necessary for proper compilation.

After searching the forum for a solution, the closest thing I found was a thread that mentioned that the error does not matter, because apparently 'webalizer' works also without the 'GD' library.

Still, my obsessive / compulsive nature often prevents me from leaving things half finished and finally I solved the problem and if someone is interested, I created a 'HOW-TO' explaining how I compiled 'webalizer' manually to have it in my own language obviously is not English ...
 
Back
Top