1 # Maintainer: Jörg Hansen (joerg dot hansen at ymail dot com)
6 pkgdesc="Utility program that converts OpenStreetMap (.OSM) data into a format that can be loaded into PostgreSQL."
7 url="http://wiki.openstreetmap.org/wiki/Osm2pgsql"
10 depends=('postgis' 'libxml2' 'bzip2' 'zlib')
11 makedepends=('subversion')
13 _svntrunk=http://svn.openstreetmap.org/applications/utils/export/osm2pgsql
20 msg "SVN checking out..."
22 if [ -d $_svnname/.svn ]; then
23 (cd $_svnname && svn up -r $pkgver)
25 svn co $_svntrunk --config-dir ./ -r $pkgver $_svnname
28 msg "SVN checkout done"
30 if [[ -d $srcdir/$_svnname-build ]]; then
31 msg "Removing previous build directory..."
32 rm -rf $srcdir/$_svnname-build
35 msg "Creating build directory..."
36 cp -r $srcdir/$_svnname $srcdir/$_svnname-build
39 cd $srcdir/$_svnname-build
41 LDFLAGS='' ./configure --prefix=/usr
51 cd $srcdir/$_svnname-build
52 make DESTDIR="$pkgdir" install
54 msg "Additional files..."
55 mkdir -p ${pkgdir}/usr/share/doc/osm2pgsql
56 install -m644 README ${pkgdir}/usr/share/doc/osm2pgsql
57 install -m644 900913.sql ${pkgdir}/usr/share/osm2pgsql
60 find $pkgdir -type f -name "*\.la" -exec rm {} \;