summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: afa769ea31a7f5cd9899adc1ecc7ebf3840958ea (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$
# Maintainer: Felix Yan <felixonmars@gmail.com>

_pkgname=fcitx-chewing
pkgname=${_pkgname}-git
pkgver=0.2.2.r26.g73e5a87
pkgrel=1
pkgdesc='Fcitx Wrapper for chewing'
arch=(i686 x86_64)
url='https://github.com/fcitx/fcitx-chewing'
license=(GPL)
depends=(libchewing fcitx)
makedepends=(cmake git)
source=("git+https://github.com/fcitx/fcitx-chewing.git")
md5sums=('SKIP')
conflicts=("${_pkgname}")
provides=("${_pkgname}")

pkgver() {
  cd $_pkgname
  ( set -o pipefail
    git describe --long --tag 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/^v//' ||
    printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
  )
}

build() {
  cd ${_pkgname}

  cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release .
  make
}

package() {
  cd ${_pkgname}
  make DESTDIR="$pkgdir" install
}