diff options
Diffstat (limited to 'engine/python2')
-rw-r--r-- | engine/python2/Makefile.am | 38 | ||||
-rw-r--r-- | engine/python2/_config.py.in | 16 | ||||
-rw-r--r-- | engine/python2/anthy.xml.in.in | 6 | ||||
-rw-r--r-- | engine/python2/ibus-engine-anthy.in | 11 |
4 files changed, 38 insertions, 33 deletions
diff --git a/engine/python2/Makefile.am b/engine/python2/Makefile.am index afc9236..47a7574 100644 --- a/engine/python2/Makefile.am +++ b/engine/python2/Makefile.am @@ -3,8 +3,8 @@ # ibus-anthy - The Anthy engine for IBus # # Copyright (c) 2007-2008 Peng Huang <shawn.p.huang@gmail.com> -# Copyright (c) 2010-2015 Takao Fujiwara <takao.fujiwara1@gmail.com> -# Copyright (c) 2007-2015 Red Hat, Inc. +# Copyright (c) 2010-2016 Takao Fujiwara <takao.fujiwara1@gmail.com> +# Copyright (c) 2007-2016 Red Hat, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -77,23 +77,32 @@ componentdir = $(datadir)/ibus/component engine_DATA = default.xml enginedir = $(pkgdatadir)/engine +# $(SYMBOL_XML) cannot be extracted in Makefile but $(libexecdir) can be +# extracted to ${exec_prefix}/libexec so use capital @LIBEXECDIR@ here. %.xml: %.xml.in - sed -e "s|\@libexecdir\@|$(libexecdir)|g" \ - -e "s|\@pkgdatadir\@|$(pkgdatadir)|g" \ + sed -e "s|\@LIBEXECDIR\@|$(libexecdir)|g" \ + -e "s|\@PKGDATADIR\@|$(pkgdatadir)|g" \ -e "s|_description|description|g" \ $< > $@ +ibus-engine-anthy: ibus-engine-anthy.in + sed -e "s|\@prefix\@|$(prefix)|g" \ + -e "s|\@exec_prefix\@|$(exec_prefix)|g" \ + -e "s|\@libexecdir\@|$(libexecdir)|g" \ + -e "s|\@datarootdir\@|$(datarootdir)|g" \ + -e "s|\@PACKAGE\@|$(PACKAGE)|g" \ + -e "s|\@PYTHON\@|$(PYTHON)|g" \ + -e "s|\@ENV_IBUS_ENGINE\@|$(ENV_IBUS_ENGINE)|g" \ + $< > $@ + _config.py: _config.py.in - ( \ - PKGDATADIR=$(pkgdatadir); \ - LIBEXECDIR=$(libexecdir); \ - DATADIR=$(datadir); \ - LAYOUT=$(LAYOUT); \ - SYMBOL_CHAR_INT=$(SYMBOL_CHAR_INT); \ - ICON_PREFERENCE=$(ICON_PREFERENCE); \ - s=`cat $<`; \ - eval "echo \"$${s}\""; \ - ) > $@ + sed -e "s|\@pkgdatadir\@|$(pkgdatadir)|g" \ + -e "s|\@libexecdir\@|$(libexecdir)|g" \ + -e "s|\@datadir\@|$(datadir)|g" \ + -e "s|\@LAYOUT\@|$(LAYOUT)|g" \ + -e "s|\@SYMBOL_CHAR_INT\@|$(SYMBOL_CHAR_INT)|g" \ + -e "s|\@ICON_PREFERENCE\@|$(ICON_PREFERENCE)|g" \ + $< > $@ test: $(ENV_IBUS_TEST) \ @@ -116,6 +125,7 @@ CLEANFILES = \ $(PYGTK2_ANTHY_GEN) \ anthy.xml \ default.xml \ + ibus-engine-anthy \ *.pyc \ $(NULL) diff --git a/engine/python2/_config.py.in b/engine/python2/_config.py.in index 4d5738b..d78d182 100644 --- a/engine/python2/_config.py.in +++ b/engine/python2/_config.py.in @@ -4,8 +4,8 @@ # ibus-anthy - The Anthy engine for IBus # # Copyright (c) 2007-2008 Peng Huang <shawn.p.huang@gmail.com> -# Copyright (c) 2010-2013 Takao Fujiwara <takao.fujiwara1@gmail.com> -# Copyright (c) 2007-2013 Red Hat, Inc. +# Copyright (c) 2010-2016 Takao Fujiwara <takao.fujiwara1@gmail.com> +# Copyright (c) 2007-2016 Red Hat, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -21,10 +21,10 @@ # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -PKGDATADIR = '${PKGDATADIR}' -LIBEXECDIR = '${LIBEXECDIR}' -LOCALEDIR = '${DATADIR}/locale' -LAYOUT = '${LAYOUT}' -SYMBOL_CHAR = unichr(${SYMBOL_CHAR_INT}) -ICON_PREFERENCE = '${ICON_PREFERENCE}' +PKGDATADIR = '@pkgdatadir@' +LIBEXECDIR = '@libexecdir@' +LOCALEDIR = '@datadir@/locale' +LAYOUT = '@LAYOUT@' +SYMBOL_CHAR = unichr(@SYMBOL_CHAR_INT@) +ICON_PREFERENCE = '@ICON_PREFERENCE@' DEBUG = False diff --git a/engine/python2/anthy.xml.in.in b/engine/python2/anthy.xml.in.in index d332260..414ef32 100644 --- a/engine/python2/anthy.xml.in.in +++ b/engine/python2/anthy.xml.in.in @@ -3,7 +3,7 @@ <component> <name>org.freedesktop.IBus.Anthy</name> <description>Anthy Component</description> - <exec>@libexecdir@/ibus-engine-anthy --ibus</exec> + <exec>@LIBEXECDIR@/ibus-engine-anthy --ibus</exec> <version>@PACKAGE_VERSION@</version> <author>Peng Huang <shawn.p.huang@gmail.com></author> <license>GPL</license> @@ -13,7 +13,7 @@ <!-- for engines --> <observed-paths> <path>~/.config/ibus-anthy/engines.xml</path> - <path>@pkgdatadir@/engine/default.xml</path> + <path>@PKGDATADIR@/engine/default.xml</path> </observed-paths> - <engines exec="@libexecdir@/ibus-engine-anthy --xml" /> + <engines exec="@LIBEXECDIR@/ibus-engine-anthy --xml" /> </component> diff --git a/engine/python2/ibus-engine-anthy.in b/engine/python2/ibus-engine-anthy.in index c54b10a..f663165 100644 --- a/engine/python2/ibus-engine-anthy.in +++ b/engine/python2/ibus-engine-anthy.in @@ -5,8 +5,8 @@ # ibus-anthy - The Anthy engine for IBus # # Copyright (c) 2007-2008 Peng Huang <shawn.p.huang@gmail.com> -# Copyright (c) 2010-2013 Takao Fujiwara <takao.fujiwara1@gmail.com> -# Copyright (c) 2007-2013 Red Hat, Inc. +# Copyright (c) 2010-2016 Takao Fujiwara <takao.fujiwara1@gmail.com> +# Copyright (c) 2007-2016 Red Hat, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -22,12 +22,7 @@ # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -prefix=@prefix@ -datarootdir=@datarootdir@ -exec_prefix=@exec_prefix@ -libexecdir=@libexecdir@ export IBUS_PREFIX=@prefix@ export IBUS_ANTHY_PKGDATADIR=@datarootdir@/@PACKAGE@ -export LIBEXECDIR=$libexecdir +export LIBEXECDIR=@libexecdir@ exec @ENV_IBUS_ENGINE@ @PYTHON@ @datarootdir@/@PACKAGE@/engine/main.py $@ - |