summaryrefslogtreecommitdiff
path: root/community/python2-basemap/PKGBUILD
blob: 1c4567710a46f18c8c0ea0a37cee07d118acfd5d (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
# $Id: PKGBUILD 51032 2011-07-04 14:39:21Z stephane $
# Maintainer: Stéphane Gaudreault <stephane@archlinux.org>
# Contributor: Julien Morin <jmorin@cp.dias.ie>

pkgname=python2-basemap
pkgver=1.0.1
pkgrel=2
pkgdesc="Toolkit for plotting data on map projections"
arch=('i686' 'x86_64' 'mips64el')
url="http://matplotlib.sourceforge.net/basemap/doc/html/"
license=('custom')
depends=('python2-matplotlib' 'geos' 'shapelib' 'python2-numpy' 'python2-httplib2') 
makedepends=('python2-distribute')
optdepends=('python-imaging: Python Imaging Library is only needed for bluemarble and warpimage methods.')
provides=('python-matplotlib-basemap')
replaces=('python-matplotlib-basemap')
conflicts=('python-matplotlib-basemap')
source=("http://downloads.sourceforge.net/project/matplotlib/matplotlib-toolkits/basemap-${pkgver}/basemap-${pkgver}.tar.gz")
sha1sums=('bd278580c004ec597020e313cc2c568593a018eb')

build() {
   cd "${srcdir}/basemap-${pkgver}"
 
   # Remove the bundled librarie
   rm -r geos-?.?.?
   sed -i "s/lib64/lib/g" setup.py
  
   python2 setup.py config
   python2 setup.py build
}

package() {
   cd "${srcdir}/basemap-${pkgver}"

   _pybasever=2.7

   python2 setup.py install -O1 --skip-build --root="${pkgdir}" --prefix=/usr 

   # Conflict with files from python2-matplotlib
   rm "${pkgdir}"/usr/lib/python${_pybasever}/site-packages/mpl_toolkits/__init__.{py,pyc,pyo}

   # License
   install -Dm644 LICENSE_data "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
   install -Dm644 LICENSE_pyshapelib "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
   install -Dm644 LICENSE_proj4 "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
   install -Dm644 README "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}