summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 626475c84b77cfb515a8525a333bae2b6ebf71cb (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
# Maintainer: HLFH <gaspard@dhautefeuille.eu>

pkgname=dovecot-fts-flatcurve-git
_pkgname=dovecot-fts-flatcurve
pkgver=r433.8b530f5
pkgrel=4
pkgdesc="Dovecot FTS Flatcurve plugin (Xapian)"
arch=('x86_64')
url="https://github.com/slusarz/dovecot-fts-flatcurve"
license=('LGPL-2.1-only')
depends=("dovecot-with-stemmer>=2.3.0" "dovecot-with-stemmer<2.4.0" 'icu' 'xapian-core')
install="$_pkgname.install"
source=("git+https://github.com/slusarz/$_pkgname.git"
        "$_pkgname.install")
b2sums=('SKIP'
        '8438841f8dfeb64da7f88452bb9d689dc72cb10233e4450e9dd538197956bb90054370078aeb72cd14102c9a467909a35b84ac568f1df3925cd07deb5edc8a5f')

pkgver() {
  cd "$_pkgname"
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
  CFLAGS=${CFLAGS//FORTIFY_SOURCE=?/FORTIFY_SOURCE=2}
  CXXFLAGS=${CXXFLAGS//FORTIFY_SOURCE=?/FORTIFY_SOURCE=2}
  export CFLAGS CXXFLAGS
  cd "$_pkgname"
  ./autogen.sh
  ./configure \
    --prefix=/usr \
    --with-dovecot=/usr/lib/dovecot

  make
}

package() {
  cd "$_pkgname"

  make DESTDIR="$pkgdir" install

  # documentation
  install -vDm644 -t "$pkgdir/usr/share/doc/$_pkgname" README.md
}