desktop/sunpinyin-git/PKGBUILD
2011-09-24 18:41:58 +00:00

59 lines
1.6 KiB
Bash

#
# Apps Packages for Chakra, part of chakra-project.org
#
# Maintainer: Neo Kolokotronis <tetris4@gmail.com>
# Contributor: csslayer <wengxt AT gmail com>
# Contributor: Jekyll Wu<adaptee [at] gmail [dot com>
# Contributor: Liu Chang <goduck777@gmail.com>
# include global config
source ../_buildscripts/${current_repo}-${_arch}-cfg.conf
pkgname=sunpinyin-git
pkgver=20110924
pkgrel=1
pkgdesc='A statistical language model based pinyin IME by Sun.'
url='http://code.google.com/p/sunpinyin/'
arch=('i686' 'x86_64')
license=('LGPL')
depends=('sqlite3')
makedepends=('git' 'scons' 'intltool')
provides=('sunpinyin')
conflicts=('sunpinyin')
source=('http://open-gram.googlecode.com/files/lm_sc.t3g.arpa.tar.bz2'
'http://open-gram.googlecode.com/files/dict.utf8.tar.bz2')
noextract=('lm_sc.t3g.arpa.tar.bz2'
'dict.utf8.tar.bz2')
_gitroot="git://github.com/sunpinyin/sunpinyin.git"
_gitname="sunpinyin"
build() {
cd $srcdir
msg "Connecting to the GIT server...."
if [[ -d $srcdir/$_gitname ]] ; then
cd $_gitname
git pull origin
msg "The local files are updated."
else
git clone $_gitroot
fi
msg "GIT checkout done"
msg "Starting make..."
rm -rf $srcdir/$_gitname-build
git clone $srcdir/$_gitname $srcdir/$_gitname-build
cd $srcdir/$_gitname-build
ln -sf ${srcdir}/lm_sc.t3g.arpa.tar.bz2 raw/lm_sc.t3g.arpa.tar.bz2
ln -sf ${srcdir}/dict.utf8.tar.bz2 raw/dict.utf8.tar.bz2
scons --prefix=/usr
scons install --prefix=/usr --install-sandbox=$pkgdir || return 1
}
md5sums=('7a66d55a515959bbf69cb5480281afa0'
'5fe50a8a4d889e17c17d64d4241911d0')