1 # Maintainer: Jekyll Wu<adaptee [at] gmail [dot] com>
2 # Contributor: riverscn<riverscn at gmail.com>
3 # Contributor: rainy<rainylau at gmail.com>
4 # Contributor: Lee.MaRS<leemars at gmail.com>
6 pkgname=ibus-pinyin-git
9 pkgdesc="The PinYin Engine for IBus Input Framework"
10 arch=('i686' 'x86_64')
12 url="http://ibus.googlecode.com"
13 depends=('ibus>=1.3' 'libsigc++2.0' 'python2')
14 makedepends=('git' 'gnome-common' )
15 provides=('ibus-pinyin=1.3')
16 conflicts=('ibus-pinyin')
17 install=ibus-pinyin.install
18 source=(http://ibus.googlecode.com/files/pinyin-database-1.2.99.tar.bz2)
19 noextract=(pinyin-database-1.2.99.tar.bz2)
20 md5sums=('d0951b8daa7f56a2cbd3b6b4e42532e0')
22 _gitname="ibus-pinyin"
23 _gitroot="git://github.com/ibus/ibus-pinyin.git"
28 msg "Connecting to ${_gitname} GIT server..."
29 if [ -d ${_gitname} ]; then
30 cd ${_gitname} && git pull origin master
31 msg "The local files are updated."
36 msg "GIT checkout done or server timeout. Preparing sources..."
37 rm -rf "${srcdir}/${_gitname}-build"
38 cp -r "${srcdir}/${_gitname}" "${srcdir}/${_gitname}-build"
39 ln -s "${srcdir}/pinyin-database-1.2.99.tar.bz2" "${srcdir}/${_gitname}-build/data/db/open-phrase"
41 msg "Starting make..."
42 cd "${srcdir}/${_gitname}-build"
45 for file in $(find . -name '*.py' -print); do
46 sed -i 's_^#!.*/usr/bin/python_#!/usr/bin/python2_' $file
47 sed -i 's_^#!.*/usr/bin/env.*python_#!/usr/bin/env python2_' $file
50 for file in setup/ibus-setup-pinyin.in; do
51 sed -i 's_exec python_exec python2_' $file
54 ./autogen.sh --break-configure || :
56 PYTHON=/usr/bin/python2 \
58 --libexecdir=/usr/lib/ibus \
60 --enable-db-open-phrase || return 1
66 cd "${srcdir}/${_gitname}-build"
67 make NO_INDEX=true DESTDIR=${pkgdir} install || return 1