bug fix: defaulting to the /share dir causes the PREFIX variable to be ignored

Yarin yarin at warpmail.net
Mon Dec 27 16:08:26 EST 2010


I forget to mention,

I'm not sure about Mandrake, but I know with other distros and *nixes, /doc is also expected to be exclusively in /share too.
To satisfy that, this should also be added to block of code:

# And with the docs as well
if [ ! -d "$PREFIX/doc" ] ; then
        DOCS="$PREFIX/share/doc/maradns-$VERSION"
fi


----- Original message -----
From: "Yarin" <yarin at warpmail.net>
To: list at maradns.org
Date: Mon, 27 Dec 2010 13:19:47 -0600
Subject: bug fix: defaulting to the /share dir causes the PREFIX variable to be	ignored

Hello,

I noticed that the installation script doesn't respect the use of the /share directory by default, but it does try to if the default directory doesn't exist.
The problem is, when it tries to use the /share directory, it stops listening to the PREFIX var, and will only use the default /usr/local.

---------
Below, is the part of ./build/install.locations in question, right now
---------

# If the directory that MAN1 points to does not exist
if [ ! -d $MAN1 ] ; then
        # Then try this location instead
	MAN1="/usr/local/share/man/man1"
fi
# Do the same with the MAN5 and MAN8 directories
if [ ! -d $MAN5 ] ; then
	MAN5="/usr/local/share/man/man5"
fi
if [ ! -d $MAN8 ] ; then
	MAN8="/usr/local/share/man/man8"
fi

---------
Below, is my proposed fix of that part
---------

# If the directory that MAN1 points to does not exist
if [ ! -d $MAN1 ] ; then
        # Then try the /share directory instead
	MAN1="$PREFIX/share/man/man1"
fi
# Do the same with the MAN5 and MAN8 directories
if [ ! -d $MAN5 ] ; then
	MAN5="$PREFIX/share/man/man5"
fi
if [ ! -d $MAN8 ] ; then
	MAN8="$PREFIX/share/man/man8"
fi

Thank you,

-----
Yarin Licht



More information about the list mailing list