diff --git a/SOURCES/0001-Fix-typo-in-ibus-table-createdb-man-page.patch b/SOURCES/0001-Fix-typo-in-ibus-table-createdb-man-page.patch new file mode 100644 index 0000000..a1b60a8 --- /dev/null +++ b/SOURCES/0001-Fix-typo-in-ibus-table-createdb-man-page.patch @@ -0,0 +1,26 @@ +From 783d52a211b0e12f0c830e8c96a49682647faaf1 Mon Sep 17 00:00:00 2001 +From: Mike FABIAN +Date: Wed, 22 Jan 2014 12:11:18 +0100 +Subject: [PATCH 1/2] Fix typo in ibus-table-createdb man-page + +"for for" -> "for" +--- + engine/ibus-table-createdb.sgml | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/engine/ibus-table-createdb.sgml b/engine/ibus-table-createdb.sgml +index 86c8336..6a1e439 100644 +--- a/engine/ibus-table-createdb.sgml ++++ b/engine/ibus-table-createdb.sgml +@@ -142,7 +142,7 @@ manpage.1: manpage.sgml + + + +- Do not create an index for for a database (Only for distribution purposes, a normal user should not use this flag!) ++ Do not create an index for a database (Only for distribution purposes, a normal user should not use this flag!) + + + +-- +1.8.4.2 + diff --git a/SOURCES/0002-When-tabcreatedb.py-is-called-without-any-options-pr.patch b/SOURCES/0002-When-tabcreatedb.py-is-called-without-any-options-pr.patch new file mode 100644 index 0000000..80baab4 --- /dev/null +++ b/SOURCES/0002-When-tabcreatedb.py-is-called-without-any-options-pr.patch @@ -0,0 +1,135 @@ +From 87cb7fb1ee81da34e0a6b40efba561236dff772a Mon Sep 17 00:00:00 2001 +From: Mike FABIAN +Date: Thu, 23 Jan 2014 23:26:57 +0100 +Subject: [PATCH 2/2] When tabcreatedb.py is called without any options, print + a usage message + +Do not just show a cryptic backtrace. + +Resolves: rhbz#1049760 +See: https://bugzilla.redhat.com/show_bug.cgi?id=1049760 +--- + engine/ibus-table-createdb.sgml | 8 ++++---- + engine/tabcreatedb.py | 43 +++++++++++++++++++++++++---------------- + 2 files changed, 30 insertions(+), 21 deletions(-) + +diff --git a/engine/ibus-table-createdb.sgml b/engine/ibus-table-createdb.sgml +index 6a1e439..e14ffb2 100644 +--- a/engine/ibus-table-createdb.sgml ++++ b/engine/ibus-table-createdb.sgml +@@ -108,7 +108,7 @@ manpage.1: manpage.sgml + + + +- database-file specifies the file which will contain the binary database for the IME. The default is ''. ++ database-file specifies the file name for the binary database for the IME. The default is ''. If the file name of the database is not specified, the file name of the source file before the first '.' will be appended with '.db' and that will be used as the file name of the database. + + + +@@ -125,7 +125,7 @@ manpage.1: manpage.sgml + + + +- extra-words-file specifies the file for the extra words for the IME. The default is ''. ++ extra-words-file specifies the file name for the extra words for the IME. The default is ''. + + + +@@ -134,7 +134,7 @@ manpage.1: manpage.sgml + + + +- pinyin-file specifies the source file for the pinyin. The default is /usr/share/ibus-table/data/pinyin_table.txt.bz2. ++ pinyin-file specifies the source file for the pinyin. The default is '/usr/share/ibus-table/data/pinyin_table.txt.bz2'. + + + +@@ -150,7 +150,7 @@ manpage.1: manpage.sgml + + + +- Only create an index for an existing database. ++ Only create an index for an existing database. Specifying the file name of the binary database with the -n or --name option is required when this option is used. + + + +diff --git a/engine/tabcreatedb.py b/engine/tabcreatedb.py +index 6694b13..fb6d7e2 100644 +--- a/engine/tabcreatedb.py ++++ b/engine/tabcreatedb.py +@@ -62,46 +62,55 @@ class InvalidTableName(Exception): + return 'Value of NAME attribute (%s) cannot contain any of %r and must be all ascii' % (self.table_name, _invalid_keyname_chars) + + # we use OptionParser to parse the cmd arguments :) +-opt_parser = OptionParser() ++usage = "usage: %prog [options]" ++opt_parser = OptionParser(usage=usage) + + opt_parser.add_option( '-n', '--name', +- action = 'store', dest='name',default = None, +- help = 'set the database name we will use, default is %default') ++ action = 'store', dest='name',default = '', ++ help = "specifies the file name for the binary database for the IME. The default is '%default'. If the file name of the database is not specified, the file name of the source file before the first '.' will be appended with '.db' and that will be used as the file name of the database.") + + opt_parser.add_option( '-s', '--source', +- action = 'store', dest='source', default = 'xingma.txt.bz2', +- help = 'specifies the file which contains the source file of the IME. The default is %default') ++ action = 'store', dest='source', default = '', ++ help = "specifies the file which contains the source of the IME. The default is '%default'.") + + opt_parser.add_option( '-e', '--extra', + action = 'store', dest='extra', default = '', +- help = 'specifies the file for the extra words for the IME. The default is %default') ++ help = "specifies the file name for the extra words for the IME. The default is '%default'.") + + opt_parser.add_option( '-p', '--pinyin', + action = 'store', dest='pinyin', default = '/usr/share/ibus-table/data/pinyin_table.txt.bz2', +- help = 'specifies the source file for the pinyin. The default is %default') ++ help = "specifies the source file for the pinyin. The default is '%default'.") + + opt_parser.add_option( '-o', '--no-create-index', + action = 'store_false', dest='index', default = True, +- help = 'do not create an index for a database (Only for distrubution purposes, a normal user should not use this flag!)') ++ help = 'Do not create an index for a database (Only for distrubution purposes, a normal user should not use this flag!)') + + opt_parser.add_option( '-i', '--create-index-only', + action = 'store_true', dest='only_index', default = False, +- help = 'only create an index for an existing database') ++ help = 'Only create an index for an existing database. Specifying the file name of the binary database with the -n or --name option is required when this option is used.') + + opt_parser.add_option( '-d', '--debug', + action = 'store_true', dest='debug', default = False, +- help = 'print extra debug messages') +- +- ++ help = 'Print extra debug messages.') + + opts,args = opt_parser.parse_args() +-if not opts.name and opts.only_index: +- print 'Please give me the database you want to create index on' +- sys.exit(2) +- +-if not opts.name: ++if opts.only_index: ++ if not opts.name: ++ opt_parser.print_help() ++ print('\nPlease specify the file name of the database you want to create an index on!') ++ sys.exit(2) ++ if not os.path.exists(opts.name) or not os.path.isfile(opts.name): ++ opt_parser.print_help() ++ print("\nThe database file '%s' does not exist." %opts.name) ++ sys.exit(2) ++ ++if not opts.name and opts.source: + opts.name = os.path.basename(opts.source).split('.')[0] + '.db' + ++if not opts.name: ++ opt_parser.print_help() ++ print '\nYou need to specify the file which contains the source of the IME!' ++ sys.exit(2) + + def main (): + def debug_print ( message ): +-- +1.8.4.2 + diff --git a/SOURCES/0006-Add-man-page-for-ibus-table-createdb.patch b/SOURCES/0006-Add-man-page-for-ibus-table-createdb.patch new file mode 100644 index 0000000..4b0bba5 --- /dev/null +++ b/SOURCES/0006-Add-man-page-for-ibus-table-createdb.patch @@ -0,0 +1,298 @@ +From 99b16e2159ba4234f4f804fe10348c9f3b2a8000 Mon Sep 17 00:00:00 2001 +From: Mike FABIAN +Date: Thu, 18 Apr 2013 12:10:50 +0200 +Subject: [PATCH] Add man page for ibus-table-createdb + +See https://bugzilla.redhat.com/show_bug.cgi?id=948454 +--- + engine/Makefile.am | 12 +++ + engine/ibus-table-createdb.sgml | 206 ++++++++++++++++++++++++++++++++++++++++ + engine/tabcreatedb.py | 10 +- + 3 files changed, 223 insertions(+), 5 deletions(-) + create mode 100644 engine/ibus-table-createdb.sgml + +diff --git a/engine/Makefile.am b/engine/Makefile.am +index f17afe3..1fb070e 100644 +--- a/engine/Makefile.am ++++ b/engine/Makefile.am +@@ -19,6 +19,11 @@ + # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + # + ++DOC2MAN = docbook2man ++SGML = ibus-table-createdb.sgml ++BUILT_MANS = ibus-table-createdb.1 ++man_MANS = $(BUILT_MANS) ++ + engine_table_PYTHON = \ + chinese_variants.py \ + factory.py \ +@@ -43,6 +48,8 @@ EXTRA_DIST = \ + ibus-table-createdb.in \ + ibus-engine-table.in \ + table.xml.in \ ++ $(SGML) \ ++ $(BUILT_MANS) \ + $(NULL) + + CLEANFILES = \ +@@ -57,6 +64,11 @@ MAINTAINERCLEANFILES = \ + Makefile.in \ + $(NULL) + ++${man_MANS}: ${SGML} ++ $(AM_V_GEN) $(RM) $@; \ ++ $(DOC2MAN) ${SGML}; \ ++ $(RM) manpage.* ++ + table.xml: table.xml.in + ( \ + libexecdir=${libexecdir}; \ +diff --git a/engine/ibus-table-createdb.sgml b/engine/ibus-table-createdb.sgml +new file mode 100644 +index 0000000..86c8336 +--- /dev/null ++++ b/engine/ibus-table-createdb.sgml +@@ -0,0 +1,206 @@ ++ manpage.1'. You may view ++ the manual page with: `docbook-to-man manpage.sgml | nroff -man | ++ less'. A typical entry in a Makefile or Makefile.am is: ++ ++manpage.1: manpage.sgml ++ docbook-to-man $< > $@ ++ ++ ++ The docbook-to-man binary is found in the docbook-to-man package. ++ Please remember that if you create the nroff version in one of the ++ debian/rules file targets (such as build), you will need to include ++ docbook-to-man in your Build-Depends control field. ++ ++ --> ++ ++ ++ Mike"> ++ FABIAN"> ++ ++ Apr 18, 2013"> ++ ++ 1"> ++ mfabian@redhat.com"> ++ ++ ibus-table-createdb"> ++ ++ ++ Debian"> ++ GNU"> ++ GPL"> ++]> ++ ++ ++ ++
++ &dhemail; ++
++ ++ &dhfirstname; ++ &dhsurname; ++ ++ ++ 2013 ++ &dhusername; ++ ++ &dhdate; ++
++ ++ &dhucpackage; ++ ++ &dhsection; ++ ++ ++ &dhpackage; ++ ++ create ibus-table database from table source ++ ++ ++ ++ &dhpackage; ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ DESCRIPTION ++ ++ &dhpackage; creates a database for ++ ibus-table from a source table. ++ ++ ++ OPTIONS ++ ++ This program follows the usual &gnu; command line syntax, ++ with long options starting with two dashes (`-'). A summary of ++ options is included below. ++ ++ ++ ++ ++ ++ ++ ++ database-file specifies the file which will contain the binary database for the IME. The default is ''. ++ ++
++ ++ ++ ++ ++ ++ source-file specifies the file which contains the source of the IME. The default is ''. ++ ++ ++ ++ ++ ++ ++ ++ ++ extra-words-file specifies the file for the extra words for the IME. The default is ''. ++ ++ ++ ++ ++ ++ ++ ++ ++ pinyin-file specifies the source file for the pinyin. The default is /usr/share/ibus-table/data/pinyin_table.txt.bz2. ++ ++ ++ ++ ++ ++ ++ ++ Do not create an index for for a database (Only for distribution purposes, a normal user should not use this flag!) ++ ++ ++ ++ ++ ++ ++ ++ Only create an index for an existing database. ++ ++ ++ ++ ++ ++ ++ ++ Print extra debug messages. ++ ++ ++ ++ ++ ++ ++ EXAMPLES ++ ++ ++ ++ ibus-table-createdb -n ipa-x-sampa.db -s ipa-x-sampa.txt ++ Create the binary database ipa-x-sampa.db from the source file ipa-x-sampa.txt. ++ ++ ++ ibus-table-createdb -i -n ipa-x-sampa.db ++ Create an index for the database ipa-x-sampa.db. ++ ++ ++ ++ ++ ++ ++ AUTHOR ++ ++ This manual page was written by &dhusername; &dhemail;. ++ ++ ++ ++ ++ +diff --git a/engine/tabcreatedb.py b/engine/tabcreatedb.py +index 19ebacc..6694b13 100644 +--- a/engine/tabcreatedb.py ++++ b/engine/tabcreatedb.py +@@ -70,23 +70,23 @@ opt_parser.add_option( '-n', '--name', + + opt_parser.add_option( '-s', '--source', + action = 'store', dest='source', default = 'xingma.txt.bz2', +- help = 'tell me which file is the source file of IME, default is %default') ++ help = 'specifies the file which contains the source file of the IME. The default is %default') + + opt_parser.add_option( '-e', '--extra', + action = 'store', dest='extra', default = '', +- help = 'tell me which file is the extra words file for IME, default is %default') ++ help = 'specifies the file for the extra words for the IME. The default is %default') + + opt_parser.add_option( '-p', '--pinyin', + action = 'store', dest='pinyin', default = '/usr/share/ibus-table/data/pinyin_table.txt.bz2', +- help = 'tell me which file is the source file of pinyin, default is %default') ++ help = 'specifies the source file for the pinyin. The default is %default') + + opt_parser.add_option( '-o', '--no-create-index', + action = 'store_false', dest='index', default = True, +- help = 'do not create index on database, only for distrubution purpose, normal user should not invoke this flag!') ++ help = 'do not create an index for a database (Only for distrubution purposes, a normal user should not use this flag!)') + + opt_parser.add_option( '-i', '--create-index-only', + action = 'store_true', dest='only_index', default = False, +- help = 'only create index on exist database') ++ help = 'only create an index for an existing database') + + opt_parser.add_option( '-d', '--debug', + action = 'store_true', dest='debug', default = False, +-- +1.8.4.2 + diff --git a/SOURCES/0007-prebuilt-files-for-man-page-for-ibus-table-createdb.patch b/SOURCES/0007-prebuilt-files-for-man-page-for-ibus-table-createdb.patch new file mode 100644 index 0000000..95201d7 --- /dev/null +++ b/SOURCES/0007-prebuilt-files-for-man-page-for-ibus-table-createdb.patch @@ -0,0 +1,256 @@ +diff -Nru ibus-table-1.5.0.orig/engine/Makefile.in ibus-table-1.5.0/engine/Makefile.in +--- ibus-table-1.5.0.orig/engine/Makefile.in 2014-01-14 10:28:10.066194361 +0100 ++++ ibus-table-1.5.0/engine/Makefile.in 2014-01-14 10:28:33.371351530 +0100 +@@ -1,9 +1,8 @@ +-# Makefile.in generated by automake 1.11.6 from Makefile.am. ++# Makefile.in generated by automake 1.12.2 from Makefile.am. + # @configure_input@ + +-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +-# Foundation, Inc. ++# Copyright (C) 1994-2012 Free Software Foundation, Inc. ++ + # This Makefile.in is free software; the Free Software Foundation + # gives unlimited permission to copy and/or distribute it, + # with or without modifications, as long as this notice is preserved. +@@ -76,7 +75,8 @@ + subdir = engine + DIST_COMMON = $(engine_table_PYTHON) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(srcdir)/ibus-engine-table.in \ +- $(srcdir)/ibus-table-createdb.in $(srcdir)/table.xml.in.in ++ $(srcdir)/ibus-table-createdb.in $(srcdir)/table.xml.in.in \ ++ $(top_srcdir)/py-compile + ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 + am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ +@@ -117,8 +117,8 @@ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } + am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libexecdir)" \ +- "$(DESTDIR)$(engine_tabledir)" "$(DESTDIR)$(enginedir)" \ +- "$(DESTDIR)$(engine_tabledir)" ++ "$(DESTDIR)$(engine_tabledir)" "$(DESTDIR)$(man1dir)" \ ++ "$(DESTDIR)$(enginedir)" "$(DESTDIR)$(engine_tabledir)" + SCRIPTS = $(bin_SCRIPTS) $(libexec_SCRIPTS) + SOURCES = + DIST_SOURCES = +@@ -129,6 +129,9 @@ + esac + am__py_compile = PYTHON=$(PYTHON) $(SHELL) $(py_compile) + py_compile = $(top_srcdir)/py-compile ++man1dir = $(mandir)/man1 ++NROFF = nroff ++MANS = $(man_MANS) + DATA = $(engine_DATA) $(engine_table_DATA) + DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) + ACLOCAL = @ACLOCAL@ +@@ -253,6 +256,10 @@ + top_build_prefix = @top_build_prefix@ + top_builddir = @top_builddir@ + top_srcdir = @top_srcdir@ ++DOC2MAN = docbook2man ++SGML = ibus-table-createdb.sgml ++BUILT_MANS = ibus-table-createdb.1 ++man_MANS = $(BUILT_MANS) + engine_table_PYTHON = \ + chinese_variants.py \ + factory.py \ +@@ -275,6 +282,8 @@ + ibus-table-createdb.in \ + ibus-engine-table.in \ + table.xml.in \ ++ $(SGML) \ ++ $(BUILT_MANS) \ + $(NULL) + + CLEANFILES = \ +@@ -436,6 +445,49 @@ + $(am__uninstall_files_from_dir) || st=$$?; \ + done; \ + exit $$st ++install-man1: $(man_MANS) ++ @$(NORMAL_INSTALL) ++ @list1=''; \ ++ list2='$(man_MANS)'; \ ++ test -n "$(man1dir)" \ ++ && test -n "`echo $$list1$$list2`" \ ++ || exit 0; \ ++ echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \ ++ $(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \ ++ { for i in $$list1; do echo "$$i"; done; \ ++ if test -n "$$list2"; then \ ++ for i in $$list2; do echo "$$i"; done \ ++ | sed -n '/\.1[a-z]*$$/p'; \ ++ fi; \ ++ } | while read p; do \ ++ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ ++ echo "$$d$$p"; echo "$$p"; \ ++ done | \ ++ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ ++ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ ++ sed 'N;N;s,\n, ,g' | { \ ++ list=; while read file base inst; do \ ++ if test "$$base" = "$$inst"; then list="$$list $$file"; else \ ++ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ ++ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ ++ fi; \ ++ done; \ ++ for i in $$list; do echo "$$i"; done | $(am__base_list) | \ ++ while read files; do \ ++ test -z "$$files" || { \ ++ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ ++ $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ ++ done; } ++ ++uninstall-man1: ++ @$(NORMAL_UNINSTALL) ++ @list=''; test -n "$(man1dir)" || exit 0; \ ++ files=`{ for i in $$list; do echo "$$i"; done; \ ++ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ ++ sed -n '/\.1[a-z]*$$/p'; \ ++ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ ++ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ ++ dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir) + install-engineDATA: $(engine_DATA) + @$(NORMAL_INSTALL) + @list='$(engine_DATA)'; test -n "$(enginedir)" || list=; \ +@@ -484,8 +536,23 @@ + ctags: CTAGS + CTAGS: + ++cscope cscopelist: ++ + + distdir: $(DISTFILES) ++ @list='$(MANS)'; if test -n "$$list"; then \ ++ list=`for p in $$list; do \ ++ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ ++ if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ ++ if test -n "$$list" && \ ++ grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ ++ echo "error: found man pages containing the 'missing help2man' replacement text:" >&2; \ ++ grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ ++ echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ ++ echo " typically 'make maintainer-clean' will remove them" >&2; \ ++ exit 1; \ ++ else :; fi; \ ++ else :; fi + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ +@@ -517,9 +584,9 @@ + done + check-am: all-am + check: check-am +-all-am: Makefile $(SCRIPTS) $(DATA) ++all-am: Makefile $(SCRIPTS) $(MANS) $(DATA) + installdirs: +- for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(engine_tabledir)" "$(DESTDIR)$(enginedir)" "$(DESTDIR)$(engine_tabledir)"; do \ ++ for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(engine_tabledir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(enginedir)" "$(DESTDIR)$(engine_tabledir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done + install: install-am +@@ -575,7 +642,7 @@ + info-am: + + install-data-am: install-engineDATA install-engine_tableDATA \ +- install-engine_tablePYTHON ++ install-engine_tablePYTHON install-man + + install-dvi: install-dvi-am + +@@ -591,7 +658,7 @@ + + install-info-am: + +-install-man: ++install-man: install-man1 + + install-pdf: install-pdf-am + +@@ -621,7 +688,9 @@ + + uninstall-am: uninstall-binSCRIPTS uninstall-engineDATA \ + uninstall-engine_tableDATA uninstall-engine_tablePYTHON \ +- uninstall-libexecSCRIPTS ++ uninstall-libexecSCRIPTS uninstall-man ++ ++uninstall-man: uninstall-man1 + + .MAKE: install-am install-strip + +@@ -632,14 +701,19 @@ + install-engine_tableDATA install-engine_tablePYTHON \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-libexecSCRIPTS \ +- install-man install-pdf install-pdf-am install-ps \ ++ install-man install-man1 install-pdf install-pdf-am install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-generic pdf pdf-am ps ps-am uninstall \ + uninstall-am uninstall-binSCRIPTS uninstall-engineDATA \ + uninstall-engine_tableDATA uninstall-engine_tablePYTHON \ +- uninstall-libexecSCRIPTS ++ uninstall-libexecSCRIPTS uninstall-man uninstall-man1 ++ + ++${man_MANS}: ${SGML} ++ $(AM_V_GEN) $(RM) $@; \ ++ $(DOC2MAN) ${SGML}; \ ++ $(RM) manpage.* + + table.xml: table.xml.in + ( \ +diff -Nru ibus-table-1.5.0.orig/engine/ibus-table-createdb.1 ibus-table-1.5.0/engine/ibus-table-createdb.1 +--- ibus-table-1.5.0.orig/engine/ibus-table-createdb.1 1970-01-01 01:00:00.000000000 +0100 ++++ ibus-table-1.5.0/engine/ibus-table-createdb.1 2014-01-14 09:26:33.652424633 +0100 +@@ -0,0 +1,48 @@ ++.\" auto-generated by docbook2man-spec from docbook-utils package ++.TH "IBUS-TABLE-CREATEDB" "1" "Apr 18, 2013" "" "" ++.SH NAME ++ibus-table-createdb \- create ibus-table database from table source ++.SH SYNOPSIS ++.sp ++\fBibus-table-createdb\fR [ \fB [ -n \fIname\fB ] [ --name \fIname\fB ] \fR ] [ \fB [ -s \fIsource\fB ] [ --source \fIsource\fB ] \fR ] [ \fB [ -e \fIextra\fB ] [ --extra \fIextra\fB ] \fR ] [ \fB [ -p \fIpinyin\fB ] [ --pinyin \fIpinyin\fB ] \fR ] [ \fB-o\fR ] [ \fB--no-create-index\fR ] [ \fB-i\fR ] [ \fB--create-index-only\fR ] [ \fB-d\fR ] [ \fB--debug\fR ] ++ ++.SH "DESCRIPTION" ++.PP ++\fBibus-table-createdb\fR creates a database for ++ibus-table from a source table. ++.SH "OPTIONS" ++.PP ++This program follows the usual GNU command line syntax, ++with long options starting with two dashes (`-'). A summary of ++options is included below. ++.TP ++\fB-n\fR ++\fIdatabase-file\fR specifies the file which will contain the binary database for the IME. The default is ''. ++.TP ++\fB-s\fR ++\fIsource-file\fR specifies the file which contains the source of the IME. The default is ''. ++.TP ++\fB-e\fR ++\fIextra-words-file\fR specifies the file for the extra words for the IME. The default is ''. ++.TP ++\fB-p\fR ++\fIpinyin-file\fR specifies the source file for the pinyin. The default is /usr/share/ibus-table/data/pinyin_table.txt.bz2. ++.TP ++\fB-o\fR ++Do not create an index for for a database (Only for distribution purposes, a normal user should not use this flag!) ++.TP ++\fB-i\fR ++Only create an index for an existing database. ++.TP ++\fB-d\fR ++Print extra debug messages. ++.SH "EXAMPLES" ++.TP ++\fBibus-table-createdb -n ipa-x-sampa.db -s ipa-x-sampa.txt\fR ++Create the binary database ``ipa-x-sampa.db'' from the source file ``ipa-x-sampa.txt''\&. ++.TP ++\fBibus-table-createdb -i -n ipa-x-sampa.db\fR ++Create an index for the database ``ipa-x-sampa.db''\&. ++.SH "AUTHOR" ++.PP ++This manual page was written by Mike FABIAN \&. diff --git a/SOURCES/0008-prebuilt-files-for-man-page-for-ibus-table-createdb.patch b/SOURCES/0008-prebuilt-files-for-man-page-for-ibus-table-createdb.patch new file mode 100644 index 0000000..e7c449e --- /dev/null +++ b/SOURCES/0008-prebuilt-files-for-man-page-for-ibus-table-createdb.patch @@ -0,0 +1,255 @@ +diff -Nru ibus-table-1.5.0.orig/engine/Makefile.in ibus-table-1.5.0/engine/Makefile.in +--- ibus-table-1.5.0.orig/engine/Makefile.in 2014-01-24 09:07:09.814525660 +0100 ++++ ibus-table-1.5.0/engine/Makefile.in 2014-01-24 09:07:34.954690472 +0100 +@@ -1,7 +1,7 @@ +-# Makefile.in generated by automake 1.12.2 from Makefile.am. ++# Makefile.in generated by automake 1.13.4 from Makefile.am. + # @configure_input@ + +-# Copyright (C) 1994-2012 Free Software Foundation, Inc. ++# Copyright (C) 1994-2013 Free Software Foundation, Inc. + + # This Makefile.in is free software; the Free Software Foundation + # gives unlimited permission to copy and/or distribute it, +@@ -37,23 +37,51 @@ + + + VPATH = @srcdir@ +-am__make_dryrun = \ +- { \ +- am__dry=no; \ ++am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' ++am__make_running_with_option = \ ++ case $${target_option-} in \ ++ ?) ;; \ ++ *) echo "am__make_running_with_option: internal error: invalid" \ ++ "target option '$${target_option-}' specified" >&2; \ ++ exit 1;; \ ++ esac; \ ++ has_opt=no; \ ++ sane_makeflags=$$MAKEFLAGS; \ ++ if $(am__is_gnu_make); then \ ++ sane_makeflags=$$MFLAGS; \ ++ else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ +- echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ +- | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ +- *) \ +- for am__flg in $$MAKEFLAGS; do \ +- case $$am__flg in \ +- *=*|--*) ;; \ +- *n*) am__dry=yes; break;; \ +- esac; \ +- done;; \ ++ bs=\\; \ ++ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ ++ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ +- test $$am__dry = yes; \ +- } ++ fi; \ ++ skip_next=no; \ ++ strip_trailopt () \ ++ { \ ++ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ ++ }; \ ++ for flg in $$sane_makeflags; do \ ++ test $$skip_next = yes && { skip_next=no; continue; }; \ ++ case $$flg in \ ++ *=*|--*) continue;; \ ++ -*I) strip_trailopt 'I'; skip_next=yes;; \ ++ -*I?*) strip_trailopt 'I';; \ ++ -*O) strip_trailopt 'O'; skip_next=yes;; \ ++ -*O?*) strip_trailopt 'O';; \ ++ -*l) strip_trailopt 'l'; skip_next=yes;; \ ++ -*l?*) strip_trailopt 'l';; \ ++ -[dEDm]) skip_next=yes;; \ ++ -[JT]) skip_next=yes;; \ ++ esac; \ ++ case $$flg in \ ++ *$$target_option*) has_opt=yes; break;; \ ++ esac; \ ++ done; \ ++ test $$has_opt = yes ++am__make_dryrun = (target_option=n; $(am__make_running_with_option)) ++am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) + pkgdatadir = $(datadir)/@PACKAGE@ + pkgincludedir = $(includedir)/@PACKAGE@ + pkglibdir = $(libdir)/@PACKAGE@ +@@ -73,10 +101,10 @@ + build_triplet = @build@ + host_triplet = @host@ + subdir = engine +-DIST_COMMON = $(engine_table_PYTHON) $(srcdir)/Makefile.am \ +- $(srcdir)/Makefile.in $(srcdir)/ibus-engine-table.in \ ++DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ ++ $(srcdir)/ibus-engine-table.in \ + $(srcdir)/ibus-table-createdb.in $(srcdir)/table.xml.in.in \ +- $(top_srcdir)/py-compile ++ $(engine_table_PYTHON) $(top_srcdir)/py-compile + ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 + am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ +@@ -120,6 +148,18 @@ + "$(DESTDIR)$(engine_tabledir)" "$(DESTDIR)$(man1dir)" \ + "$(DESTDIR)$(enginedir)" "$(DESTDIR)$(engine_tabledir)" + SCRIPTS = $(bin_SCRIPTS) $(libexec_SCRIPTS) ++AM_V_P = $(am__v_P_@AM_V@) ++am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) ++am__v_P_0 = false ++am__v_P_1 = : ++AM_V_GEN = $(am__v_GEN_@AM_V@) ++am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) ++am__v_GEN_0 = @echo " GEN " $@; ++am__v_GEN_1 = ++AM_V_at = $(am__v_at_@AM_V@) ++am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) ++am__v_at_0 = @ ++am__v_at_1 = + SOURCES = + DIST_SOURCES = + am__can_run_installinfo = \ +@@ -128,14 +168,18 @@ + *) (install-info --version) >/dev/null 2>&1;; \ + esac + am__py_compile = PYTHON=$(PYTHON) $(SHELL) $(py_compile) ++am__pep3147_tweak = \ ++ sed -e 's|\.py$$||' -e 's|[^/]*$$|__pycache__/&.*.py|' + py_compile = $(top_srcdir)/py-compile + man1dir = $(mandir)/man1 + NROFF = nroff + MANS = $(man_MANS) + DATA = $(engine_DATA) $(engine_table_DATA) ++am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) + DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) + ACLOCAL = @ACLOCAL@ + AMTAR = @AMTAR@ ++AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ + AUTOCONF = @AUTOCONF@ + AUTOHEADER = @AUTOHEADER@ + AUTOMAKE = @AUTOMAKE@ +@@ -435,13 +479,23 @@ + uninstall-engine_tablePYTHON: + @$(NORMAL_UNINSTALL) + @list='$(engine_table_PYTHON)'; test -n "$(engine_tabledir)" || list=; \ +- files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ +- test -n "$$files" || exit 0; \ ++ py_files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ ++ test -n "$$py_files" || exit 0; \ + dir='$(DESTDIR)$(engine_tabledir)'; \ +- filesc=`echo "$$files" | sed 's|$$|c|'`; \ +- fileso=`echo "$$files" | sed 's|$$|o|'`; \ ++ pyc_files=`echo "$$py_files" | sed 's|$$|c|'`; \ ++ pyo_files=`echo "$$py_files" | sed 's|$$|o|'`; \ ++ py_files_pep3147=`echo "$$py_files" | $(am__pep3147_tweak)`; \ ++ echo "$$py_files_pep3147";\ ++ pyc_files_pep3147=`echo "$$py_files_pep3147" | sed 's|$$|c|'`; \ ++ pyo_files_pep3147=`echo "$$py_files_pep3147" | sed 's|$$|o|'`; \ + st=0; \ +- for files in "$$files" "$$filesc" "$$fileso"; do \ ++ for files in \ ++ "$$py_files" \ ++ "$$pyc_files" \ ++ "$$pyo_files" \ ++ "$$pyc_files_pep3147" \ ++ "$$pyo_files_pep3147" \ ++ ; do \ + $(am__uninstall_files_from_dir) || st=$$?; \ + done; \ + exit $$st +@@ -530,29 +584,14 @@ + @list='$(engine_table_DATA)'; test -n "$(engine_tabledir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(engine_tabledir)'; $(am__uninstall_files_from_dir) +-tags: TAGS +-TAGS: ++tags TAGS: + +-ctags: CTAGS +-CTAGS: ++ctags CTAGS: + + cscope cscopelist: + + + distdir: $(DISTFILES) +- @list='$(MANS)'; if test -n "$$list"; then \ +- list=`for p in $$list; do \ +- if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ +- if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ +- if test -n "$$list" && \ +- grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ +- echo "error: found man pages containing the 'missing help2man' replacement text:" >&2; \ +- grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ +- echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ +- echo " typically 'make maintainer-clean' will remove them" >&2; \ +- exit 1; \ +- else :; fi; \ +- else :; fi + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ +@@ -694,18 +733,19 @@ + + .MAKE: install-am install-strip + +-.PHONY: all all-am check check-am clean clean-generic distclean \ +- distclean-generic distdir dvi dvi-am html html-am info info-am \ +- install install-am install-binSCRIPTS install-data \ +- install-data-am install-dvi install-dvi-am install-engineDATA \ +- install-engine_tableDATA install-engine_tablePYTHON \ +- install-exec install-exec-am install-html install-html-am \ +- install-info install-info-am install-libexecSCRIPTS \ +- install-man install-man1 install-pdf install-pdf-am install-ps \ +- install-ps-am install-strip installcheck installcheck-am \ +- installdirs maintainer-clean maintainer-clean-generic \ +- mostlyclean mostlyclean-generic pdf pdf-am ps ps-am uninstall \ +- uninstall-am uninstall-binSCRIPTS uninstall-engineDATA \ ++.PHONY: all all-am check check-am clean clean-generic cscopelist-am \ ++ ctags-am distclean distclean-generic distdir dvi dvi-am html \ ++ html-am info info-am install install-am install-binSCRIPTS \ ++ install-data install-data-am install-dvi install-dvi-am \ ++ install-engineDATA install-engine_tableDATA \ ++ install-engine_tablePYTHON install-exec install-exec-am \ ++ install-html install-html-am install-info install-info-am \ ++ install-libexecSCRIPTS install-man install-man1 install-pdf \ ++ install-pdf-am install-ps install-ps-am install-strip \ ++ installcheck installcheck-am installdirs maintainer-clean \ ++ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ ++ pdf-am ps ps-am tags-am uninstall uninstall-am \ ++ uninstall-binSCRIPTS uninstall-engineDATA \ + uninstall-engine_tableDATA uninstall-engine_tablePYTHON \ + uninstall-libexecSCRIPTS uninstall-man uninstall-man1 + +diff -Nru ibus-table-1.5.0.orig/engine/ibus-table-createdb.1 ibus-table-1.5.0/engine/ibus-table-createdb.1 +--- ibus-table-1.5.0.orig/engine/ibus-table-createdb.1 2014-01-24 09:07:09.814525660 +0100 ++++ ibus-table-1.5.0/engine/ibus-table-createdb.1 2014-01-24 09:07:30.058658483 +0100 +@@ -17,22 +17,22 @@ + options is included below. + .TP + \fB-n\fR +-\fIdatabase-file\fR specifies the file which will contain the binary database for the IME. The default is ''. ++\fIdatabase-file\fR specifies the file name for the binary database for the IME. The default is ''. If the file name of the database is not specified, the file name of the source file before the first '.' will be appended with '.db' and that will be used as the file name of the database. + .TP + \fB-s\fR + \fIsource-file\fR specifies the file which contains the source of the IME. The default is ''. + .TP + \fB-e\fR +-\fIextra-words-file\fR specifies the file for the extra words for the IME. The default is ''. ++\fIextra-words-file\fR specifies the file name for the extra words for the IME. The default is ''. + .TP + \fB-p\fR +-\fIpinyin-file\fR specifies the source file for the pinyin. The default is /usr/share/ibus-table/data/pinyin_table.txt.bz2. ++\fIpinyin-file\fR specifies the source file for the pinyin. The default is '/usr/share/ibus-table/data/pinyin_table.txt.bz2'. + .TP + \fB-o\fR +-Do not create an index for for a database (Only for distribution purposes, a normal user should not use this flag!) ++Do not create an index for a database (Only for distribution purposes, a normal user should not use this flag!) + .TP + \fB-i\fR +-Only create an index for an existing database. ++Only create an index for an existing database. Specifying the file name of the binary database with the -n or --name option is required when this option is used. + .TP + \fB-d\fR + Print extra debug messages. diff --git a/SPECS/ibus-table.spec b/SPECS/ibus-table.spec index d584cfa..41d84fd 100644 --- a/SPECS/ibus-table.spec +++ b/SPECS/ibus-table.spec @@ -1,6 +1,6 @@ Name: ibus-table Version: 1.5.0 -Release: 2%{?dist} +Release: 5%{?dist} Summary: The Table engine for IBus platform License: LGPLv2+ Group: System Environment/Libraries @@ -17,6 +17,11 @@ Patch8: 0002-Add-auto_select-functionality-to-select-the-first-ph.patch Patch9: 0003-Update-cmode-pproperty-in-chinese-mode-only.patch Patch10: 0004-Fall-back-to-auto_select-False-if-neither-dconf-nor-.patch Patch11: 0005-Preedit-needs-to-be-updated-on-page-up-and-page-down.patch +Patch12: 0006-Add-man-page-for-ibus-table-createdb.patch +Patch13: 0007-prebuilt-files-for-man-page-for-ibus-table-createdb.patch +Patch14: 0001-Fix-typo-in-ibus-table-createdb-man-page.patch +Patch15: 0002-When-tabcreatedb.py-is-called-without-any-options-pr.patch +Patch16: 0008-prebuilt-files-for-man-page-for-ibus-table-createdb.patch Requires: ibus > 1.3.0 BuildRequires: ibus-devel > 1.3.0 @@ -50,6 +55,11 @@ Development files for %{name}. %patch9 -p1 -b .update-cmode-in-chinese-mode-only %patch10 -p1 -b .fall-back-to-auto-select-false-by-default %patch11 -p1 -b .preedit-needs-to-be-updated-when-paging +%patch12 -p1 -b .Add-man-page-for-ibus-table-createdb +%patch13 -p1 -b .prebuilt-files-for-man-page-for-ibus-table-createdb +%patch14 -p1 -b .Fix-typo-in-ibus-table-createdb-man-page +%patch15 -p1 -b .When-tabcreatedb.py-is-called-without-any-options-pr +%patch16 -p1 -b .prebuilt-files-for-man-page-for-ibus-table-createdb %build %configure --disable-static --disable-additional @@ -117,12 +127,23 @@ Development files for %{name}. %{_datadir}/%{name}/tables/template.txt %{_bindir}/%{name}-createdb %{_libexecdir}/ibus-engine-table +%{_mandir}/man1/* %files devel %defattr(-, root, root, -) %{_datadir}/pkgconfig/%{name}.pc %changelog +* Fri Jan 24 2014 Mike FABIAN - 1.5.0-5 +- Resolves: rhbz#1049760 - [ALL LANG] Traceback produced when run ibus-table-createdb from terminal. +- When tabcreatedb.py is called without any options, print a usage message. Do not just show a cryptic backtrace. + +* Tue Jan 14 2014 Mike FABIAN - 1.5.0-4 +- Resolves: rhbz#948454 - Man page scan results for ibus-table + +* Fri Dec 27 2013 Daniel Mach - 1.5.0-3 +- Mass rebuild 2013-12-27 + * Thu Feb 14 2013 Mike FABIAN - 1.5.0-2 - Resolves: #911487 - Non-Chinese tables from the ibus-table-other package do not work - Add auto_select functionality to select the first phrase when typing.