summaryrefslogtreecommitdiffstats
path: root/abs/extra/libstemmer/PKGBUILD
blob: ccee9fd28c0c78a5af7b58750c25137ed251f84d (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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>

pkgbase=snowball
pkgname=(snowball libstemmer)
pkgver=0+337
pkgrel=3
pkgdesc="String processing language for creating stemming algorithms"
arch=(x86_64)
url="http://snowballstem.org/"
license=(BSD)
depends=(glibc)
makedepends=(git)
_commit=fc2adaa96b0561506e6c1a80d73de7f4e0fa9663
source=("git+https://github.com/snowballstem/snowball#commit=$_commit"
        dynamiclib.patch)
sha256sums=('SKIP'
            '99511a11cdeeb1ef1eaa9d7b777f6934693d4696ba9523de40b886f7d898058e')

prepare() {
  cd $pkgbase
  patch -Np1 -i ../dynamiclib.patch
}

pkgver() {
  cd $pkgbase
  echo "0+$(git rev-list --count HEAD)"
}

build() {
  cd $pkgbase
  make
}

check() {
  cd $pkgbase
  # Disabled - needs external test data
  #make check
}

package_snowball() {
  cd $pkgbase
  install -d "$pkgdir/usr/bin"
  install -t "$pkgdir/usr/bin" snowball stemwords
  install -Dm644 COPYING "$pkgdir/usr/share/licenses/snowball/LICENSE"
}

package_libstemmer() {
  pkgdesc="Stemming library supporting several languages"
  cd $pkgbase
  install -Dm644 {.,"$pkgdir"/usr}/include/libstemmer.h
  install -D {.,"$pkgdir"/usr/lib}/libstemmer.so.0.0.0
  ln -s libstemmer.so.0.0.0 "$pkgdir/usr/lib/libstemmer.so.0"
  ln -s libstemmer.so.0 "$pkgdir/usr/lib/libstemmer.so"
  install -Dm644 COPYING "$pkgdir/usr/share/licenses/libstemmer/LICENSE"
}