summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 17e58a45500fe807fb2c6cf7bbc3398aea884eab (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
56
57
# Maintainer: Mario Rodas <marsam@users.noreply.github.com>

pkgname=libmaxminddb-git
_gitname=libmaxminddb
pkgver=r959.00316fe
pkgrel=1
pkgdesc="C library for the MaxMind DB file format"
arch=('i686' 'x86_64')
url='https://maxmind.github.io/libmaxminddb/'
license=('Apache')
depends=('glibc')
makedepends=('git')
conflicts=()
options=('!libtool')
provides=('libmaxminddb')
source=("$_gitname::git+https://github.com/maxmind/libmaxminddb.git"
        'libtap::git+https://github.com/zorgnax/libtap.git'
        'MaxMind-DB::git+https://github.com/maxmind/MaxMind-DB.git')

sha256sums=('SKIP'
            'SKIP'
            'SKIP')

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

prepare() {
  cd "$srcdir/$_gitname"
  git submodule init
  git config submodule.maxmind-db.url "$srcdir/MaxMind-DB"
  git config submodule.t/libtap.url "$srcdir/libtap"
  git config submodule.t/maxmind-db.url "$srcdir/MaxMind-DB"
  git submodule update
}

build() {
  cd "$srcdir/$_gitname"
  rm -f ltmain.sh
  autoreconf -fiv
  ./configure --prefix=/usr
}

check() {
  cd "$srcdir/$_gitname"
  make check
}

package() {
  cd "$srcdir/$_gitname"
  make PREFIX=/usr DESTDIR="$pkgdir" install
}

# Local Variables:
# compile-command: "makepkg -sm && mksrcinfo"
# End: