Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Export all useful variables for a local prefix, with development tools.
# This file expects LOCAL_PREFIX to be an absolute path to the prefix (like /usr or $HOME/.local)
export PATH="${LOCAL_PREFIX}/bin:${PATH}"
# Used to detect the build dependencies
export PKG_CONFIG_PATH="${LOCAL_PREFIX}/lib/pkgconfig:${PKG_CONFIG_PATH}"
export PKG_CONFIG_PATH="${LOCAL_PREFIX}/lib64/pkgconfig:${PKG_CONFIG_PATH}"
export PKG_CONFIG_PATH="${LOCAL_PREFIX}/share/pkgconfig:${PKG_CONFIG_PATH}"
export PKG_CONFIG_PATH="${LOCAL_PREFIX}/lib/pkgconfig:${PKG_CONFIG_PATH}"
# Used by some build tools
export C_INCLUDE_PATH="${LOCAL_PREFIX}/include"
export CPLUS_INCLUDE_PATH="${LOCAL_PREFIX}/include"
export MANPATH="${LOCAL_PREFIX}/share/man:$(manpath 2>/dev/null)"
export LIBRARY_PATH="${LOCAL_PREFIX}/lib"
# Used by Autotools to find its tools
export ACLOCAL_FLAGS="-I ${LOCAL_PREFIX}/share/aclocal -I /usr/share/aclocal $ACLOCAL_FLAGS"
# Used to find the libraries at runtime
export LD_LIBRARY_PATH="${LOCAL_PREFIX}/lib:${LOCAL_PREFIX}/lib64:${LD_LIBRARY_PATH}"
# Used to find python modules
export PYTHONPATH="${LOCAL_PREFIX}/lib/python3.6/site-packages:${PYTHONPATH}"
# Used to find the glib-introspection dependencies
export XDG_DATA_DIRS="${LOCAL_PREFIX}/share:/usr/local/share:/usr/share:${XDG_DATA_DIRS}"
export GI_TYPELIB_PATH="${LOCAL_PREFIX}/share/girepository-1.0:${GI_TYPELIB_PATH}"
export GI_TYPELIB_PATH="${LOCAL_PREFIX}/lib64/girepository-1.0:${GI_TYPELIB_PATH}"
export GI_TYPELIB_PATH="${LOCAL_PREFIX}/lib/girepository-1.0:${GI_TYPELIB_PATH}"
export GI_TYPELIB_PATH="/usr/share/girepository-1.0:${GI_TYPELIB_PATH}"
export GI_TYPELIB_PATH="/usr/lib64/girepository-1.0:${GI_TYPELIB_PATH}"
export GI_TYPELIB_PATH="/usr/lib/girepository-1.0:${GI_TYPELIB_PATH}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment