summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 690d608a5b9defe32927b81341422e9f69f42f6b (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
# Maintainer: lilydjwg <lilydjwg@gmail.com>

_pkgname=cld2
pkgname=${_pkgname}-git
pkgver=196
pkgrel=1
pkgdesc='Compact Language Detector 2'
arch=('x86_64')
url='https://github.com/CLD2Owners/cld2'
license=('Apache')
provides=('cld2' 'cld2-hg' 'cld2-svn')
replaces=('cld2-hg' 'cld2-svn')
conflicts=('cld2-hg' 'cld2' 'cld2-svn')
makedepends=('git')
source=('git+https://github.com/CLD2Owners/cld2.git')
md5sums=('SKIP')

pkgver() {
  cd "$srcdir/$_gitname"
  git log -1 --pretty='%cd' --date=short | tr -d '-'
}

build() {
  cd "$srcdir/$_pkgname"
  cd internal
  sh ./compile_libs.sh
}

package() {
  cd "$srcdir/$_pkgname"
  install -Dm755 internal/libcld2.so "${pkgdir}/usr/lib/libcld2.so"
  install -Dm755 internal/libcld2_full.so "${pkgdir}/usr/lib/libcld2_full.so"

  for header in internal/*.h public/*.h; do
    install -Dm644 "$header" "${pkgdir}/usr/include/cld2/$header"
  done

  install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}