summaryrefslogtreecommitdiffstats
path: root/setup
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2014-01-26 14:09:23 +0800
committerPeng Wu <alexepico@gmail.com>2014-01-26 14:09:50 +0800
commit9ec720b9e4513ec63e779f1abe5e882d6af2caec (patch)
tree036da0f8ecdf04be6edcf2d8e185471495386cea /setup
parent39c45ec37f0c8bdb866b28369807c2e8dede1c0a (diff)
downloadibus-libzhuyin-9ec720b9e4513ec63e779f1abe5e882d6af2caec.tar.gz
ibus-libzhuyin-9ec720b9e4513ec63e779f1abe5e882d6af2caec.tar.xz
ibus-libzhuyin-9ec720b9e4513ec63e779f1abe5e882d6af2caec.zip
add setup makefiles
Diffstat (limited to 'setup')
-rw-r--r--setup/Makefile.am42
-rw-r--r--setup/main.py2
2 files changed, 43 insertions, 1 deletions
diff --git a/setup/Makefile.am b/setup/Makefile.am
new file mode 100644
index 0000000..a87f130
--- /dev/null
+++ b/setup/Makefile.am
@@ -0,0 +1,42 @@
+# vim:set et ts=4:
+#
+# ibus-libzhuyin - New Zhuyin engine based on libzhuyin for IBus
+#
+# Copyright (c) 2014 Peng Wu <alexepico@gmail.com>
+#
+# 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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+setup_libzhuyin_PYTHON = \
+ main.py \
+ config.py \
+ ibus-libzhuyin-preferences.ui \
+ $(NULL)
+
+setup_libzhuyindir = $(datadir)/ibus-libzhuyin/setup
+
+CLEANFILES = \
+ *.pyc \
+ $(NULL)
+
+EXTRA_DIST = \
+ config.py.in \
+ $(NULL)
+
+test-libzhuyin:
+ $(ENV) DBUS_DEBUG=true \
+ IBUS_LOCALEDIR=@localedir@ \
+ IBUS_PKGDATADIR=$(pkgdatadir) \
+ PYTHONPATH=$(abs_top_srcdir):$(pyexecdir) \
+ $(PYTHON) $(srcdir)/main.py
diff --git a/setup/main.py b/setup/main.py
index 93450f5..dd76999 100644
--- a/setup/main.py
+++ b/setup/main.py
@@ -32,7 +32,7 @@ import config
locale.setlocale(locale.LC_ALL, "")
localedir = os.getenv("IBUS_LOCALEDIR")
-pkgdatadir = os.getenv("IBUS_PKGDATADIR")
+pkgdatadir = os.getenv("IBUS_PKGDATADIR") or "."
gettext.install('ibus-libzhuyin', localedir)
class PreferencesWindow: