summaryrefslogtreecommitdiff
path: root/extra/geoip/PKGBUILD
blob: 8e75a5e9461c19de260f0f826af29fc34d88d751 (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
# $Id: PKGBUILD 158109 2012-05-03 01:01:32Z foutrelis $
# Maintainer: Dan McGee <dan@archlinux.org>
# Contributor: Manolis Tzanidakis <manolis@archlinux.org>

pkgname=geoip
pkgver=1.4.8
pkgrel=2
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=('!libtool' '!emptydirs')
source=(http://www.maxmind.com/download/geoip/api/c/GeoIP-$pkgver.tar.gz)
sha256sums=('cf0f6b2bac1153e34d6ef55ee3851479b347d2b5c191fda8ff6a51fab5291ff4')

build() {
  cd "$srcdir/GeoIP-$pkgver"

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

check() {
  cd "$srcdir/GeoIP-$pkgver"
  make check
}

package() {
  cd "$srcdir/GeoIP-$pkgver"

  make DESTDIR="$pkgdir" install

  # country database is provided by geoip-database
  rm "$pkgdir/usr/share/GeoIP/GeoIP.dat"
}

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