lw-build-system/skel/scripts/paths

82 lines
2.1 KiB
Plaintext
Raw Normal View History

2007-09-11 23:06:23 +01:00
# @P@/scripts/paths
# vim: syntax=sh:sw=4:ts=4:expandtab
#
# Default path setup. Not meant for editing; use environment variables
# to override values if needed.
#
2007-09-17 10:51:49 +01:00
# build proposed paths
2007-09-11 23:06:23 +01:00
case "${PREFIX}" in
/)
2007-09-17 10:51:49 +01:00
MY_BINDIR="/bin"
MY_SBINDIR="/sbin"
MY_LIBDIR="/lib"
MY_INCLUDEDIR="/usr/include"
MY_CONFIGDIR="/etc"
MY_VARDIR="/var"
MY_SHAREDIR="/usr/share/@P@"
MY_DOCSDIR="/usr/share/doc/@P@"
MY_WEBDIR="/srv/http"
2007-09-11 23:06:23 +01:00
;;
/usr)
2007-09-17 10:51:49 +01:00
MY_BINDIR="/usr/bin"
MY_SBINDIR="/usr/sbin"
MY_LIBDIR="/usr/lib"
MY_INCLUDEDIR="/usr/include"
MY_CONFIGDIR="/etc"
MY_VARDIR="/var"
MY_SHAREDIR="/usr/share/@P@"
MY_DOCSDIR="/usr/share/doc/@P@"
MY_WEBDIR="/srv/http"
2007-09-11 23:06:23 +01:00
;;
/usr/local)
2007-09-17 10:51:49 +01:00
MY_BINDIR="/usr/local/bin"
MY_SBINDIR="/usr/local/sbin"
MY_LIBDIR="/usr/local/lib"
MY_INCLUDEDIR="/usr/local/include"
MY_CONFIGDIR="/usr/local/etc"
MY_VARDIR="/var"
MY_SHAREDIR="/usr/local/share/@P@"
MY_DOCSDIR="/usr/local/share/doc/@P@"
MY_WEBDIR="/srv/http"
2007-09-11 23:06:23 +01:00
;;
/opt/*)
2007-09-17 10:51:49 +01:00
MY_BINDIR="${PREFIX}/bin"
MY_SBINDIR="${PREFIX}/sbin"
MY_LIBDIR="${PREFIX}/lib"
MY_INCLUDEDIR="${PREFIX}/include"
MY_CONFIGDIR="/etc${PREFIX}"
MY_VARDIR="/var${PREFIX}"
MY_SHAREDIR="/var${PREFIX}"
MY_DOCSDIR="${PREFIX}/doc"
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"
2007-09-11 23:06:23 +01:00
;;
esac
2007-09-17 10:51:49 +01:00
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}"