PageRenderTime 28ms CodeModel.GetById 24ms app.highlight 2ms RepoModel.GetById 1ms 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#
 25if ENABLE_PINYIN
 26pinyin_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
 43pinyindir = $(pkgdatadir)/engine/PinYin
 44
 45# PYDATA_FILES =	\
 46# 	utf8py.org	\
 47# 	utf8pyPhrase.org	\
 48# 	CharFreq-Modern_utf8.txt	\
 49# 	SogouLabDic-utf8.dic	\
 50# 	$(NULL)
 51
 52PYDATA_FILES = 	\
 53	$(NULL)
 54
 55pydb_DATA = py.db
 56pydbdir = $(pkgdatadir)/engine/PinYin
 57DBVER = 0.1.10.5
 58DBTAR = pinyin-database-${DBVER}.tar.bz2
 59
 60${DBTAR}:
 61	wget http://scim-python.googlecode.com/files/${DBTAR}
 62
 63py.db: ${DBTAR}
 64	tar jxvfm ${DBTAR}
 65
 66pyspecial_DATA = special_phrase special_table
 67pyspecialdir = $(pkgdatadir)/engine/PinYin
 68
 69if ENABLE_DEBIAN_DPKG
 70EXTRA_DIST = 	\
 71	$(PYDATA_FILES) \
 72	special_table	\
 73	special_phrase	\
 74	${DBTAR} \
 75	$(NULL)
 76DISTCLEANFILES = \
 77	py.db	\
 78	*.pyc	\
 79	$(NULL)
 80else
 81EXTRA_DIST = 	\
 82	$(PYDATA_FILES) \
 83	special_table	\
 84	special_phrase	\
 85	$(NULL)
 86DISTCLEANFILES = \
 87	py.db	\
 88	*.pyc	\
 89	${DBTAR} \
 90	$(NULL)
 91endif
 92install-data-hook:
 93	@(if test "${NO_INDEX}" = ""; then \
 94		cd $(DESTDIR)$(pinyindir); \
 95		echo "Creating INDEX"; \
 96		$(PYTHON) -c "import PYSQLiteDB; db = PYSQLiteDB.PYSQLiteDB (filename='py.db'); db.create_indexes ();" ;\
 97	fi)
 98endif
 99uninstall-hook:
100