summaryrefslogtreecommitdiff
path: root/community/opencc/PKGBUILD
blob: 3a88ab6b492d15cfe9534371f77921fe099cc13e (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
38
39
40
41
# $Id: PKGBUILD 99152 2013-10-25 05:05:17Z fyan $
# Maintainer: Felix Yan <felixonmars@gmail.com>

pkgbase=opencc
pkgname=(opencc opencc-doc)
pkgver=0.4.3
pkgrel=2
url="http://code.google.com/p/opencc/"
arch=('i686' 'x86_64')
license=('Apache')
makedepends=('cmake' 'doxygen')
source=("http://opencc.googlecode.com/files/${pkgbase}-${pkgver}.tar.gz")

build() {
  cd ${pkgbase}-${pkgver}
  cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release -DBUILD_DOCUMENTATION:BOOL=ON
  make
}

package_opencc() {
  pkgdesc="Library for Open Chinese Convert"
  depends=('glibc')

  cd ${pkgbase}-${pkgver}
  make DESTDIR="${pkgdir}" install
  
  # Remove docs - install in splitted package
  rm -r "$pkgdir/usr/share/opencc/doc"
}

package_opencc-doc() {
  pkgdesc="Documentation for Library for Open Chinese Convert"

  cd ${pkgbase}-${pkgver}/doc
  make DESTDIR="${pkgdir}" install

  # Remove manpages - already installed in main package
  rm -r "$pkgdir/usr/share/man"
}

sha512sums=('ac31c3c018467cf047e077d399903560feb0f8c214accd1ef45d0b1477d011af8e9bf2dbde4497c133daef61b6508460e9b2b04c0b5f336c2d67fc840a1d07e6')