]> git.openstreetmap.org Git - nominatim.git/commitdiff
Merge branch 'configure' of github.com:lonvia/Nominatim
authorSarah Hoffmann <lonvia@denofr.de>
Wed, 27 Jun 2012 20:55:39 +0000 (22:55 +0200)
committerSarah Hoffmann <lonvia@denofr.de>
Wed, 27 Jun 2012 20:55:39 +0000 (22:55 +0200)
17 files changed:
.gitmodules [new file with mode: 0644]
AUTHORS [new file with mode: 0644]
ChangeLog [new file with mode: 0644]
Makefile.am [new file with mode: 0644]
NEWS [new file with mode: 0644]
README [new file with mode: 0644]
autogen.sh [new file with mode: 0755]
configure.ac [new file with mode: 0644]
module/Makefile [deleted file]
module/Makefile.in [new file with mode: 0644]
nominatim/Makefile.am [new file with mode: 0644]
nominatim/Makefile.in [deleted file]
nominatim/autogen.sh [deleted file]
nominatim/config.h.in [deleted file]
nominatim/configure.ac [deleted file]
nominatim/nominatim-svn.sh [deleted file]
osm2pgsql [new submodule]

diff --git a/.gitmodules b/.gitmodules
new file mode 100644 (file)
index 0000000..bc2bdd8
--- /dev/null
@@ -0,0 +1,4 @@
+[submodule "osm2pgsql"]
+       path = osm2pgsql
+       url = https://github.com/openstreetmap/osm2pgsql.git
+    ignore = all
diff --git a/AUTHORS b/AUTHORS
new file mode 100644 (file)
index 0000000..704d6be
--- /dev/null
+++ b/AUTHORS
@@ -0,0 +1 @@
+Nominatim was written by Brian Quinion.
diff --git a/ChangeLog b/ChangeLog
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/Makefile.am b/Makefile.am
new file mode 100644 (file)
index 0000000..910ebea
--- /dev/null
@@ -0,0 +1,6 @@
+ACLOCAL_AMFLAGS = -I osm2pgsql/m4
+
+SUBDIRS = osm2pgsql module nominatim
+
+install:
+       @echo Nominatim needs to be executed directly from this directory. No install necessary.
diff --git a/NEWS b/NEWS
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/README b/README
new file mode 100644 (file)
index 0000000..b7fdedc
--- /dev/null
+++ b/README
@@ -0,0 +1,56 @@
+Nominatim
+=========
+
+Nominatim (from the Latin, 'by name') is a tool to search OpenStreetMap data
+by name and address (geocoding) and to generate synthetic addresses of
+OSM points (reverse geocoding). An instance with up-to-date data can be found
+at http://nominatim.openstreetmap.org. Nominatim is also used as one of the
+sources for the Search box on the OpenStreetMap home page and powers the search
+on the MapQuest Open Initiative websites.
+
+Documentation
+=============
+
+More information about Nominatim, including usage and installation instructions,
+can be found in the OSM wiki at:
+
+http://wiki.openstreetmap.org/wiki/Nominatim
+
+Installation
+============
+
+The following instructions is a quick guide to installation. A more detailed guide
+how to set up your own instance of Nominatim can be found in the wiki:
+
+http://wiki.openstreetmap.org/wiki/Nominatim/Installation
+
+Installation steps:
+
+0. If checking out from git run:
+
+     ./autogen.sh
+
+1. Compile Nominatim:
+
+     ./configure [--enable-64bit-ids]
+     make
+
+2. Get OSM data and import:
+
+     ./utils/setup.php --osm-file <your planet file> --all
+
+3. Point your webserver to the ./website directory.
+
+License
+=======
+
+The source code is available under a GPLv2 license.
+
+Contact and Bugreports
+======================
+
+For questions you can join the geocoding mailinglist, see
+http://lists.openstreetmap.org/listinfo/geocoding
+
+Bugs may be reported on the github project site:
+https://github.com/twain47/Nominatim
diff --git a/autogen.sh b/autogen.sh
new file mode 100755 (executable)
index 0000000..68341a5
--- /dev/null
@@ -0,0 +1,2 @@
+#!/bin/sh
+autoreconf -vfi
diff --git a/configure.ac b/configure.ac
new file mode 100644 (file)
index 0000000..8d3a58d
--- /dev/null
@@ -0,0 +1,65 @@
+AC_INIT(Nominatim,1.9)
+if git rev-parse HEAD 2>/dev/null >/dev/null; then
+    AC_SUBST([PACKAGE_VERSION], [$PACKAGE_VERSION-git-`git rev-parse --short HEAD`])
+fi
+
+dnl Required autoconf version
+AC_PREREQ(2.61)
+
+AM_INIT_AUTOMAKE([1.9.6 dist-bzip2 std-options check-news])
+
+dnl Additional macro definitions are in here
+AC_CONFIG_MACRO_DIR([osm2pgsql/m4])
+
+dnl Generate configuration header file
+AC_CONFIG_HEADER(nominatim/config.h)
+
+
+dnl Find C compiler
+AC_PROG_CC
+
+dnl Find C++ compiler
+AC_PROG_CXX
+
+dnl pthread
+AX_PTHREAD([], [AC_MSG_ERROR([pthread library required])])
+
+dnl Check for Geos library
+AX_LIB_GEOS
+if test "x$GEOS_VERSION" = "x" 
+then
+  AC_MSG_ERROR([required library not found]);
+fi
+
+dnl Check for Proj library
+AX_LIB_PROJ
+if test "$HAVE_PROJ" = "no" 
+then
+  AC_MSG_ERROR([required library not found]);
+fi
+
+
+dnl Check for PostgresSQL client library
+AX_LIB_POSTGRESQL(8.4)
+if test "x$POSTGRESQL_VERSION" = "x"
+then
+    AC_MSG_ERROR([postgresql client library not found])
+fi
+if test ! -f "$POSTGRESQL_PGXS"
+then
+    AC_MSG_ERROR([postgresql server development library not found])
+fi
+
+dnl Check for bzip2 library
+AX_LIB_BZIP2
+if test "$HAVE_BZIP2" = "no" 
+then
+  AC_MSG_ERROR([required library not found]);
+fi
+
+dnl Check for libxml2 library
+AM_PATH_XML2
+
+AC_CONFIG_SUBDIRS([osm2pgsql])
+
+AC_OUTPUT(Makefile nominatim/Makefile module/Makefile)
diff --git a/module/Makefile b/module/Makefile
deleted file mode 100644 (file)
index 12d66b6..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-MODULES = nominatim
-PGXS := $(shell pg_config --pgxs)
-include $(PGXS)
-
-all:
-       chmod 755 nominatim.so
diff --git a/module/Makefile.in b/module/Makefile.in
new file mode 100644 (file)
index 0000000..0bfa62c
--- /dev/null
@@ -0,0 +1,9 @@
+MODULES = nominatim
+PGXS := @POSTGRESQL_PGXS@
+include $(PGXS)
+
+all:
+       chmod 755 nominatim.so
+
+install:
+       @echo Library does not need to be installed.
diff --git a/nominatim/Makefile.am b/nominatim/Makefile.am
new file mode 100644 (file)
index 0000000..043ae7b
--- /dev/null
@@ -0,0 +1,9 @@
+bin_PROGRAMS = nominatim
+
+nominatim_SOURCES = export.c geometry.cpp import.c index.c input.c nominatim.c postgresql.c sprompt.c
+
+AM_CFLAGS = @PTHREAD_CFLAGS@ @POSTGRESQL_CFLAGS@ @XML_CPPFLAGS@ @BZIP2_CFLAGS@  @GEOS_CFLAGS@ @PROJ_CFLAGS@ -DVERSION='"@PACKAGE_VERSION@"'
+AM_CPPFLAGS = @PTHREAD_CFLAGS@ @POSTGRESQL_CFLAGS@ @XML_CPPFLAGS@ @BZIP2_CFLAGS@  @GEOS_CFLAGS@ @PROJ_CFLAGS@
+
+AM_LDFLAGS = @PTHREAD_CFLAGS@ @POSTGRESQL_LDFLAGS@ @POSTGRESQL_LIBS@ @XML_LIBS@ @BZIP2_LDFLAGS@ @BZIP2_LIBS@ @GEOS_LDFLAGS@ @GEOS_LIBS@ @PROJ_LDFLAGS@ @PROJ_LIBS@ -lz
+
diff --git a/nominatim/Makefile.in b/nominatim/Makefile.in
deleted file mode 100644 (file)
index f6289d9..0000000
+++ /dev/null
@@ -1,89 +0,0 @@
-
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-bindir = @bindir@
-sysconfdir = @sysconfdir@
-datarootdir = @datarootdir@
-datadir = @datadir@
-
-PACKAGE = @PACKAGE_NAME@
-VERSION = @PACKAGE_VERSION@
-SVN:=$(shell svnversion)
-DATADIR = $(datadir)/$(PACKAGE)
-
-
-CC = @CC@ 
-CXX = @CXX@
-
-CFLAGS += -g -O2 -Wall -Wextra
-CFLAGS += $(shell xml2-config --cflags)
-CFLAGS += $(shell geos-config --cflags)
-CFLAGS += -I$(shell pg_config --includedir)
-CFLAGS += -DVERSION=\"$(VERSION)-$(SVN)\"
-CFLAGS += -DHAVE_PTHREAD
-CFLAGS += -DNOMINATIM_DATADIR=\"$(DATADIR)\"
-
-LDFLAGS += $(shell xml2-config --libs) 
-LDFLAGS += $(shell geos-config --libs)
-LDFLAGS += -L$(shell pg_config --libdir) -lpq
-LDFLAGS += -lbz2 -lz
-LDFLAGS += -g -lproj
-LDFLAGS += -lstdc++
-LDFLAGS += -lpthread
-
-SRCS:=$(wildcard *.c) $(wildcard *.cpp)
-OBJS:=$(SRCS:.c=.o)
-OBJS:=$(OBJS:.cpp=.o)
-DEPS:=$(SRCS:.c=.d)
-DEPS:=$(DEPS:.cpp=.d)
-
-APPS:=nominatim
-DATA:=default.style
-
-.PHONY: all clean $(PACKAGE).spec
-
-all: $(APPS)
-
-clean: 
-       rm -f $(APPS) $(OBJS) $(DEPS)
-       rm -f $(PACKAGE)-*.tar.bz2
-       rm -f nominatim.spec
-
-clean-all: clean
-       rm -rf autom4te.cache
-       rm -f config.h
-       rm -f config.log
-       rm -f config.status
-       rm -f configure
-       rm -f Makefile
-
-install: $(APPS)
-       mkdir -p $(DESTDIR)$(bindir)
-       install -m 0755 $(APPS) $(DESTDIR)$(bindir)
-       mkdir -p $(DESTDIR)$(DATADIR)
-       install -m 0644 $(DATA) $(DESTDIR)$(DATADIR)
-
-%.d: %.c
-       @set -e; rm -f $@; \
-       $(CC) -MM $(CFLAGS) $< > $@.$$$$; \
-       sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
-       rm -f $@.$$$$
-
--include $(DEPS)
-
-nominatim: $(OBJS)
-       $(CC) -o $@ $^ $(CFLAGS) $(LDFLAGS)
-
-$(PACKAGE).spec: $(PACKAGE).spec.in
-       sed -e "s/@PACKAGE@/$(PACKAGE)/g; s/@VERSION@/$(VERSION)/g; s/@SVN@/$(SVN)/g;" $^ > $@
-
-$(PACKAGE)-$(VERSION).tar.bz2: $(PACKAGE).spec
-       rm -fR tmp
-       mkdir -p tmp/nominatim
-       cp -p Makefile *.[ch] *.cpp README.txt nominatim-svn.sh tmp/nominatim
-       cp -p nominatim.spec tmp/
-       tar cjf $@ -C tmp .
-       rm -fR tmp
-
-rpm: $(PACKAGE)-$(VERSION).tar.bz2
-       rpmbuild -ta $^
diff --git a/nominatim/autogen.sh b/nominatim/autogen.sh
deleted file mode 100755 (executable)
index 4066e97..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-autoconf
diff --git a/nominatim/config.h.in b/nominatim/config.h.in
deleted file mode 100644 (file)
index f80de9c..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-/* config.h.in.  Generated from configure.ac by autoheader.  */
-
-/* Define to the address where bug reports for this package should be sent. */
-#undef PACKAGE_BUGREPORT
-
-/* Define to the full name of this package. */
-#undef PACKAGE_NAME
-
-/* Define to the full name and version of this package. */
-#undef PACKAGE_STRING
-
-/* Define to the one symbol short name of this package. */
-#undef PACKAGE_TARNAME
-
-/* Define to the home page for this package. */
-#undef PACKAGE_URL
-
-/* Define to the version of this package. */
-#undef PACKAGE_VERSION
diff --git a/nominatim/configure.ac b/nominatim/configure.ac
deleted file mode 100644 (file)
index 18e51e4..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-dnl Process this file with autoconf to produce a configure script.
-AC_INIT(nominatim, 0.1)
-
-dnl Generate configuration header file
-AC_CONFIG_HEADER(config.h)
-
-dnl Find C compiler
-AC_PROG_CC
-
-dnl Find C++ compiler
-AC_PROG_CXX
-
-dnl Generate Makefile
-AC_OUTPUT(Makefile)
-
diff --git a/nominatim/nominatim-svn.sh b/nominatim/nominatim-svn.sh
deleted file mode 100755 (executable)
index f717b24..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/bin/sh
-
-DATE=$(date +%Y%m%d)
-MODULE="$(basename $0 -svn.sh)"
-SVNROOT=http://svn.openstreetmap.org/applications/utils/nominatim/
-
-set -x
-rm -rf $MODULE
-
-svn export $SVNROOT $MODULE/
-
-## tar it up
-tar cjf $MODULE-${DATE}svn.tar.bz2 $MODULE
-
-## cleanup
-rm -rf $MODULE
-
diff --git a/osm2pgsql b/osm2pgsql
new file mode 160000 (submodule)
index 0000000..a5809fd
--- /dev/null
+++ b/osm2pgsql
@@ -0,0 +1 @@
+Subproject commit a5809fdaec5e52c00a97bcdfc48b8e13acffadd2