diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c016218 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +src/*.pb.h +src/*.pb.o +src/libosmpbf.a diff --git a/README b/README new file mode 100644 index 0000000..f09e399 --- /dev/null +++ b/README @@ -0,0 +1,9 @@ + +OSM PBF +======= + +See http://wiki.openstreetmap.org/wiki/PBF_Format . + +To build the Debian/Ubuntu package call: + debuild -I -us -uc + diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..7599db6 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +libosmpbf-dev (0.1) maverick; urgency=low + + * Initial debian package + + -- Jochen Topf Wed, 13 Apr 2011 21:50:15 +0100 diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..7f8f011 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +7 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..5452bb4 --- /dev/null +++ b/debian/control @@ -0,0 +1,14 @@ +Source: libosmpbf-dev +Section: libdevel +Priority: optional +Maintainer: Jochen Topf +Build-Depends: debhelper (>= 7), libprotobuf-dev, protobuf-compiler +Standards-Version: 3.9.1 +Homepage: http://wiki.openstreetmap.org/wiki/PBF_Format + +Package: libosmpbf-dev +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Library for reading OSM PBF files. + Interface definition and library for reading binary + OpenStreetMap data files. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..7386ce0 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,18 @@ +Copyright (c) 2010 Scott A. Crosby. + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with this program. If not, see . + +On Debian systems, the license text can usually be found in +/usr/share/common-licenses. + diff --git a/debian/docs b/debian/docs new file mode 100644 index 0000000..fe686d9 --- /dev/null +++ b/debian/docs @@ -0,0 +1,2 @@ +src/fileformat.proto +src/osmformat.proto diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..72cb333 --- /dev/null +++ b/debian/rules @@ -0,0 +1,86 @@ +#!/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. + + touch configure-stamp + +build: build-stamp + +build-stamp: configure-stamp + dh_testdir + + # Add here commands to compile the package. + $(MAKE) -C src + + 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 + + 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 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 + 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 diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 0000000..89ae9db --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (native) diff --git a/foo b/foo deleted file mode 100644 index e69de29..0000000 diff --git a/src/Makefile b/src/Makefile new file mode 100644 index 0000000..efd938a --- /dev/null +++ b/src/Makefile @@ -0,0 +1,25 @@ + +CXX = g++ +CXXFLAGS = -O3 +AR = ar + +all: libosmpbf.a fileformat.pb.h osmformat.pb.h + +libosmpbf.a: fileformat.pb.o osmformat.pb.o + $(AR) -cr $@ fileformat.pb.o osmformat.pb.o + +%.pb.o: %.pb.cc + $(CXX) $(CXXFLAGS) -c -o $@ $< + +%.pb.cc %.pb.h: %.proto + protoc --proto_path=. --cpp_out=. $< + +install: + install -m 755 -g root -o root -d $(DESTDIR)/usr/lib + install -m 644 -g root -o root libosmpbf.a $(DESTDIR)/usr/lib + install -m 755 -g root -o root -d $(DESTDIR)/usr/include/osmpbf + install -m 644 -g root -o root fileformat.pb.h osmformat.pb.h $(DESTDIR)/usr/include/osmpbf + +clean: + rm -f *.pb.h *.pb.cc *.pb.o libosmpbf.a + diff --git a/src/fileformat.proto b/src/fileformat.proto index 2322ce0..e6fd937 100644 --- a/src/fileformat.proto +++ b/src/fileformat.proto @@ -8,13 +8,14 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ +option optimize_for = LITE_RUNTIME; option java_package = "crosby.binary"; package OSMPBF; diff --git a/src/osmformat.proto b/src/osmformat.proto index 44e24f7..ddf2c84 100644 --- a/src/osmformat.proto +++ b/src/osmformat.proto @@ -8,13 +8,14 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ +option optimize_for = LITE_RUNTIME; option java_package = "crosby.binary"; package OSMPBF;