summaryrefslogtreecommitdiff
path: root/extra/geoip/PKGBUILD
blob: 777983769cbcb6436bf15f3e1881f5eaa56575e3 (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
# $Id: PKGBUILD 216903 2014-07-15 13:02:26Z juergen $
# Maintainer: Dan McGee <dan@archlinux.org>
# Contributor: Manolis Tzanidakis <manolis@archlinux.org>

pkgname=geoip
pkgver=1.6.2
pkgrel=1
pkgdesc="Non-DNS IP-to-country resolver C library & utils"
arch=('i686' 'x86_64')
url="http://www.maxmind.com/app/c"
license=('GPL')
depends=('zlib' 'geoip-database')
backup=('etc/geoip/GeoIP.conf')
options=('!emptydirs')
source=(https://github.com/maxmind/${pkgname}-api-c/archive/v${pkgver}.tar.gz)
sha256sums=('72562fc10792eea6cfa662d93ef40c6541b73619df8057a6e411144e671a9174')

prepare() {
  cd geoip-api-c-$pkgver
  autoreconf -vi
}

build() {
  cd geoip-api-c-$pkgver

  ./configure \
    --prefix=/usr \
    --mandir=/usr/share/man \
    --sysconfdir=/etc/geoip
  make
}

check() {
  cd geoip-api-c-$pkgver
  ln -sf /usr/share/GeoIP data
  make check
}

package() {
  cd geoip-api-c-$pkgver
  make DESTDIR="$pkgdir" install
}

# vim:set ts=2 sw=2 et: