Skip to content
Snippets Groups Projects
Commit 1d40d711 authored by dkirov's avatar dkirov
Browse files

keep defs in defs.py.in

switch autogen order
dist defs.py.in
parent 8194bd04
No related branches found
No related tags found
No related merge requests found
...@@ -8,6 +8,6 @@ ...@@ -8,6 +8,6 @@
&& aclocal -I ./m4 \ && aclocal -I ./m4 \
&& libtoolize --copy --force --automake \ && libtoolize --copy --force --automake \
&& autoheader \ && autoheader \
&& autoconf \
&& automake --add-missing --gnu --copy \ && automake --add-missing --gnu --copy \
&& autoconf \
&& ./configure $@ && ./configure $@
...@@ -129,6 +129,20 @@ AM_CONDITIONAL(BUILD_TRAYICON, $have_trayicon) ...@@ -129,6 +129,20 @@ AM_CONDITIONAL(BUILD_TRAYICON, $have_trayicon)
AM_CHECK_PYTHON_HEADERS(,[AC_MSG_ERROR(could not find Python headers)]) AM_CHECK_PYTHON_HEADERS(,[AC_MSG_ERROR(could not find Python headers)])
AC_SUBST([PYTHON_INCLUDES]) 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([ AC_CONFIG_FILES([
Makefile Makefile
data/Makefile data/Makefile
...@@ -139,6 +153,7 @@ AC_CONFIG_FILES([ ...@@ -139,6 +153,7 @@ AC_CONFIG_FILES([
data/gajim.desktop.in data/gajim.desktop.in
src/Makefile src/Makefile
src/common/Makefile src/common/Makefile
src/common/defs.py
scripts/gajim scripts/gajim
po/Makefile.in po/Makefile.in
]) ])
......
#!/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()
...@@ -27,11 +27,9 @@ if [ `id -u` -eq 0 ]; then ...@@ -27,11 +27,9 @@ if [ `id -u` -eq 0 ]; then
echo "You must not launch Gajim as root, it is INSECURE" echo "You must not launch Gajim as root, it is INSECURE"
fi fi
datadir=@DATADIR@
prefix=@prefix@
exec_prefix=@exec_prefix@
PYTHON_EXEC=@PYTHON@ PYTHON_EXEC=@PYTHON@
cd ${prefix}/share/gajim/src cd ${datadir}/gajim/src
export PYTHONPATH="$PYTHONPATH:@libdir@/gajim" export PYTHONPATH="$PYTHONPATH:@LIBDIR@/gajim"
exec -a gajim ${PYTHON_EXEC} -OO gajim.py $@ exec -a gajim ${PYTHON_EXEC} -OO gajim.py $@
...@@ -57,6 +57,8 @@ gajimsrc3dir = $(pkgdatadir)/src/common/zeroconf ...@@ -57,6 +57,8 @@ gajimsrc3dir = $(pkgdatadir)/src/common/zeroconf
gajimsrc3_DATA = \ gajimsrc3_DATA = \
$(srcdir)/common/zeroconf/*.py $(srcdir)/common/zeroconf/*.py
DISTCLEANFILES =$(srcdir)/common/defs.py
EXTRA_DIST = $(gajimsrc_DATA) \ EXTRA_DIST = $(gajimsrc_DATA) \
$(gajimsrc1_DATA) \ $(gajimsrc1_DATA) \
$(gajimsrc2_DATA) \ $(gajimsrc2_DATA) \
...@@ -66,6 +68,7 @@ EXTRA_DIST = $(gajimsrc_DATA) \ ...@@ -66,6 +68,7 @@ EXTRA_DIST = $(gajimsrc_DATA) \
trayiconmodule.c \ trayiconmodule.c \
eggtrayicon.h \ eggtrayicon.h \
trayicon.defs \ trayicon.defs \
trayicon.override trayicon.override \
common/defs.py.in
MAINTAINERCLEANFILES = Makefile.in MAINTAINERCLEANFILES = Makefile.in
...@@ -15,4 +15,8 @@ idle_la_LDFLAGS = \ ...@@ -15,4 +15,8 @@ idle_la_LDFLAGS = \
idle_la_CFLAGS = $(XSCREENSAVER_CFLAGS) $(PYTHON_INCLUDES) idle_la_CFLAGS = $(XSCREENSAVER_CFLAGS) $(PYTHON_INCLUDES)
endif endif
DISTCLEANFILES = defs.py
EXTRA_DIST = defs.py.in
MAINTAINERCLEANFILES = Makefile.in MAINTAINERCLEANFILES = Makefile.in
# this file is automatically generate by configure
# do not edit it!
docdir = "@DOCDIR@"
datadir = "@DATADIR@"
version = "@VERSION@"
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