Allow user to override paths
This commit is contained in:
parent
40f6e654fd
commit
d536de1e78
|
@ -5,54 +5,77 @@
|
||||||
# to override values if needed.
|
# to override values if needed.
|
||||||
#
|
#
|
||||||
|
|
||||||
|
# build proposed paths
|
||||||
case "${PREFIX}" in
|
case "${PREFIX}" in
|
||||||
/)
|
/)
|
||||||
BINDIR="/bin"
|
MY_BINDIR="/bin"
|
||||||
SBINDIR="/sbin"
|
MY_SBINDIR="/sbin"
|
||||||
LIBDIR="/lib"
|
MY_LIBDIR="/lib"
|
||||||
INCLUDEDIR="/usr/include"
|
MY_INCLUDEDIR="/usr/include"
|
||||||
CONFIGDIR="/etc"
|
MY_CONFIGDIR="/etc"
|
||||||
VARDIR="/var"
|
MY_VARDIR="/var"
|
||||||
SHAREDIR="/usr/share/@P@"
|
MY_SHAREDIR="/usr/share/@P@"
|
||||||
DOCSDIR="/usr/share/doc/@P@"
|
MY_DOCSDIR="/usr/share/doc/@P@"
|
||||||
WEBDIR="/srv/http"
|
MY_WEBDIR="/srv/http"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
/usr)
|
/usr)
|
||||||
BINDIR="/usr/bin"
|
MY_BINDIR="/usr/bin"
|
||||||
SBINDIR="/usr/sbin"
|
MY_SBINDIR="/usr/sbin"
|
||||||
LIBDIR="/usr/lib"
|
MY_LIBDIR="/usr/lib"
|
||||||
INCLUDEDIR="/usr/include"
|
MY_INCLUDEDIR="/usr/include"
|
||||||
CONFIGDIR="/etc"
|
MY_CONFIGDIR="/etc"
|
||||||
VARDIR="/var"
|
MY_VARDIR="/var"
|
||||||
SHAREDIR="/usr/share/@P@"
|
MY_SHAREDIR="/usr/share/@P@"
|
||||||
DOCSDIR="/usr/share/doc/@P@"
|
MY_DOCSDIR="/usr/share/doc/@P@"
|
||||||
WEBDIR="/srv/http"
|
MY_WEBDIR="/srv/http"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
/usr/local)
|
/usr/local)
|
||||||
BINDIR="/usr/local/bin"
|
MY_BINDIR="/usr/local/bin"
|
||||||
SBINDIR="/usr/local/sbin"
|
MY_SBINDIR="/usr/local/sbin"
|
||||||
LIBDIR="/usr/local/lib"
|
MY_LIBDIR="/usr/local/lib"
|
||||||
INCLUDEDIR="/usr/local/include"
|
MY_INCLUDEDIR="/usr/local/include"
|
||||||
CONFIGDIR="/usr/local/etc"
|
MY_CONFIGDIR="/usr/local/etc"
|
||||||
VARDIR="/var"
|
MY_VARDIR="/var"
|
||||||
SHAREDIR="/usr/local/share/@P@"
|
MY_SHAREDIR="/usr/local/share/@P@"
|
||||||
DOCSDIR="/usr/local/share/doc/@P@"
|
MY_DOCSDIR="/usr/local/share/doc/@P@"
|
||||||
WEBDIR="/srv/http"
|
MY_WEBDIR="/srv/http"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
/opt/*)
|
/opt/*)
|
||||||
BINDIR="${PREFIX}/bin"
|
MY_BINDIR="${PREFIX}/bin"
|
||||||
SBINDIR="${PREFIX}/sbin"
|
MY_SBINDIR="${PREFIX}/sbin"
|
||||||
LIBDIR="${PREFIX}/lib"
|
MY_LIBDIR="${PREFIX}/lib"
|
||||||
INCLUDEDIR="${PREFIX}/include"
|
MY_INCLUDEDIR="${PREFIX}/include"
|
||||||
CONFIGDIR="/etc${PREFIX}"
|
MY_CONFIGDIR="/etc${PREFIX}"
|
||||||
VARDIR="/var${PREFIX}"
|
MY_VARDIR="/var${PREFIX}"
|
||||||
SHAREDIR="/var${PREFIX}"
|
MY_SHAREDIR="/var${PREFIX}"
|
||||||
DOCSDIR="${PREFIX}/doc"
|
MY_DOCSDIR="${PREFIX}/doc"
|
||||||
WEBDIR="${PREFIX}/http"
|
MY_WEBDIR="${PREFIX}/http"
|
||||||
|
;;
|
||||||
|
|
||||||
|
**)
|
||||||
|
MY_BINDIR="${PREFIX}/bin"
|
||||||
|
MY_SBINDIR="${PREFIX}/sbin"
|
||||||
|
MY_LIBDIR="${PREFIX}/lib"
|
||||||
|
MY_INCLUDEDIR="${PREFIX}/include"
|
||||||
|
MY_CONFIGDIR="${PREFIX}/etc"
|
||||||
|
MY_VARDIR="${PREFIX}/var"
|
||||||
|
MY_DOCSDIR="${PREFIX}/share/doc"
|
||||||
|
MY_WEBDIR="${PREFIX}/srv/http"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
CGIDIR="${WEBDIR}/cgi-bin"
|
MY_CGIDIR="${WEBDIR}/cgi-bin"
|
||||||
|
|
||||||
|
# assign paths allowing user to override
|
||||||
|
[ -z "${BINDIR}" ] && BINDIR="${MY_BINDIR}"
|
||||||
|
[ -z "${SBINDIR}" ] && SBINDIR="${MY_SBINDIR}"
|
||||||
|
[ -z "${LIBDIR}" ] && LIBDIR="${MY_LIBDIR}"
|
||||||
|
[ -z "${INCLUDEDIR}" ] && INCLUDEDIR="${MY_INCLUDEDIR}"
|
||||||
|
[ -z "${CONFIGDIR}" ] && CONFIGDIR="${MY_CONFIGDIR}"
|
||||||
|
[ -z "${VARDIR}" ] && VARDIR="${MY_VARDIR}"
|
||||||
|
[ -z "${DOCSDIR}" ] && DOCSDIR="${MY_DOCSDIR}"
|
||||||
|
[ -z "${WEBDIR}" ] && WEBDIR="${MY_WEBDIR}"
|
||||||
|
[ -z "${CGIDIR}" ] && CGIDIR="${MY_CGIDIR}"
|
||||||
|
|
Loading…
Reference in New Issue