summaryrefslogtreecommitdiff
path: root/community/libpinyin/PKGBUILD
blob: 12b2c07a04086e62bfaf0763bc9165014ce4fe3c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# $Id: PKGBUILD 86857 2013-03-23 08:32:34Z fyan $
# Maintainer: Felix Yan <felixonmars@gmail.com>
# Contributor: Yangtse <yangtsesu@gmail.com> 
# Contributor: WU Jun <quark at lihdd dot net>

pkgname=libpinyin
pkgver=0.8.93
pkgrel=2
pkgdesc="Library to deal with pinyin"
arch=('i686' 'x86_64')
url="https://github.com/libpinyin/libpinyin"
license=('GPL')
depends=('db' 'glib2')
options=(!libtool)
source=("https://github.com/libpinyin/libpinyin/archive/${pkgver}.tar.gz"
        "http://downloads.sourceforge.net/libpinyin/model5.text.tar.gz"
	"https://github.com/epico/libpinyin/commit/00fec992f5c760f546a1db933fb08325fc9cccbf.patch")
noextract=("model5.text.tar.gz")

build() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  patch -p1 -i ../00fec992f5c760f546a1db933fb08325fc9cccbf.patch

  cp "${srcdir}/model5.text.tar.gz" "${srcdir}/${pkgname}-${pkgver}/data/"
  sed -i '/wget.*model5\.text\.tar\.gz/ d' ${srcdir}/${pkgname}-${pkgver}/data/Makefile.am

  aclocal && libtoolize --force && autoheader && automake -a && autoconf
  ./configure --prefix=/usr && make
}

package() {
  cd "${srcdir}/libpinyin-$pkgver"
  make DESTDIR="${pkgdir}" install
}
md5sums=('1d9a768496c8a4368d3488639cadd554'
         'a83812e2d3be5695be54f95d9d7a3aa0'
         '2163a85183c36f69d65d19b2bc9e2c9b')