diff options
author | Peng Huang <shawn.p.huang@gmail.com> | 2009-10-05 14:51:38 +0800 |
---|---|---|
committer | Peng Huang <shawn.p.huang@gmail.com> | 2009-10-05 14:51:38 +0800 |
commit | 3b45d3f4db14e9db2f49241c637fe93494020a76 (patch) | |
tree | 52f871b9c27aac41428455baf33545204b79998b | |
parent | 1ab8d3eaf4230c61ea4a78752334f99bac904621 (diff) | |
download | ibus-pinyin-3b45d3f4db14e9db2f49241c637fe93494020a76.tar.gz |
Fix rpm build problems.
-rwxr-xr-x | data/db/google/create_db_from_google.py | 2 | ||||
-rw-r--r-- | data/db/open-phrase/Makefile.am | 1 | ||||
-rw-r--r-- | ibus-pinyin.spec.in | 30 |
3 files changed, 26 insertions, 7 deletions
diff --git a/data/db/google/create_db_from_google.py b/data/db/google/create_db_from_google.py index ff4b7f8..4cb3c61 100755 --- a/data/db/google/create_db_from_google.py +++ b/data/db/google/create_db_from_google.py @@ -49,7 +49,7 @@ def create_db(): s, y = pinyin_id[s], pinyin_id[y] columns.append(s) columns.append(y) - values = "'%s', %d, %s" % (hanzi, l - i, ",".join(map(str,columns))) + values = "'%s', %d, %s" % (hanzi.encode("utf8"), l - i, ",".join(map(str,columns))) sql = insert_sql % (len(hanzi) - 1, values) print sql diff --git a/data/db/open-phrase/Makefile.am b/data/db/open-phrase/Makefile.am index 5947abb..2acc892 100644 --- a/data/db/open-phrase/Makefile.am +++ b/data/db/open-phrase/Makefile.am @@ -23,7 +23,6 @@ if IBUS_BUILD_DB_OPEN_PHRASE db_file = open-phrase.db main_db_DATA = \ db/$(db_file) \ - db/COPYING \ $(NULL) main_dbdir = $(pkgdatadir)/db diff --git a/ibus-pinyin.spec.in b/ibus-pinyin.spec.in index d6e2b72..3b350c2 100644 --- a/ibus-pinyin.spec.in +++ b/ibus-pinyin.spec.in @@ -14,7 +14,7 @@ BuildRequires: gettext-devel BuildRequires: libtool BuildRequires: pkgconfig BuildRequires: sqlite-devel -BuildRequires: libuuid-devel +# BuildRequires: libuuid-devel BuildRequires: ibus-devel >= 1.2.0 Requires(post): sqlite @@ -24,12 +24,20 @@ Requires: ibus >= 1.2.0 %description The Chinese Pinyin input method for IBus platform. +%package open-phrase +Summary: The open phrase database for ibus Pinyin +Group: System Environment/Libraries +Requires(post): sqlite + +%description open-phrase +The open phrase database for ibus Pinyin engine. + %prep %setup -q -cp %{SOURCE1} data +cp %{SOURCE1} data/db/open-phrase %build -%configure --disable-static +%configure --disable-static --enable-db-open-phrase # make -C po update-gmo make %{?_smp_mflags} @@ -44,16 +52,28 @@ rm -rf $RPM_BUILD_ROOT %post cd %{_datadir}/ibus-pinyin/db -sqlite3 main.db ".read create_index.sql" +sqlite3 google.db ".read create_index.sql" + +%post open-phrase +cd %{_datadir}/ibus-pinyin/db +sqlite3 open-phrase.db ".read create_index.sql" %files -f %{name}.lang %defattr(-,root,root,-) %doc AUTHORS COPYING README %{_libexecdir}/ibus-engine-pinyin %{_libexecdir}/ibus-setup-pinyin -%{_datadir}/@PACKAGE@ +%{_datadir}/@PACKAGE@/icons +%{_datadir}/@PACKAGE@/setup +%{_datadir}/@PACKAGE@/db/create_index.sql +%{_datadir}/@PACKAGE@/db/google.db +%dir %{_datadir}/@PACKAGE@ +%dir %{_datadir}/@PACKAGE@/db %{_datadir}/ibus/component/* +%files open-phrase +%{_datadir}/@PACKAGE@/db/open-phrase.db + %changelog * Fri Aug 08 2008 Peng Huang <shawn.p.huang@gmail.com> - @VERSION@-1 - The first version. |