1 # Contributor: orbisvicis <orbisvicis at gmail dot com>
5 pkgdesc="Create a sqlite3 database containing poi data from a given osm xml file"
7 url="http://wiki.openstreetmap.org/"
9 depends=('gtk2' 'libxml2' 'openstreetmap-map-icons-svn') # already in core ('sqlite3')
10 makedepends=('subversion' 'cmake>=2.4.3')
11 optdepends=('gpsdrive: use the poi databases')
17 _svntrunk="http://svn.openstreetmap.org/applications/utils/export/osm2poidb/"
23 if [ -d "${_svnmod}/.svn" ]; then
24 (cd "$_svnmod" && svn up -r "$pkgver")
26 svn co "$_svntrunk" --config-dir ./ -r "$pkgver" "$_svnmod"
29 msg "SVN checkout done or server timeout"
30 msg "Starting make..."
32 rm -rf "${srcdir}/${_svnmod}-build"
33 cp -a "${srcdir}/${_svnmod}" "${srcdir}/${_svnmod}-build"
34 cd "${srcdir}/${_svnmod}-build"
43 # default to the geoinfo.db file provided by the openstreetmap-map-icons-svn package
44 sed -i 's|#define DB_GEOINFO "/usr/share/gpsdrive/geoinfo.db"|#define DB_GEOINFO "/usr/share/icons/map-icons/geoinfo.db"|' "${srcdir}/${_svnmod}-build/osm2poidb.c"
46 cmake -DCMAKE_INSTALL_PREFIX="/usr" "${srcdir}/${_svnmod}-build"
51 cd "${srcdir}/${_svnmod}-build/build"
52 make DESTDIR="$pkgdir" install