summaryrefslogtreecommitdiff
path: root/community/opencc/PKGBUILD
blob: 23122e8183e1cf159947f7abe96cbc5850d443b6 (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 88293 2013-04-16 02:22:14Z fyan $
# Maintainer: Felix Yan <felixonmars@gmail.com>

pkgbase=opencc
pkgname=(opencc opencc-doc)
pkgver=0.4.2
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 "$srcdir/${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 "$srcdir/${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 "$srcdir/${pkgbase}-${pkgver}/doc"
  make DESTDIR="${pkgdir}" install

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

md5sums=('d5c001098e824dae0e3debb1b864304b')