Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dev.gajim.org/gajim/gajim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xautogen.sh2
-rw-r--r--configure.ac15
-rwxr-xr-xscripts/dev/translations.py76
-rw-r--r--scripts/gajim.in8
-rw-r--r--src/Makefile.am5
-rw-r--r--src/common/Makefile.am4
-rw-r--r--src/common/defs.py.in7
7 files changed, 34 insertions, 83 deletions
diff --git a/autogen.sh b/autogen.sh
index dee45c0ab..9c83202bb 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -8,6 +8,6 @@
&& aclocal -I ./m4 \
&& libtoolize --copy --force --automake \
&& autoheader \
+ && autoconf \
&& automake --add-missing --gnu --copy \
- && autoconf \
&& ./configure $@
diff --git a/configure.ac b/configure.ac
index d33490982..008e89e78 100644
--- a/configure.ac
+++ b/configure.ac
@@ -129,6 +129,20 @@ AM_CONDITIONAL(BUILD_TRAYICON, $have_trayicon)
AM_CHECK_PYTHON_HEADERS(,[AC_MSG_ERROR(could not find Python headers)])
AC_SUBST([PYTHON_INCLUDES])
+AS_AC_EXPAND(DATADIR, "${datadir}")
+
+AS_AC_EXPAND(LIBDIR, ${libdir})
+
+AS_AC_EXPAND(DOCDIR, "${docdir}")
+
+AC_SUBST(VERSION)
+AC_SUBST(PACKAGE)
+AC_SUBST(DATADIR)
+AC_SUBST(LIBDIR)
+AS_AC_EXPAND(DATADIR, "${DATADIR}")
+AC_SUBST(DOCDIR)
+AS_AC_EXPAND(DOCDIR, "${DOCDIR}")
+
AC_CONFIG_FILES([
Makefile
data/Makefile
@@ -139,6 +153,7 @@ AC_CONFIG_FILES([
data/gajim.desktop.in
src/Makefile
src/common/Makefile
+ src/common/defs.py
scripts/gajim
po/Makefile.in
])
diff --git a/scripts/dev/translations.py b/scripts/dev/translations.py
deleted file mode 100755
index 876787827..000000000
--- a/scripts/dev/translations.py
+++ /dev/null
@@ -1,76 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-# Initially written by Nikos Kouremenos
-# Dedicated to Yann Le Boulanger
-# Usage: './translations.py [help] [stats] [update]'
-
-import os
-import sys
-
-stats = False
-update = False
-check = False
-path_to_dir = '../../po'
-
-def visit(files):
- for file in files:
- if file.endswith('.po'):
- path_to_po = os.path.join(path_to_dir, file)
- if update: # update an existing po file)
- os.system('msgmerge -q -U %s %s' % (path_to_po, os.path.join(path_to_dir, 'gajim.pot')))
- if stats:
- print file[:-3], 'has now:'
- os.system('msgfmt --statistics ' + path_to_po)
- if check:
- os.system('msgfmt -c ' + path_to_po)
-
-def show_help():
- print sys.argv[0], '[help] [stats] [update] [check]'
- sys.exit(0)
-
-def update_pot():
- # create header for glade strings
- os.system("""
- for i in `ls ../../data/glade/*.glade`;do
- intltool-extract --type=gettext/glade $i
- done
- """)
- # update the pot
- os.system('make -C ../../po/ all gajim.pot')
- print 'gajim.pot was updated successfully'
-
-if __name__ == '__main__':
- if os.path.basename(os.getcwd()) != 'dev':
- print 'run me with cwd: scripts/dev'
- sys.exit()
-
- path_to_dir = '../../po'
-
- files = os.listdir(path_to_dir)
- if len(sys.argv) == 2:
- if sys.argv[1].startswith('h'):
- show_help()
-
- param = sys.argv[1]
- if param == 'stats': # stats only
- stats = True
- visit(files)
- elif param == 'update': # update only
- update_pot()
- update = True
- visit(files)
- print 'Done'
- elif param == 'check':
- check = True
- visit(files)
-
- elif len(sys.argv) == 1: # update & stats & no check
- update_pot()
- update = True
- stats = True
- visit(files)
- print 'Done'
-
- else:
- show_help()
-
diff --git a/scripts/gajim.in b/scripts/gajim.in
index 82ef6f822..518087459 100644
--- a/scripts/gajim.in
+++ b/scripts/gajim.in
@@ -27,11 +27,9 @@ if [ `id -u` -eq 0 ]; then
echo "You must not launch Gajim as root, it is INSECURE"
fi
-
-prefix=@prefix@
-exec_prefix=@exec_prefix@
+datadir=@DATADIR@
PYTHON_EXEC=@PYTHON@
-cd ${prefix}/share/gajim/src
-export PYTHONPATH="$PYTHONPATH:@libdir@/gajim"
+cd ${datadir}/gajim/src
+export PYTHONPATH="$PYTHONPATH:@LIBDIR@/gajim"
exec -a gajim ${PYTHON_EXEC} -OO gajim.py $@
diff --git a/src/Makefile.am b/src/Makefile.am
index 3ebe37a2d..311704396 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -57,6 +57,8 @@ gajimsrc3dir = $(pkgdatadir)/src/common/zeroconf
gajimsrc3_DATA = \
$(srcdir)/common/zeroconf/*.py
+DISTCLEANFILES =$(srcdir)/common/defs.py
+
EXTRA_DIST = $(gajimsrc_DATA) \
$(gajimsrc1_DATA) \
$(gajimsrc2_DATA) \
@@ -66,6 +68,7 @@ EXTRA_DIST = $(gajimsrc_DATA) \
trayiconmodule.c \
eggtrayicon.h \
trayicon.defs \
- trayicon.override
+ trayicon.override \
+ common/defs.py.in
MAINTAINERCLEANFILES = Makefile.in
diff --git a/src/common/Makefile.am b/src/common/Makefile.am
index 18f4cb796..d031154e0 100644
--- a/src/common/Makefile.am
+++ b/src/common/Makefile.am
@@ -15,4 +15,8 @@ idle_la_LDFLAGS = \
idle_la_CFLAGS = $(XSCREENSAVER_CFLAGS) $(PYTHON_INCLUDES)
endif
+DISTCLEANFILES = defs.py
+
+EXTRA_DIST = defs.py.in
+
MAINTAINERCLEANFILES = Makefile.in
diff --git a/src/common/defs.py.in b/src/common/defs.py.in
new file mode 100644
index 000000000..55af93a75
--- /dev/null
+++ b/src/common/defs.py.in
@@ -0,0 +1,7 @@
+# this file is automatically generate by configure
+# do not edit it!
+docdir = "@DOCDIR@"
+
+datadir = "@DATADIR@"
+
+version = "@VERSION@"