summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 3bb5a33cc57f98b237ba468c0772ee8ed8c6f760 (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
# Contributor: Yosef Or Boczko <yoseforb@gmail.com>

pkgname=geoip-git
pkgver=1.6.12.r8.g44e5ffc
pkgrel=1
pkgdesc="Non-DNS IP-to-country resolver C library & utils"
epoch=1
arch=('i686' 'x86_64')
url="http://www.maxmind.com/app/c"
license=('GPL')
makedepends=('git')
depends=('zlib' 'geoip-database')
source=("$pkgname::git://github.com/maxmind/geoip-api-c.git")
sha256sums=('SKIP')
conflicts=('geoip')
provides=('geoip')

pkgver() {
  cd $pkgname
  git describe --long --tags | sed -r 's/^v//;s/([^-]*-g)/r\1/;s/-/./g'
}

build() {
  cd $pkgname
  autoreconf -fiv
  ./configure \
    --prefix=/usr \
    --mandir=/usr/share/man \
    --sysconfdir=/etc/geoip \
    --disable-data-files
  make
}

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