lw-build-system/skel/scripts/paths

88 lines
2.2 KiB
Bash

# @P@/scripts/paths
#
# (c)2007, @AUTHOR@, <@EMAIL@>.
# Released under the GNU GPLv3. See file COPYING or
# http://www.gnu.org/copyleft/gpl.html for details.
#
# Default path setup. Not meant for editing; use environment variables
# to override values if needed.
#
# build proposed paths
case "${PREFIX}" in
/)
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"
;;
/usr)
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"
;;
/usr/local)
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"
;;
/opt/*)
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"
;;
esac
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}"
# kate: @KATE_MODELINE@
# vim: syntax=sh:@VIM_MODELINE@