1 # Maintainer: Yangtse <yangtsesu@gmail.com>
2 #Contributor: WU Jun <quark at lihdd dot net>
7 pkgdesc="Library to deal with pinyin."
9 url="https://github.com/libpinyin/libpinyin"
12 makedepends=('automake' 'libtool' 'autoconf')
13 provides=('libpinyin')
14 conflicts=('libpinyin')
15 source=(https://github.com/downloads/libpinyin/libpinyin/model.text.tar.gz)
16 noextract=("model.text.tar.gz")
17 md5sums=('373ed75263689cd6543008a6b4b61c62')
21 _gitroot="https://github.com/libpinyin/libpinyin.git"
26 msg "Connecting to ${_gitname} GIT server..."
27 if [ -d ${_gitname} ]; then
28 cd ${_gitname} && git pull origin master
29 msg "The local files are updated."
34 msg "GIT checkout done or server timeout. Preparing sources..."
35 rm -rf "${srcdir}/${_gitname}-build"
36 cp -r "${srcdir}/${_gitname}" "${srcdir}/${_gitname}-build"
37 cp "${srcdir}/model.text.tar.gz" "${srcdir}/${_gitname}-build/data/"
38 sed -i '/wget.*model\.text\.tar\.gz/ d' ${srcdir}/${_gitname}-build/data/Makefile.am
39 cd ${srcdir}/${_gitname}-build
41 aclocal && libtoolize --force && autoheader && automake -a && autoconf
42 ./configure --prefix=/usr && make
46 cd ${srcdir}/${_gitname}-build
47 make DESTDIR=${pkgdir} install