[osmpbf] 05/11: Improved debian build, better README

Bas Couwenberg sebastic at xs4all.nl
Sun Mar 16 10:08:44 UTC 2014


This is an automated email from the git hooks/post-receive script.

sebastic-guest pushed a commit to tag v1.3.2
in repository osmpbf.

commit f0da31fd793d69dfe47830f5ea4b4a8b2afb6f7b
Author: Jochen Topf <jochen at topf.org>
Date:   Mon Mar 10 22:00:35 2014 +0100

    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.
---
 .gitignore                                         |  6 ++
 README                                             | 45 +++++++---
 debian/.gitignore                                  |  8 ++
 debian/changelog                                   | 39 +--------
 debian/clean                                       |  2 +
 debian/compat                                      |  2 +-
 debian/control                                     | 56 ++++++++++---
 debian/libosmpbf-dev.install                       |  2 +
 debian/libosmpbf-java.install                      |  1 +
 debian/osmpbf-bin.install                          |  1 +
 ...{libosmpbf-dev.manpages => osmpbf-bin.manpages} |  0
 debian/rules                                       | 97 +++++-----------------
 tools/Makefile                                     |  2 +-
 13 files changed, 126 insertions(+), 135 deletions(-)

diff --git a/.gitignore b/.gitignore
index c7ed701..ed0675e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -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
diff --git a/README b/README
index 2e8517b..e307e4f 100644
--- a/README
+++ b/README
@@ -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
 
diff --git a/debian/.gitignore b/debian/.gitignore
new file mode 100644
index 0000000..e656fd6
--- /dev/null
+++ b/debian/.gitignore
@@ -0,0 +1,8 @@
+.mh
+*.debhelper.log
+*.substvars
+files
+libosmpbf-dev
+libosmpbf-java
+osmpbf-bin
+tmp
diff --git a/debian/changelog b/debian/changelog
index 5f0d629..7c7fa28 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -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 at 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 at 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 at 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 at 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 at topf.org>  Fri, 3 Jun 2011 11:36:17 +0100
-
-libosmpbf-dev (0.1) maverick; urgency=low
-
-  * Initial debian package
-
- -- Jochen Topf <jochen at topf.org>  Wed, 13 Apr 2011 21:50:15 +0100
+ -- Jochen Topf <jochen at topf.org>  Mon, 10 Mar 2014 19:49:12 +0100
diff --git a/debian/clean b/debian/clean
new file mode 100644
index 0000000..13d6ffc
--- /dev/null
+++ b/debian/clean
@@ -0,0 +1,2 @@
+include/osmpbf/fileformat.pb.h
+include/osmpbf/osmformat.pb.h
diff --git a/debian/compat b/debian/compat
index 7f8f011..ec63514 100644
--- a/debian/compat
+++ b/debian/compat
@@ -1 +1 @@
-7
+9
diff --git a/debian/control b/debian/control
index 5452bb4..10d6928 100644
--- a/debian/control
+++ b/debian/control
@@ -1,14 +1,50 @@
-Source: libosmpbf-dev
-Section: libdevel
-Priority: optional
-Maintainer: Jochen Topf <jochen at 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 at 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.
diff --git a/debian/libosmpbf-dev.install b/debian/libosmpbf-dev.install
new file mode 100644
index 0000000..f6ad287
--- /dev/null
+++ b/debian/libosmpbf-dev.install
@@ -0,0 +1,2 @@
+usr/include/
+usr/lib/
diff --git a/debian/libosmpbf-java.install b/debian/libosmpbf-java.install
new file mode 100644
index 0000000..8f04649
--- /dev/null
+++ b/debian/libosmpbf-java.install
@@ -0,0 +1 @@
+osmpbf.jar usr/share/java
diff --git a/debian/osmpbf-bin.install b/debian/osmpbf-bin.install
new file mode 100644
index 0000000..c703cf8
--- /dev/null
+++ b/debian/osmpbf-bin.install
@@ -0,0 +1 @@
+usr/bin/
diff --git a/debian/libosmpbf-dev.manpages b/debian/osmpbf-bin.manpages
similarity index 100%
rename from debian/libosmpbf-dev.manpages
rename to debian/osmpbf-bin.manpages
diff --git a/debian/rules b/debian/rules
index 9f5587f..418e1e3 100755
--- a/debian/rules
+++ b/debian/rules
@@ -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
diff --git a/tools/Makefile b/tools/Makefile
index c435845..f213f6c 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -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
 
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/osmpbf.git



More information about the Pkg-grass-devel mailing list