86 lines
2.3 KiB
Bash
86 lines
2.3 KiB
Bash
# libiso8601/scripts/paths
|
|
#
|
|
# (c)2007, Laurence Withers, <l@lwithers.me.uk>.
|
|
# 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/libiso8601"
|
|
MY_DOCSDIR="/usr/share/doc/libiso8601"
|
|
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/libiso8601"
|
|
MY_DOCSDIR="/usr/share/doc/libiso8601"
|
|
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/libiso8601"
|
|
MY_DOCSDIR="/usr/local/share/doc/libiso8601"
|
|
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
|
|
|
|
# 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="${WEBDIR}/cgi-bin"
|
|
|
|
# kate: replace-trailing-space-save true; space-indent true; tab-width 4;
|
|
# vim: syntax=sh:expandtab:ts=4:sw=4
|