Skip to content
Snippets Groups Projects
Commit fe8bd2b0 authored by Bruno Tarquini's avatar Bruno Tarquini
Browse files

autotools: remove confusing variables ${datadir} and DATADIR.

Those variables were confusing because autoconf usually defines DATADIR to
PREFIX/share and gajim uses both defs.datadir=PREFIX/share/gajim and
gajim.DATA_DIR=PREFIX/share/gajim/data.

Now, autoconf will use PKGDATADIR for setting the (renamed) defs.basedir
variable which will be used to set gajimpaths['DATA_DIR'] and
gajimpaths['ICONS_DIR'] in configpaths.py

Gajim will also looks for the ${GAJIM_BASEDIR} environment variable instead of
${datadir} which was really too generic (no namespace).
parent 1ac0b795
No related branches found
No related tags found
No related merge requests found
......@@ -59,8 +59,7 @@ AC_SUBST([PYTHON_INCLUDES])
AC_SUBST([gajim_srcdir], [\${datadir}/\${PACKAGE}/src])
AS_AC_EXPAND(GAJIM_SRCDIR, "${gajim_srcdir}")
AS_AC_EXPAND(DATADIR, "${datadir}")
AS_AC_EXPAND(LIBDIR, "${libdir}")
AS_AC_EXPAND(PKGDATADIR, "${datadir}/${PACKAGE}")
AS_AC_EXPAND(DOCDIR, "${docdir}")
AS_AC_EXPAND(LOCALEDIR, "${localedir}")
......@@ -92,5 +91,6 @@ echo "
Prefix ........... ${prefix}
Python modules ... ${GAJIM_SRCDIR}
Documentation .... ${DOCDIR}
Others ........... ${PKGDATADIR}
*****************************"
......@@ -2,7 +2,7 @@
# do not edit it!
docdir = "@DOCDIR@"
datadir = "@DATADIR@"
basedir = "@PKGDATADIR@"
version = "@VERSION@"
......
......@@ -29,8 +29,5 @@ fi
[ "$APP" = "gajim-history-manager" ] && APP="history_manager"
export datadir=@DATADIR@/gajim
PYTHON_EXEC=@PYTHON@
cd "@GAJIM_SRCDIR@"
exec ${PYTHON_EXEC} -OO $APP.py "$@"
exec "@PYTHON@" -OO $APP.py "$@"
......@@ -25,6 +25,7 @@
import os
import sys
import tempfile
import defs
# Note on path and filename encodings:
#
......@@ -116,13 +117,9 @@ def init(self, root = None):
for n, p in zip(k, v):
self.add_from_root(n, p)
datadir = ''
if u'datadir' in os.environ:
datadir = fse(os.environ[u'datadir'])
if not datadir:
datadir = u'..'
self.add('DATA', os.path.join(datadir, windowsify(u'data')))
self.add('ICONS', os.path.join(datadir, windowsify(u'icons')))
basedir = fse(os.environ.get(u'GAJIM_BASEDIR', defs.basedir))
self.add('DATA', os.path.join(basedir, windowsify(u'data')))
self.add('ICONS', os.path.join(basedir, windowsify(u'icons')))
self.add('HOME', fse(os.path.expanduser('~')))
try:
self.add('TMP', fse(tempfile.gettempdir()))
......
......@@ -24,7 +24,7 @@
##
docdir = '../'
datadir = '../'
basedir = '../'
localedir = '../po'
version = '0.13.0.1-dev'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment