summaryrefslogtreecommitdiffstats
path: root/data
diff options
context:
space:
mode:
authorPeng Huang <shawn.p.huang@gmail.com>2009-10-05 14:24:55 +0800
committerPeng Huang <shawn.p.huang@gmail.com>2009-10-05 14:24:55 +0800
commit746b31da492ab63120655f287fc56b8fb26584eb (patch)
treec3f87d12bef7ec0a2d7f8b917d68733ae6ea9eaa /data
parent66834d7005c5ef6f176b5b081d8b76973ff7605e (diff)
downloadibus-libpinyin-746b31da492ab63120655f287fc56b8fb26584eb.tar.gz
ibus-libpinyin-746b31da492ab63120655f287fc56b8fb26584eb.tar.xz
ibus-libpinyin-746b31da492ab63120655f287fc56b8fb26584eb.zip
Use google.db, if open-phrase.db does not exist.
Diffstat (limited to 'data')
-rw-r--r--data/Makefile.am40
-rw-r--r--data/create_index.sql (renamed from data/google/create_index.sql)0
-rw-r--r--data/db/Makefile.am43
-rw-r--r--data/db/google/README (renamed from data/google/README)0
-rwxr-xr-xdata/db/google/create_db_from_google.py (renamed from data/google/create_db_from_google.py)0
l---------data/db/google/id.py1
l---------data/db/google/pydict.py1
-rw-r--r--data/db/google/rawdict_utf16_65105_freq.txt (renamed from data/google/rawdict_utf16_65105_freq.txt)bin3570348 -> 3570348 bytes
-rw-r--r--data/db/google/valid_utf16.txt (renamed from data/google/valid_utf16.txt)bin32934 -> 32934 bytes
-rw-r--r--data/db/open-phrase/Makefile.am60
l---------data/google/id.py1
l---------data/google/pydict.py1
12 files changed, 106 insertions, 41 deletions
diff --git a/data/Makefile.am b/data/Makefile.am
index 59e0d3d..64ac271 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -20,45 +20,7 @@
SUBDIRS = \
- google \
+ db \
icons \
$(NULL)
-if IBUS_BUILD_DB_OPEN_PHRASE
-main_db_DATA = \
- db/main.db \
- db/COPYING \
- db/create_index.sql \
- $(NULL)
-main_dbdir = $(pkgdatadir)/db
-
-install-data-hook:
- @( \
-if test "$(NO_INDEX)" = ""; then \
- cd $(DESTDIR)$(main_dbdir); \
- echo "Create INDEX"; \
- sqlite3 main.db ".read create_index.sql"; \
-fi)
-
-DBVER = 1.2.99
-DBTAR = pinyin-database-$(DBVER).tar.bz2
-
-$(DBTAR):
- wget http://ibus.googlecode.com/files/$(DBTAR)
-
-stamp-db: $(DBTAR)
- tar jxvfm $(DBTAR)
- touch $@
-
-$(main_db_DATA): stamp-db
-
-CLEANFILES = \
- stamp-db \
- db/* \
- $(NULL)
-
-DISTCLEANFILES = \
- $(DBTAR) \
- $(NULL)
-endif
-
diff --git a/data/google/create_index.sql b/data/create_index.sql
index 021baa6..021baa6 100644
--- a/data/google/create_index.sql
+++ b/data/create_index.sql
diff --git a/data/db/Makefile.am b/data/db/Makefile.am
new file mode 100644
index 0000000..d7340b4
--- /dev/null
+++ b/data/db/Makefile.am
@@ -0,0 +1,43 @@
+# vim:set noet ts=4:
+#
+# ibus-pinyin - The Chinese PinYin engine for IBus
+#
+# Copyright (c) 2007-2008 Peng Huang <shawn.p.huang@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., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+
+SUBDIRS = \
+ google \
+ open-phrase \
+ $(NULL)
+
+main_db_DATA = \
+ create_index.sql \
+ $(NULL)
+main_dbdir = $(pkgdatadir)/db
+
+install-data-hook:
+ @( \
+if test "$(NO_INDEX)" = ""; then \
+ cd $(DESTDIR)$(main_dbdir); \
+ echo "Create INDEX"; \
+ sqlite3 main.db ".read create_index.sql"; \
+fi)
+
+EXTRA_DIST = \
+ create_index.sql \
+ $(NULL)
+
diff --git a/data/google/README b/data/db/google/README
index 737833c..737833c 100644
--- a/data/google/README
+++ b/data/db/google/README
diff --git a/data/google/create_db_from_google.py b/data/db/google/create_db_from_google.py
index ff4b7f8..ff4b7f8 100755
--- a/data/google/create_db_from_google.py
+++ b/data/db/google/create_db_from_google.py
diff --git a/data/db/google/id.py b/data/db/google/id.py
new file mode 120000
index 0000000..feea3e1
--- /dev/null
+++ b/data/db/google/id.py
@@ -0,0 +1 @@
+../../../scripts/id.py \ No newline at end of file
diff --git a/data/db/google/pydict.py b/data/db/google/pydict.py
new file mode 120000
index 0000000..762c55e
--- /dev/null
+++ b/data/db/google/pydict.py
@@ -0,0 +1 @@
+../../../scripts/pydict.py \ No newline at end of file
diff --git a/data/google/rawdict_utf16_65105_freq.txt b/data/db/google/rawdict_utf16_65105_freq.txt
index 35eb3e8..35eb3e8 100644
--- a/data/google/rawdict_utf16_65105_freq.txt
+++ b/data/db/google/rawdict_utf16_65105_freq.txt
Binary files differ
diff --git a/data/google/valid_utf16.txt b/data/db/google/valid_utf16.txt
index fecc67e..fecc67e 100644
--- a/data/google/valid_utf16.txt
+++ b/data/db/google/valid_utf16.txt
Binary files differ
diff --git a/data/db/open-phrase/Makefile.am b/data/db/open-phrase/Makefile.am
new file mode 100644
index 0000000..67f6863
--- /dev/null
+++ b/data/db/open-phrase/Makefile.am
@@ -0,0 +1,60 @@
+# vim:set noet ts=4:
+#
+# ibus-pinyin - The Chinese PinYin engine for IBus
+#
+# Copyright (c) 2007-2008 Peng Huang <shawn.p.huang@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., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+
+if IBUS_BUILD_DB_OPEN_PHRASE
+db_file = open-phrase.db
+main_db_DATA = \
+ db/$(db_file) \
+ db/COPYING \
+ $(NULL)
+main_dbdir = $(pkgdatadir)/db
+
+install-data-hook:
+ @( \
+if test "$(NO_INDEX)" = ""; then \
+ cd $(DESTDIR)$(main_dbdir); \
+ echo "Create INDEX"; \
+ sqlite3 $(db_file) ".read create_index.sql"; \
+fi)
+
+DBVER = 1.2.99
+DBTAR = pinyin-database-$(DBVER).tar.bz2
+
+$(DBTAR):
+ wget http://ibus.googlecode.com/files/$(DBTAR)
+
+stamp-db: $(DBTAR)
+ tar jxvfm $(DBTAR)
+ mv db/main.db db/$(db_file)
+ touch $@
+
+$(main_db_DATA): stamp-db
+
+CLEANFILES = \
+ stamp-db \
+ db/* \
+ $(NULL)
+
+DISTCLEANFILES = \
+ $(DBTAR) \
+ $(NULL)
+endif
+
diff --git a/data/google/id.py b/data/google/id.py
deleted file mode 120000
index 613c15c..0000000
--- a/data/google/id.py
+++ /dev/null
@@ -1 +0,0 @@
-../../scripts/id.py \ No newline at end of file
diff --git a/data/google/pydict.py b/data/google/pydict.py
deleted file mode 120000
index 03c0c4a..0000000
--- a/data/google/pydict.py
+++ /dev/null
@@ -1 +0,0 @@
-../../scripts/pydict.py \ No newline at end of file