[osmium-tool] 23/97: Various cmake build, debian packaging, and doc updates.
Sebastiaan Couwenberg
sebastic at moszumanska.debian.org
Tue Jul 21 20:15:30 UTC 2015
This is an automated email from the git hooks/post-receive script.
sebastic pushed a commit to tag v1.0.0
in repository osmium-tool.
commit 24fae0597fde14850224f3c06e6b92a410bce45c
Author: Jochen Topf <jochen at topf.org>
Date: Tue Jul 22 14:13:46 2014 +0200
Various cmake build, debian packaging, and doc updates.
---
CMakeLists.txt | 7 ++++
Makefile | 95 --------------------------------------------------
README.md | 29 ++++++++++++---
debian/control | 2 ++
debian/osmium.manpages | 7 ----
debian/rules | 10 ------
6 files changed, 34 insertions(+), 116 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ceec6d4..1536aef 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -118,6 +118,13 @@ if(PANDOC)
endforeach()
add_custom_target(man ALL DEPENDS ${MAN_FILES})
+
+ foreach(m IN LISTS MAN_PAGES_1)
+ install(FILES ${CMAKE_BINARY_DIR}/${m} DESTINATION share/man/man1)
+ endforeach()
+ foreach(m IN LISTS MAN_PAGES_5)
+ install(FILES ${CMAKE_BINARY_DIR}/${m} DESTINATION share/man/man5)
+ endforeach()
else()
message(STATUS "Looking for pandoc - not found")
message(STATUS " Manual pages will not be built")
diff --git a/Makefile b/Makefile
deleted file mode 100644
index 33c1c2a..0000000
--- a/Makefile
+++ /dev/null
@@ -1,95 +0,0 @@
-#------------------------------------------------------------------------------
-#
-# Makefile for Osmium Command Line Tool
-#
-#------------------------------------------------------------------------------
-#
-# You can set several environment variables before running make if you don't
-# like the defaults:
-#
-# CXX - Your C++ compiler.
-# CPLUS_INCLUDE_PATH - Include file search path.
-# CXXFLAGS - Extra compiler flags.
-# LDFLAGS - Extra linker flags.
-#
-#------------------------------------------------------------------------------
-
-CXXFLAGS += -O3
-#CXXFLAGS += -g
-CXXFLAGS += -std=c++11 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
-CXXFLAGS += -I../libosmium/include
-
-PREFIX ?= /usr
-
-OS:=$(shell uname -s)
-ifeq ($(OS),Darwin)
- CXXFLAGS += -stdlib=libc++
- LDFLAGS += -stdlib=libc++
-endif
-
-CXXFLAGS_WARNINGS := -Wall -Wextra -pedantic -Wredundant-decls -Wdisabled-optimization -Wctor-dtor-privacy -Wnon-virtual-dtor -Woverloaded-virtual -Wsign-promo -Wold-style-cast
-
-LIB_PBF := -pthread -lz -lprotobuf-lite -losmpbf
-LIB_EXPAT := -lexpat
-LIB_GZIP := -lz
-LIB_BZIP2 := -lbz2
-
-LIB_PRGOPT := -lboost_program_options
-LIB_CRYPTO := -lcrypto++
-
-PROGRAMS := osmium
-COMMANDS_H := $(wildcard src/command_*.hpp)
-COMMANDS_O := $(COMMANDS_H:.hpp=.o)
-
-INCLUDES := src/osmc.hpp
-
-# We use the numeric id 0 here because different systems (Linux vs. BSD)
-# use different names for the "root group".
-INSTALL_GROUP := 0
-
-CPPCHECK_OPTIONS := --enable=warning,style,performance,portability,information,missingInclude
-
-# cpp doesn't find system includes for some reason, suppress that report
-CPPCHECK_OPTIONS += --suppress=missingIncludeSystem
-
-# temp fix for http://sourceforge.net/apps/trac/cppcheck/ticket/4966
-CPPCHECK_OPTIONS += --suppress=constStatement
-
-.PHONY: all check clean doc
-
-all: $(PROGRAMS)
-
-src/main.o: src/main.cpp $(COMMANDS_H) $(INCLUDES)
- $(CXX) -c $(CXXFLAGS) $(CXXFLAGS_WARNINGS) -o $@ $<
-
-src/command_%.o: src/command_%.cpp src/command_%.hpp $(INCLUDES)
- $(CXX) -c $(CXXFLAGS) $(CXXFLAGS_WARNINGS) -o $@ $<
-
-osmium: src/main.o $(COMMANDS_O)
- $(CXX) -o $@ $< $(COMMANDS_O) $(LDFLAGS) $(LIB_PBF) $(LIB_EXPAT) $(LIB_GZIP) $(LIB_BZIP2) $(LIB_PRGOPT) $(LIB_CRYPTO)
-
-cppcheck:
- cppcheck --std=c++11 $(CPPCHECK_OPTIONS) src/*pp
-
-indent:
- astyle --style=java --indent-namespaces --indent-switches --pad-header --lineend=linux --suffix=none --recursive src/\*pp
-
-clean:
- rm -f src/*.o core $(PROGRAMS)
- $(MAKE) -C doc clean
-
-doc:
- $(MAKE) -C doc
-
-install:
- install -m 755 -g $(INSTALL_GROUP) -o root -d $(DESTDIR)$(PREFIX)/bin
- install -m 755 -g $(INSTALL_GROUP) -o root -d $(DESTDIR)$(PREFIX)/share/doc/osmium
- install -m 755 -g $(INSTALL_GROUP) -o root osmium $(DESTDIR)$(PREFIX)/bin/osmium
- install -m 644 -g $(INSTALL_GROUP) -o root README.md $(DESTDIR)$(PREFIX)/share/doc/osmium/README.md
-
-deb:
- debuild -I -us -uc
-
-deb-clean:
- debuild clean
-
diff --git a/README.md b/README.md
index 1de233c..b8004c9 100644
--- a/README.md
+++ b/README.md
@@ -6,10 +6,11 @@ Command line tool for working with OpenStreetMap data based on the Osmium librar
## Prerequisites
-You need a C++11 compliant compiler. GCC 4.7.3 and clang 3.2 are known to work.
+You need a C++11 compliant compiler. GCC 4.8 and clang 3.2 are known to work. You
+also need the following libraries:
Osmium Library
- http://osmcode.org/osmium
+ http://osmcode.org/libosmium
boost-program-options (for parsing command line options)
http://www.boost.org/doc/libs/1_54_0/doc/html/program_options.html
@@ -39,16 +40,36 @@ You need a C++11 compliant compiler. GCC 4.7.3 and clang 3.2 are known to work.
http://www.cryptopp.com/
Debian/Ubuntu: libcrypto++-dev
+ cmake (for building)
+ http://www.cmake.org/
+ Debian/Ubuntu: cmake
+
## Building
-Type 'make'.
+Osmium uses CMake for its builds. On Unix/Linux systems compile as follows:
+
+```
+mkdir build
+cd build
+cmake ..
+make
+```
+
+To set the build type call cmake with `-DCMAKE_BUILD_TYPE=type`. Possible
+values are empty, Debug, Release, RelWithDebInfo and MinSizeRel.
## Documentation
There are man pages in the 'doc' directory. To build them you need 'pandoc'.
-Run 'make doc' to build.
+Run 'make man' to build.
+
+
+## Building Debian Package
+
+A `debian` directory is provided for building (unofficial) Debian packages.
+Call `debuild -I -us -uc` to build the package.
## License
diff --git a/debian/control b/debian/control
index ddc4b57..a52d9a1 100644
--- a/debian/control
+++ b/debian/control
@@ -3,11 +3,13 @@ Section: utils
Priority: optional
Maintainer: Jochen Topf <jochen at topf.org>
Build-Depends: debhelper (>= 9),
+ cmake (>= 2.8),
libboost-program-options-dev,
libbz2-dev,
libcrypto++-dev,
libexpat1-dev,
libosmpbf-dev,
+ libprotobuf-c-dev | libprotobuf-c0-dev (>= 0.14),
pandoc,
zlib1g-dev
Standards-Version: 3.9.5
diff --git a/debian/osmium.manpages b/debian/osmium.manpages
deleted file mode 100644
index ad31238..0000000
--- a/debian/osmium.manpages
+++ /dev/null
@@ -1,7 +0,0 @@
-doc/osmium.1
-doc/osmium-apply-changes.1
-doc/osmium-cat.1
-doc/osmium-file-formats.5
-doc/osmium-fileinfo.1
-doc/osmium-merge-changes.1
-doc/osmium-time-filter.1
diff --git a/debian/rules b/debian/rules
index 2eff4e7..9861256 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,10 +1,4 @@
#!/usr/bin/make -f
-# -*- makefile -*-
-# Sample debian/rules that uses debhelper.
-# This file was originally written by Joey Hess and Craig Small.
-# As a special exception, when this file is copied by dh-make into a
-# dh-make output file, you may use that output file without restriction.
-# This special exception was added by Craig Small in version 0.37 of dh-make.
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
@@ -12,7 +6,3 @@
%:
dh $@
-override_dh_auto_build:
- dh_auto_build
- make doc
-
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/osmium-tool.git
More information about the Pkg-grass-devel
mailing list