Improved debian build, better README

This brings the debian build more in line with the actual released debian
packages which split up the program into three packages.
The tools Makefile has more warnings enabled.
The README goes into a bit more detail.
This commit is contained in:
Jochen Topf 2014-03-10 22:00:35 +01:00
parent 89c61197d2
commit f0da31fd79
13 changed files with 126 additions and 135 deletions

6
.gitignore vendored
View File

@ -1,5 +1,11 @@
build-stamp
build
configure-stamp
osmpbf.jar
generated.java
include/osmpbf/*.pb.h
src/*.pb.h
src/*.pb.o
src/libosmpbf.a
*.swp
obj-x86_64-linux-gnu

45
README
View File

@ -1,12 +1,22 @@
OSM PBF
=======
OSMPBF
======
See http://wiki.openstreetmap.org/wiki/PBF_Format .
Osmpbf is a Java/C library to read and write OpenStreetMap PBF files.
PBF (Protocol buffer Binary Format) is a binary file format for OpenStreetMap
data that uses Google Protocol Buffers as low-level storage.
There is a Java and a C version of the PBF library code here.
For more information see http://wiki.openstreetmap.org/wiki/PBF_Format .
Java Version
============
To build the osmpbf.jar file run:
ant
For a Java usage example, see src.java/crosby/binary/test/ReadFileExample.java
For a Java usage example, see src.java\crosby\binary\test\ReadFileExample.java
C Version
=========
@ -19,16 +29,31 @@ To install:
cd src
make install
To build the Debian/Ubuntu package call:
debuild -I -us -uc
There is a tool named osmpbf-outline that shows a debug output of the contents
of a PBF file. To compile it:
cd tools
make
To install the Debian/Ubuntu package call:
sudo dpkg --install ../libosmpbf-dev*.deb
Using the C Library
===================
To include in your program use:
#include <osmpbf/osmpbf.h>
and link with:
-lpthread -lz -lprotobuf-lite -losmpbf
-pthread -lz -lprotobuf-lite -losmpbf
Debian/Ubuntu Packages
======================
To build the Debian/Ubuntu packages:
debuild -I -us -uc
To install the Debian/Ubuntu packages:
sudo dpkg --install ../libosmpbf-dev_*.deb
sudo dpkg --install ../libosmpbf-java_*.deb
sudo dpkg --install ../osmpbf-bin_*.deb

8
debian/.gitignore vendored Normal file
View File

@ -0,0 +1,8 @@
.mh
*.debhelper.log
*.substvars
files
libosmpbf-dev
libosmpbf-java
osmpbf-bin
tmp

39
debian/changelog vendored
View File

@ -1,38 +1,5 @@
libosmpbf-dev (1.3.1) maverick; urgency=low
osmpbf (1.3.1) UNRELEASED; urgency=low
* Several building fixes and enhancements
* unreleased
-- Jochen Topf <jochen@topf.org> Wed, 11 Dec 2013 21:46:12 +0100
libosmpbf-dev (1.3.0) maverick; urgency=low
* Added fields into OSMHeader for OSM replication.
* Version number change to reflect official new version
-- Scott Crosby <scott@sacrosby.com> Wed, 04 Dec 2012 21:29:37 -0500
libosmpbf-dev (1.2.1) maverick; urgency=low
* Version number change to reflect official new version
-- Jochen Topf <jochen@topf.org> Wed, 19 Oct 2011 09:29:37 +0100
libosmpbf-dev (1.1.1j2) maverick; urgency=low
* Add manpage for osmpbf-outline tool
-- Jochen Topf <jochen@topf.org> Fri, 6 Jun 2011 10:30:12 +0100
libosmpbf-dev (1.1.1j1) maverick; urgency=low
* Add support for OSM history file
* Add some often used constants to OSMPBF namespace
* Add osmpbf-outline testing tool
-- Jochen Topf <jochen@topf.org> Fri, 3 Jun 2011 11:36:17 +0100
libosmpbf-dev (0.1) maverick; urgency=low
* Initial debian package
-- Jochen Topf <jochen@topf.org> Wed, 13 Apr 2011 21:50:15 +0100
-- Jochen Topf <jochen@topf.org> Mon, 10 Mar 2014 19:49:12 +0100

2
debian/clean vendored Normal file
View File

@ -0,0 +1,2 @@
include/osmpbf/fileformat.pb.h
include/osmpbf/osmformat.pb.h

2
debian/compat vendored
View File

@ -1 +1 @@
7
9

56
debian/control vendored
View File

@ -1,14 +1,50 @@
Source: libosmpbf-dev
Section: libdevel
Priority: optional
Maintainer: Jochen Topf <jochen@topf.org>
Build-Depends: debhelper (>= 7), libprotobuf-dev, protobuf-compiler
Standards-Version: 3.9.1
Homepage: http://wiki.openstreetmap.org/wiki/PBF_Format
Source: osmpbf
Section: java
Priority: extra
Maintainer: Debian GIS Team <pkg-grass@lists.alioth.debian.org>
Build-Depends:
debhelper (>= 9~)
, protobuf-compiler
, libprotobuf-java
, ant
, default-jdk
, libprotobuf-dev
, maven-repo-helper
Standards-Version: 3.9.5
Homepage: http://github.com/scrosby/OSM-binary
Vcs-Git: git://anonscm.debian.org/pkg-grass/osmpbf.git
Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-grass/osmpbf.git;a=summary
Package: libosmpbf-java
Architecture: all
Depends: ${misc:Depends}
Description: Java access library for OpenStreetMap PBF file format
Osmpbf is a Java/C library to read and write OpenStreetMap PBF files.
PBF (Protocol buffer Binary Format) is a binary file format for OpenStreetMap
data that uses Google Protocol Buffers as low-level storage.
.
This package provides a Java library.
Package: libosmpbf-dev
Section: libdevel
Architecture: any
Depends: ${misc:Depends}
Description: C headers for OpenStreetMap PBF file format
Osmpbf is a Java/C library to read and write OpenStreetMap PBF files.
PBF (Protocol buffer Binary Format) is a binary file format for OpenStreetMap
data that uses Google Protocol Buffers as low-level storage.
.
This package provides the C headers to be used in third-party
applications.
Package: osmpbf-bin
Section: utils
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: Library for reading OSM PBF files.
Interface definition and library for reading binary
OpenStreetMap data files.
Description: OpenStreetMap PBF file format library - tools
Osmpbf is a Java/C library to read and write OpenStreetMap PBF files.
PBF (Protocol buffer Binary Format) is a binary file format for OpenStreetMap
data that uses Google Protocol Buffers as low-level storage.
.
This package provides various tools to deal with OpenStreetMap PBF file
format.

2
debian/libosmpbf-dev.install vendored Normal file
View File

@ -0,0 +1,2 @@
usr/include/
usr/lib/

1
debian/libosmpbf-java.install vendored Normal file
View File

@ -0,0 +1 @@
osmpbf.jar usr/share/java

1
debian/osmpbf-bin.install vendored Normal file
View File

@ -0,0 +1 @@
usr/bin/

97
debian/rules vendored
View File

@ -1,89 +1,32 @@
#!/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
configure: configure-stamp
configure-stamp:
dh_testdir
# Add here commands to configure the package.
%:
dh $@
touch configure-stamp
override_dh_auto_clean:
dh_auto_clean
dh_auto_clean -Dsrc
dh_auto_clean -Dtools
mh_clean
build: build-stamp
override_dh_auto_build:
dh_auto_build
dh_auto_build -Dsrc
dh_auto_build -Dtools
build-stamp: configure-stamp
dh_testdir
override_dh_auto_install:
dh_auto_install
dh_auto_install -Dsrc
dh_auto_install -Dtools
# Add here commands to compile the package.
$(MAKE) -C src
$(MAKE) -C tools
override_dh_installchangelogs:
dh_installchangelogs -- ReleaseNotes.txt
touch $@
clean:
dh_testdir
dh_testroot
rm -f build-stamp configure-stamp
# Add here commands to clean up after the build process.
$(MAKE) -C src clean || /bin/true
$(MAKE) -C tools clean || /bin/true
dh_clean
install: build
dh_testdir
dh_testroot
dh_prep
dh_installdirs
# Add here commands to install the package into debian/libosmpbf-dev.
$(MAKE) -C src DESTDIR=$(CURDIR)/debian/libosmpbf-dev PREFIX=/usr install
$(MAKE) -C tools DESTDIR=$(CURDIR)/debian/libosmpbf-dev PREFIX=/usr install
# Build architecture-independent files here.
binary-indep: build install
# We have nothing to do by default.
# Build architecture-dependent files here.
binary-arch: build install
dh_testdir
dh_testroot
dh_installchangelogs
dh_installdocs
dh_installexamples
override_dh_install:
dh_install
# dh_installmenu
# dh_installdebconf
# dh_installlogrotate
# dh_installemacsen
# dh_installpam
# dh_installmime
# dh_python
# dh_installinit
# dh_installcron
# dh_installinfo
dh_installman
dh_link
dh_strip
dh_compress
dh_fixperms
# dh_perl
# dh_makeshlibs
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install configure
mh_installjar -plibosmpbf-java -l pom.xml osmpbf.jar
mh_installpom -plibosmpbf-java pom.xml

View File

@ -2,7 +2,7 @@
PREFIX ?= /usr/local
CXX ?= g++
CXXFLAGS ?= -g
CXXFLAGS += -I../include
CXXFLAGS += -I../include -Wall -Wextra -pedantic -Wredundant-decls -Wdisabled-optimization -Wctor-dtor-privacy -Wnon-virtual-dtor -Woverloaded-virtual -Wsign-promo -Wold-style-cast -Wno-c++11-long-long
LDFLAGS += -L../src -pthread -lz -lprotobuf-lite -losmpbf