diff options
author | Hiroshi Sumita <hsumita@chromium.org> | 2011-10-24 16:16:00 +0900 |
---|---|---|
committer | Hiroshi Sumita <hsumita@chromium.org> | 2011-10-24 16:16:00 +0900 |
commit | 32c13912899c5157109956df739e7ac0393026cb (patch) | |
tree | 9995a1132991fada224d761c2e36aa816cd838d1 | |
parent | e2d0d0cb1ae84e436197fe71c4be4f2d9beaf5f9 (diff) | |
download | pyzy-32c13912899c5157109956df739e7ac0393026cb.tar.gz |
Rename to libpyzy and remove unused files.
This CL don't modify some files which is related to a URL or debian.
BUG=None
TEST=Manually
Review URL: http://codereview.appspot.com/5305041
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | AUTHORS | 4 | ||||
-rw-r--r-- | Makefile.am | 4 | ||||
-rwxr-xr-x | autogen.sh | 2 | ||||
-rw-r--r-- | configure.ac | 12 | ||||
-rw-r--r-- | libpyzy.spec.in (renamed from ibus-pinyin.spec.in) | 25 | ||||
-rw-r--r-- | src/Makefile.am | 19 | ||||
-rw-r--r-- | src/Makefile.am.lib | 193 | ||||
-rw-r--r-- | src/Makefile.am.test | 186 | ||||
-rw-r--r-- | src/pinyin.xml.in.in | 42 |
10 files changed, 19 insertions, 472 deletions
@@ -17,8 +17,8 @@ config.sub confinc confmf depcomp -ibus-pinyin-*.tar.gz -ibus-pinyin.spec +libpyzy-*.tar.gz +libpyzy.spec install-sh libtool ltmain.sh @@ -1,6 +1,4 @@ Peng Huang <shawn.p.huang@gmail.com> BYVoid <byvoid1@gmail.com> Peng Wu <alexepico@gmail.com> - -ru.po: -koterpillar +Hiroshi Sumita <sumita12@gmail.com> diff --git a/Makefile.am b/Makefile.am index df1e183..a551747 100644 --- a/Makefile.am +++ b/Makefile.am @@ -36,7 +36,7 @@ ACLOCAL_AMFLAGS = -I m4 EXTRA_DIST = \ autogen.sh \ - ibus-pinyin.spec.in \ + libpyzy.spec.in \ $(NULL) noinst_DIST = \ @@ -114,7 +114,7 @@ dpkg: dist debian/changelog upload: dist ./tools/googlecode_upload.py \ - -s "ibus-pinyin(拼音)source code" \ + -s "libpyzy source code" \ -p ibus \ -l "Type-Source,OpSys-Linux,Chinese,Unstable" \ $(distdir).tar.gz @@ -4,7 +4,7 @@ srcdir=`dirname $0` test -z "$srcdir" && srcdir=. -PKG_NAME="ibus-pinyin" +PKG_NAME="libpyzy" (test -f $srcdir/configure.ac \ && test -f $srcdir/README ) || { diff --git a/configure.ac b/configure.ac index 767deca..08aa456 100644 --- a/configure.ac +++ b/configure.ac @@ -30,7 +30,7 @@ m4_define(ibus_maybe_datestamp, m4_define([ibus_version], ibus_major_version.ibus_minor_version.ibus_micro_version[]ibus_maybe_datestamp) -AC_INIT([ibus-pinyin], [ibus_version], [http://code.google.com/p/ibus/issues/entry],[ibus-pinyin]) +AC_INIT([libpyzy], [ibus_version], [http://code.google.com/p/ibus/issues/entry],[libpyzy]) AM_INIT_AUTOMAKE([1.10]) AC_GNU_SOURCE @@ -122,13 +122,6 @@ if test x"$enable_opencc" = x"yes"; then ]) fi -# define GETTEXT_* variables -GETTEXT_PACKAGE=ibus-pinyin -AC_SUBST(GETTEXT_PACKAGE) -AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package]) - -AM_GLIB_GNU_GETTEXT - # --enable-db-android AC_ARG_ENABLE(db-android, AS_HELP_STRING([--disable-db-android], @@ -150,9 +143,8 @@ AM_CONDITIONAL(IBUS_BUILD_DB_OPEN_PHRASE, [test x"$enable_db_open_phrase" = x"ye # OUTPUT files AC_CONFIG_FILES([ Makefile -ibus-pinyin.spec +libpyzy.spec src/Makefile -src/pinyin.xml.in data/Makefile data/db/Makefile data/db/android/Makefile diff --git a/ibus-pinyin.spec.in b/libpyzy.spec.in index a7490d8..e5f0181 100644 --- a/ibus-pinyin.spec.in +++ b/libpyzy.spec.in @@ -11,7 +11,6 @@ Source1: pinyin-database-1.2.99.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: glib2 -BuildRequires: gettext-devel BuildRequires: libtool BuildRequires: pkgconfig BuildRequires: sqlite-devel @@ -21,30 +20,30 @@ BuildRequires: gtest-devel # Requires(post): sqlite -Requires: ibus-pinyin-db = %{version}-%{release} +Requires: libpyzy-db = %{version}-%{release} %description -The Chinese Pinyin and Bopomof input methods for IBus platform. +The Chinese Pinyin and Bopomofo conversion library. %package db-open-phrase -Summary: The open phrase database for ibus Pinyin +Summary: The open phrase database for libpyzy Group: System Environment/Libraries BuildArch: noarch -Provides: ibus-pinyin-db +Provides: libpyzy-db Requires(post): sqlite %description db-open-phrase -The phrase database for ibus Pinyin and Bopomofo from open-phrase project. +The phrase database for libpyzy from open-phrase project. %package db-android -Summary: The android phrase database for ibus Pinyin and Bopomofo +Summary: The android phrase database for libpyzy Group: System Environment/Libraries BuildArch: noarch -Provides: ibus-pinyin-db +Provides: libpyzy-db Requires(post): sqlite %description db-android -The phrase database for ibus Pinyin and Bopomofo from android project. +The phrase database for libpyzy from android project. %prep %setup -q @@ -66,27 +65,25 @@ make DESTDIR=${RPM_BUILD_ROOT} install rm -rf $RPM_BUILD_ROOT %post -# cd %{_datadir}/ibus-pinyin/db +# cd %{_datadir}/libpyzy/db # sqlite3 android.db ".read create_index.sql" %post db-open-phrase -# cd %{_datadir}/ibus-pinyin/db +# cd %{_datadir}/libpyzy/db # sqlite3 open-phrase.db ".read create_index.sql" %post db-android -# cd %{_datadir}/ibus-pinyin/db +# cd %{_datadir}/libpyzy/db # sqlite3 android.db ".read create_index.sql" %files -f %{name}.lang %defattr(-,root,root,-) %doc AUTHORS COPYING README -%{_libexecdir}/ibus-engine-pinyin %{_datadir}/@PACKAGE@/phrases.txt %{_datadir}/@PACKAGE@/icons %{_datadir}/@PACKAGE@/db/create_index.sql %dir %{_datadir}/@PACKAGE@ %dir %{_datadir}/@PACKAGE@/db -%{_datadir}/ibus/component/* %files db-open-phrase %{_datadir}/@PACKAGE@/db/open-phrase.db diff --git a/src/Makefile.am b/src/Makefile.am index 6aaedd9..bc826b2 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -40,7 +40,6 @@ libpyzyinclude_HEADERS = \ $(NULL) lib_LTLIBRARIES = libpyzy.la -#libexec_PROGRAMS = ibus-engine-pinyin libpyzy_built_c_sources = \ $(NULL) libpyzy_built_h_sources = \ @@ -101,9 +100,7 @@ libpyzy_la_CXXFLAGS = \ @GLIB2_CFLAGS@ \ @SQLITE_CFLAGS@ \ @OPENCC_CFLAGS@ \ - -DGETTEXT_PACKAGE=\"@GETTEXT_PACKAGE@\" \ -DPKGDATADIR=\"$(pkgdatadir)\" \ - -DLIBEXECDIR=\"$(libexecdir)\" \ $(NULL) if HAVE_BOOST @@ -137,18 +134,11 @@ pkgdata_DATA = \ phrases.txt \ $(NULL) -component_DATA = \ - pinyin.xml \ - $(NULL) -componentdir = @datadir@/ibus/component - EXTRA_DIST = \ - pinyin.xml.in \ phrases.txt \ $(NULL) CLEANFILES = \ - pinyin.xml \ ZhConversion.* \ $(NULL) @@ -173,15 +163,6 @@ update-simptrad-table: $(MAKE) ZhConversion.py $(MAKE) PyZySimpTradConverterTable.h -pinyin.xml: pinyin.xml.in - $(AM_V_GEN) \ - ( \ - libexecdir=${libexecdir}; \ - pkgdatadir=${pkgdatadir}; \ - s=`cat $<`; \ - eval "echo \"$${s}\""; \ - ) > $@ - ZhConversion.php: $(AM_V_GEN) \ svn cat http://svn.wikimedia.org/svnroot/mediawiki/trunk/phase3/includes/ZhConversion.php > $@ || \ diff --git a/src/Makefile.am.lib b/src/Makefile.am.lib deleted file mode 100644 index 917c46a..0000000 --- a/src/Makefile.am.lib +++ /dev/null @@ -1,193 +0,0 @@ -# vim:set noet ts=4: -# -# ibus-pinyin - The Chinese PinYin engine for IBus -# -# Copyright (c) 2008-2010 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. - -# @MAINTAINER_MODE_FALSE@skip_gentable=test -f $@ || - -# AM_CFLAGS = \ -# @IBUS_CFLAGS@ \ -# @SQLITE_CFLAGS@ \ -# -DPKGDATADIR=\"$(pkgdatadir)\" \ -# $(NULL) -# AM_CXXFLAGS = $(AM_CFLAGS) -# AM_LDADD = \ -# @IBUS_LIBS@ \ -# @SQLITE_LIBS@ \ -# $(NULL) -# - -libpyzyincludedir = $(includedir)/libpyzy-1.0 -libpyzyinclude_HEADERS = \ - PyZyInputContext.h \ - PyZyConfig.h \ - $(NULL) -lib_LTLIBRARIES = libpyzy.la - -#libexec_PROGRAMS = ibus-engine-pinyin -libpyzy_built_c_sources = \ - $(NULL) -libpyzy_built_h_sources = \ - PyZyBopomofoKeyboard.h \ - PyZyPinyinParserTable.h \ - PyZySimpTradConverterTable.h \ - $(NULL) -libpyzy_c_sources = \ - PyZyInputContext.cc \ - PyZyBopomofoContext.cc \ - PyZyConfig.cc \ - PyZyDatabase.cc \ - PyZyDoublePinyinContext.cc \ - PyZyFullPinyinContext.cc \ - PyZyPhoneticContext.cc \ - PyZyPhraseEditor.cc \ - PyZyPinyinContext.cc \ - PyZyPinyinParser.cc \ - PyZySimpTradConverter.cc \ - PyZyDynamicSpecialPhrase.cc \ - PyZySpecialPhraseTable.cc \ - $(NULL) -# PyZyTest.cc -libpyzy_h_sources = \ - PyZyInputContext.h \ - PyZyBopomofo.h \ - PyZyBopomofoContext.h \ - PyZyConfig.h \ - PyZyDatabase.h \ - PyZyDoublePinyinContext.h \ - PyZyDoublePinyinTable.h \ - PyZyFullPinyinContext.h \ - PyZyPhoneticContext.h \ - PyZyPhrase.h \ - PyZyPhraseArray.h \ - PyZyPhraseEditor.h \ - PyZyPinyinArray.h \ - PyZyPinyinContext.h \ - PyZyPinyinParser.h \ - PyZySimpTradConverter.h \ - PyZySpecialPhrase.h \ - PyZyDynamicSpecialPhrase.h \ - PyZySpecialPhraseTable.h \ - PyZyString.h \ - PyZyTypes.h \ - PyZyUtil.h \ - $(NULL) - -libpyzy_la_SOURCES = \ - $(libpyzy_c_sources) \ - $(libpyzy_h_sources) \ - $(libpyzy_built_c_sources) \ - $(libpyzy_built_h_sources) \ - $(NULL) - - -libpyzy_la_CXXFLAGS = \ - @GLIB2_CFLAGS@ \ - @SQLITE_CFLAGS@ \ - @OPENCC_CFLAGS@ \ - -DGETTEXT_PACKAGE=\"@GETTEXT_PACKAGE@\" \ - -DPKGDATADIR=\"$(pkgdatadir)\" \ - -DLIBEXECDIR=\"$(libexecdir)\" \ - $(NULL) - -if HAVE_BOOST -libpyzy_la_CXXFLAGS += \ - @BOOST_CPPFLAGS@ \ - $(NULL) -else -libpyzy_la_CXXFLAGS += \ - -std=c++0x \ - $(NULL) -endif - -libpyzy_la_LIBADD = \ - @GLIB2_LIBS@ \ - @SQLITE_LIBS@ \ - @OPENCC_LIBS@ \ - -lgtest \ - $(NULL) - -if HAVE_LIBUUID -libpyzy_la_CXXFLAGS += $(LIBUUID_CFLAGS) -libpyzy_la_LIBADD += $(LIBUUID_LIBS) -endif - -BUILT_SOURCES = \ - $(libpyzy_built_c_sources) \ - $(libpyzy_built_h_sources) \ - $(NULL) - -pkgdata_DATA = \ - phrases.txt \ - $(NULL) - -component_DATA = \ - pinyin.xml \ - $(NULL) -componentdir = @datadir@/ibus/component - -EXTRA_DIST = \ - pinyin.xml.in \ - phrases.txt \ - $(NULL) - -CLEANFILES = \ - pinyin.xml \ - ZhConversion.* \ - $(NULL) - -PyZyBopomofoKeyboard.h: - $(AM_V_GEN) \ - $(PYTHON) $(top_srcdir)/scripts/genbopomofokeyboard.py > $@ || \ - ( $(RM) $@; exit 1 ) - -PyZyPinyinParserTable.h: - $(AM_V_GEN) \ - $(PYTHON) $(top_srcdir)/scripts/genpytable.py > $@ || \ - ( $(RM) $@; exit 1 ) - -PyZySimpTradConverterTable.h: - $(AM_V_GEN) \ - $(PYTHON) $(top_srcdir)/scripts/update-simptrad-table.py > $@ || \ - ( $(RM) $@; exit 1 ) - -update-simptrad-table: - $(RM) ZhConversion.php ZhConversion.py PyZySimpTradConverterTable.h - $(MAKE) ZhConversion.php - $(MAKE) ZhConversion.py - $(MAKE) PyZySimpTradConverterTable.h - -pinyin.xml: pinyin.xml.in - $(AM_V_GEN) \ - ( \ - libexecdir=${libexecdir}; \ - pkgdatadir=${pkgdatadir}; \ - s=`cat $<`; \ - eval "echo \"$${s}\""; \ - ) > $@ - -ZhConversion.php: - $(AM_V_GEN) \ - svn cat http://svn.wikimedia.org/svnroot/mediawiki/trunk/phase3/includes/ZhConversion.php > $@ || \ - ( $(RM) $@; exit 1 ) - -ZhConversion.py: ZhConversion.php - $(AM_V_GEN) \ - php $(top_srcdir)/scripts/php_2_py.php > $@ || \ - ( $(RM) $@; exit 1 ) - diff --git a/src/Makefile.am.test b/src/Makefile.am.test deleted file mode 100644 index f81368b..0000000 --- a/src/Makefile.am.test +++ /dev/null @@ -1,186 +0,0 @@ -# vim:set noet ts=4: -# -# ibus-pinyin - The Chinese PinYin engine for IBus -# -# Copyright (c) 2008-2010 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. - -# @MAINTAINER_MODE_FALSE@skip_gentable=test -f $@ || - -# AM_CFLAGS = \ -# @IBUS_CFLAGS@ \ -# @SQLITE_CFLAGS@ \ -# -DPKGDATADIR=\"$(pkgdatadir)\" \ -# $(NULL) -# AM_CXXFLAGS = $(AM_CFLAGS) -# AM_LDADD = \ -# @IBUS_LIBS@ \ -# @SQLITE_LIBS@ \ -# $(NULL) -# p - -libexec_PROGRAMS = ibus-engine-pinyin -ibus_engine_pinyin_built_c_sources = \ - $(NULL) -ibus_engine_pinyin_built_h_sources = \ - PyZyBopomofoKeyboard.h \ - PyZyPinyinParserTable.h \ - PyZySimpTradConverterTable.h \ - $(NULL) -ibus_engine_pinyin_c_sources = \ - PyZyInputContext.cc \ - PyZyBopomofoContext.cc \ - PyZyConfig.cc \ - PyZyDatabase.cc \ - PyZyDoublePinyinContext.cc \ - PyZyFullPinyinContext.cc \ - PyZyPhoneticContext.cc \ - PyZyPhraseEditor.cc \ - PyZyPinyinContext.cc \ - PyZyPinyinParser.cc \ - PyZySimpTradConverter.cc \ - PyZyDynamicSpecialPhrase.cc \ - PyZySpecialPhraseTable.cc \ - PyZyTest.cc \ - $(NULL) -ibus_engine_pinyin_h_sources = \ - PyZyInputContext.h \ - PyZyBopomofo.h \ - PyZyBopomofoContext.h \ - PyZyConfig.h \ - PyZyDatabase.h \ - PyZyDoublePinyinContext.h \ - PyZyDoublePinyinTable.h \ - PyZyFullPinyinContext.h \ - PyZyPhoneticContext.h \ - PyZyPhrase.h \ - PyZyPhraseArray.h \ - PyZyPhraseEditor.h \ - PyZyPinyinArray.h \ - PyZyPinyinContext.h \ - PyZyPinyinParser.h \ - PyZySimpTradConverter.h \ - PyZySpecialPhrase.h \ - PyZyDynamicSpecialPhrase.h \ - PyZySpecialPhraseTable.h \ - PyZyString.h \ - PyZyTypes.h \ - PyZyUtil.h \ - $(NULL) - -ibus_engine_pinyin_SOURCES = \ - $(ibus_engine_pinyin_c_sources) \ - $(ibus_engine_pinyin_h_sources) \ - $(ibus_engine_pinyin_built_c_sources) \ - $(ibus_engine_pinyin_built_h_sources) \ - $(NULL) - - -ibus_engine_pinyin_CXXFLAGS = \ - @GLIB2_CFLAGS@ \ - @SQLITE_CFLAGS@ \ - @OPENCC_CFLAGS@ \ - -DGETTEXT_PACKAGE=\"@GETTEXT_PACKAGE@\" \ - -DPKGDATADIR=\"$(pkgdatadir)\" \ - -DLIBEXECDIR=\"$(libexecdir)\" \ - $(NULL) - -if HAVE_BOOST -ibus_engine_pinyin_CXXFLAGS += \ - @BOOST_CPPFLAGS@ \ - $(NULL) -else -ibus_engine_pinyin_CXXFLAGS += \ - -std=c++0x \ - $(NULL) -endif - -ibus_engine_pinyin_LDADD = \ - @GLIB2_LIBS@ \ - @SQLITE_LIBS@ \ - @OPENCC_LIBS@ \ - -lgtest \ - $(NULL) - -if HAVE_LIBUUID -ibus_engine_pinyin_CXXFLAGS += $(LIBUUID_CFLAGS) -ibus_engine_pinyin_LDADD += $(LIBUUID_LIBS) -endif - -BUILT_SOURCES = \ - $(ibus_engine_built_c_sources) \ - $(ibus_engine_built_h_sources) \ - $(NULL) - -pkgdata_DATA = \ - phrases.txt \ - $(NULL) - -component_DATA = \ - pinyin.xml \ - $(NULL) -componentdir = @datadir@/ibus/component - -EXTRA_DIST = \ - pinyin.xml.in \ - phrases.txt \ - $(NULL) - -CLEANFILES = \ - pinyin.xml \ - ZhConversion.* \ - $(NULL) - -PyZyBopomofoKeyboard.h: - $(AM_V_GEN) \ - $(PYTHON) $(top_srcdir)/scripts/genbopomofokeyboard.py > $@ || \ - ( $(RM) $@; exit 1 ) - -PyZyPinyinParserTable.h: - $(AM_V_GEN) \ - $(PYTHON) $(top_srcdir)/scripts/genpytable.py > $@ || \ - ( $(RM) $@; exit 1 ) - -PyZySimpTradConverterTable.h: - $(AM_V_GEN) \ - $(PYTHON) $(top_srcdir)/scripts/update-simptrad-table.py > $@ || \ - ( $(RM) $@; exit 1 ) - -update-simptrad-table: - $(RM) ZhConversion.php ZhConversion.py PyZySimpTradConverterTable.h - $(MAKE) ZhConversion.php - $(MAKE) ZhConversion.py - $(MAKE) PyZySimpTradConverterTable.h - -pinyin.xml: pinyin.xml.in - $(AM_V_GEN) \ - ( \ - libexecdir=${libexecdir}; \ - pkgdatadir=${pkgdatadir}; \ - s=`cat $<`; \ - eval "echo \"$${s}\""; \ - ) > $@ - -ZhConversion.php: - $(AM_V_GEN) \ - svn cat http://svn.wikimedia.org/svnroot/mediawiki/trunk/phase3/includes/ZhConversion.php > $@ || \ - ( $(RM) $@; exit 1 ) - -ZhConversion.py: ZhConversion.php - $(AM_V_GEN) \ - php $(top_srcdir)/scripts/php_2_py.php > $@ || \ - ( $(RM) $@; exit 1 ) - diff --git a/src/pinyin.xml.in.in b/src/pinyin.xml.in.in deleted file mode 100644 index 94b803a..0000000 --- a/src/pinyin.xml.in.in +++ /dev/null @@ -1,42 +0,0 @@ -<?xml version=\"1.0\" encoding=\"utf-8\"?> -<!-- filename: pinyin.xml --> -<component> - <name>org.freedesktop.IBus.Pinyin</name> - <description>Pinyin Component</description> - <exec>${libexecdir}/ibus-engine-pinyin --ibus</exec> - <version>@VERSION@</version> - <author>Peng Huang <shawn.p.huang@gmail.com></author> - <license>GPL</license> - <homepage>http://code.google.com/p/ibus</homepage> - <textdomain>ibus-pinyin</textdomain> - - <engines> - <engine> - <name>pinyin</name> - <language>zh</language> - <license>GPL</license> - <author>Peng Huang <shawn.p.huang@gmail.com> -BYVoid <byvoid1@gmail.com> -Peng Wu <alexepico@gmail.com></author> - <icon>${pkgdatadir}/icons/ibus-pinyin.svg</icon> - <layout>us</layout> - <longname>Pinyin</longname> - <description>Pinyin input method</description> - <rank>99</rank> - </engine> - <engine> - <name>bopomofo</name> - <language>zh</language> - <license>GPL</license> - <author>BYVoid <byvoid1@gmail.com> -Peng Huang <shawn.p.huang@gmail.com> -Peng Wu <alexepico@gmail.com></author> - <icon>${pkgdatadir}/icons/ibus-bopomofo.svg</icon> - <layout>us</layout> - <longname>Bopomofo</longname> - <description>Bopomofo input method</description> - <rank>98</rank> - </engine> - </engines> - -</component> |