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).
This commit is contained in:
parent
1ac0b7959d
commit
fe8bd2b027
|
@ -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 @@ class ConfigPaths:
|
|||
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'
|
||||
|
|
Loading…
Reference in New Issue