summaryrefslogtreecommitdiff
path: root/extra/geoip/PKGBUILD
blob: 6e2f7d31760338d8f533ac93169885e66a3af8d3 (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
# $Id: PKGBUILD 197302 2013-10-25 01:44:22Z allan $
# Maintainer: Dan McGee <dan@archlinux.org>
# Contributor: Manolis Tzanidakis <manolis@archlinux.org>

pkgname=geoip
pkgver=1.5.1
pkgrel=2
pkgdesc="Non-DNS IP-to-country resolver C library & utils"
arch=('i686' 'x86_64' 'mips64el')
url="http://www.maxmind.com/app/c"
license=('GPL')
depends=('zlib' 'geoip-database')
backup=('etc/geoip/GeoIP.conf')
options=('!emptydirs')
source=(http://www.maxmind.com/download/geoip/api/c/GeoIP-$pkgver.tar.gz 
        pkgconfig.patch)
sha256sums=('ec35ee73fcc54c493f4252565d1c81d022b398dd16de3af1522c8cab016f8731'
            '64a6a608beabdc553019237d7da808dc234f760c21040036b2f589eaebba5d10')

prepare() {
  cd GeoIP-$pkgver
  patch -Np1 -i ../pkgconfig.patch
}

build() {
  cd GeoIP-$pkgver

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

check() {
  cd GeoIP-$pkgver
  make check
}

package() {
  cd 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: