PageRenderTime 33ms CodeModel.GetById 16ms RepoModel.GetById 0ms app.codeStats 0ms

/python/engine/PinYin/Makefile.am

http://scim-python.googlecode.com/
Makefile | 100 lines | 61 code | 9 blank | 30 comment | 2 complexity | e3ee2b7c8329aca41c1fbd561911f867 MD5 | raw file
  1. # vim:set noet ts=4:
  2. #
  3. # scim-python
  4. #
  5. # Copyright (c) 2007-2008 Huang Peng <shawn.p.huang@gmail.com>
  6. #
  7. #
  8. # This library is free software; you can redistribute it and/or
  9. # modify it under the terms of the GNU Lesser General Public
  10. # License as published by the Free Software Foundation; either
  11. # version 2 of the License, or (at your option) any later version.
  12. #
  13. # This library is distributed in the hope that it will be useful,
  14. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. # GNU Lesser General Public License for more details.
  17. #
  18. # You should have received a copy of the GNU Lesser General Public
  19. # License along with this program; if not, write to the
  20. # Free Software Foundation, Inc., 59 Temple Place, Suite 330,
  21. # Boston, MA 02111-1307 USA
  22. #
  23. # $Id: $
  24. #
  25. if ENABLE_PINYIN
  26. pinyin_PYTHON = \
  27. PinYin.py \
  28. PYUtil.py \
  29. PYParser.py \
  30. PYSQLiteDB.py \
  31. PYCreatePinYinDB.py \
  32. SpecialTable.py \
  33. SpecialPhrase.py \
  34. ZhengJu.py \
  35. ShuangPin.py \
  36. JianPin.py \
  37. QuanPin.py \
  38. PYDict.py\
  39. ZhengJuDB.py \
  40. __init__.py \
  41. $(NULL)
  42. pinyindir = $(pkgdatadir)/engine/PinYin
  43. # PYDATA_FILES = \
  44. # utf8py.org \
  45. # utf8pyPhrase.org \
  46. # CharFreq-Modern_utf8.txt \
  47. # SogouLabDic-utf8.dic \
  48. # $(NULL)
  49. PYDATA_FILES = \
  50. $(NULL)
  51. pydb_DATA = py.db
  52. pydbdir = $(pkgdatadir)/engine/PinYin
  53. DBVER = 0.1.10.5
  54. DBTAR = pinyin-database-${DBVER}.tar.bz2
  55. ${DBTAR}:
  56. wget http://scim-python.googlecode.com/files/${DBTAR}
  57. py.db: ${DBTAR}
  58. tar jxvfm ${DBTAR}
  59. pyspecial_DATA = special_phrase special_table
  60. pyspecialdir = $(pkgdatadir)/engine/PinYin
  61. if ENABLE_DEBIAN_DPKG
  62. EXTRA_DIST = \
  63. $(PYDATA_FILES) \
  64. special_table \
  65. special_phrase \
  66. ${DBTAR} \
  67. $(NULL)
  68. DISTCLEANFILES = \
  69. py.db \
  70. *.pyc \
  71. $(NULL)
  72. else
  73. EXTRA_DIST = \
  74. $(PYDATA_FILES) \
  75. special_table \
  76. special_phrase \
  77. $(NULL)
  78. DISTCLEANFILES = \
  79. py.db \
  80. *.pyc \
  81. ${DBTAR} \
  82. $(NULL)
  83. endif
  84. install-data-hook:
  85. @(if test "${NO_INDEX}" = ""; then \
  86. cd $(DESTDIR)$(pinyindir); \
  87. echo "Creating INDEX"; \
  88. $(PYTHON) -c "import PYSQLiteDB; db = PYSQLiteDB.PYSQLiteDB (filename='py.db'); db.create_indexes ();" ;\
  89. fi)
  90. endif
  91. uninstall-hook: