diff --git a/Makefile.am b/Makefile.am index ca221ca4..61698834 100644 --- a/Makefile.am +++ b/Makefile.am @@ -31,8 +31,7 @@ DISTCLEANFILES = docs/html docs/latex .lastmod MAINTAINERCLEANFILES = revno.h .lastmod ETCDIR = $(subst lib,etc,$(pkglibdir)) -SUBDIRS = \ - src/validate +SUBDIRS = src/validate lib_LTLIBRARIES = libunderpass.la instdir = /tmp @@ -50,8 +49,7 @@ BOOST_LIBS = $(BOOST_DATE_TIME_LIB) \ $(BOOST_TIMER_LIB) \ $(BOOST_PYTHON_LIB) -SQL_FILES = \ - setup/db/underpass.sql +SQL_FILES = setup/db/underpass.sql libunderpass_la_SOURCES = \ src/utils/log.cc src/utils/log.hh \ @@ -71,8 +69,7 @@ libunderpass_la_SOURCES = \ src/utils/geoutil.cc src/utils/geoutil.hh \ src/utils/geo.cc src/utils/geo.hh \ src/utils/yaml.hh src/utils/yaml.cc \ - src/data/pq.hh src/data/pq.cc \ - setup/db/setupdb.sh + src/data/pq.hh src/data/pq.cc if JEMALLOC libunderpass_la_LDFLAGS = -avoid-version -ljemalloc @@ -109,20 +106,18 @@ AM_CPPFLAGS = \ # clutter to the output. This should only be enabled when doing performance tuning. -DTIMING_DEBUG -pkgdata_DATA = $(SQL_FILES) setup/db/setupdb.sh $(PYTHON_UTILS) +pkgdata_DATA = $(SQL_FILES) $(PYTHON_UTILS) EXTRA_DIST = \ $(SQL_FILES) \ $(PYTHON_UTILS) \ + setup/service/underpass.service \ + setup/db/setupdb.sh \ src/testsuite \ - config/priority.geojson \ - config/replicator/planetreplicator.yaml \ - doc \ dist/debian \ dist/redhat \ utils - DEJATOOL = libunderpass if ENABLE_PYTHON @@ -130,8 +125,8 @@ EXT := $(shell python3-config --extension-suffix) DIR := $(shell python3-config --configdir) noinst_LTLIBRARIES = underpass.la underpass_la_SOURCES = src/wrappers/python.cc $(libunderpass_la_SOURCES) -underpass_la_LDFADD = $(BOOST_LIBS) libunderpass.la src/validate/libunderpass.la -underpass_la_LDFLAGS = -module -avoid-version -no-undefined -rpath /usr/lib64/ src/validate/libunderpass.la $(BOOST_LIBS) +underpass_la_LIBADD = $(BOOST_LIBS) libunderpass.la src/validate/libunderpass.la +underpass_la_LDFLAGS = -module -avoid-version -no-undefined -rpath /usr/lib64/ src/validate/libunderpass.la -static $(BOOST_LIBS) PY_OBJECTS = $(libunderpass_la_OBJECTS:.lo=.o) # /usr/lib/python3.9/lib-dynload/underpass.cpython-39-x86_64-linux-gnu.so install-python: underpass.la @@ -154,16 +149,14 @@ endif install-data-hook: $(MKDIR_P) $(DESTDIR)$(ETCDIR) - cp -rvp $(srcdir)/config/priority.geojson $(DESTDIR)$(ETCDIR)/ - cp -rvp $(srcdir)/config/replicator $(DESTDIR)$(ETCDIR)/ - cp -rvp $(srcdir)/config/stats $(DESTDIR)$(ETCDIR)/ - cp -rvp $(srcdir)/config/default.yaml $(DESTDIR)$(ETCDIR)/ - cp -rvp $(srcdir)/setup/service $(DESTDIR)/$(pkglibdir) - $(MKDIR_P) $(DESTDIR)$(pkglibdir)/../system - cp -rvp $(srcdir)/setup/service/underpass.service $(DESTDIR)$(pkglibdir)/../system/ - -dist-hook: apidoc + @rsync -avr $(srcdir)/config $(DESTDIR)$(ETCDIR)/ + @rsync -avr $(srcdir)/setup $(DESTDIR)/$(pkglibdir) + @$(MKDIR_P) $(DESTDIR)$(pkglibdir)/../system + cp -rvu $(srcdir)/setup/service/underpass.service $(DESTDIR)$(pkglibdir)/../system/ + +dist-hook: $(MKDIR_P) $(DESTDIR)/$(docdir) + (cd docs && $(DOXYGEN)) cp -rvp docs/html $(DESTDIR)/$(docdir) if ENABLE_PCH @@ -330,7 +323,7 @@ revno.h: echo "#define BRANCH_NICK \"$${nick}\"" >> revno.h; \ echo "#define COMMIT_ID \"$${comm_id}\"" >> revno.h; \ echo "#define VERSION \"$(VERSION)\"" >> revno.h; \ - touch .lastmod; + touch .lastmod; \ fi .configline: revno.h diff --git a/dist/debian/changelog b/dist/debian/changelog new file mode 100644 index 00000000..dbb385d6 --- /dev/null +++ b/dist/debian/changelog @@ -0,0 +1,5 @@ +underpass (0.3) distro; urgency=low + + * local package. + + -- Rob Savoye (Rollinsville, CO) Thu, 04 Apr 2024 04:20:00 +0100 diff --git a/dist/debian/control b/dist/debian/control index 8814d707..64e22c18 100644 --- a/dist/debian/control +++ b/dist/debian/control @@ -28,46 +28,43 @@ Build-Depends: dpkg-dev (>= 1.13.19), debhelper (>= 7.0.0), autoconf, automake, libtool, autotools-dev, + libboost1.74-all-dev, libwebkit2gtk-4.0-dev, - libboost-dev (>= 1.69), - libboost-filesystem-dev (>= 1.69), - libboost-date-time-dev (>= 1.69), - libboost-iostreams-dev (>= 1.69), - libboost-thread-dev (>= 1.69), - libboost-locale-dev (>= 1.69), - libboost-log-dev (>= 1.69), - libboost-system-dev (>= 1.69), - libboost-timer-dev (>= 1.69), - libboost-chrono-dev (>= 1.69), - libboost-serialization-dev (>= 1.69), - libboost-python-dev (>= 1.69), libglibmm-2.4-dev | libglibmm-2.6-dev, libgdal-dev (>= 3.0), libgumbo-dev, libexpat1-dev, libosmium2-dev, - jemalloc, libjemalloc-dev, - bzip2, + libbz2-dev, openssl, - libpqxx-7.6, - libxml++2.6-dev | libxml++-3.0, - libpython3-dev + libpqxx-7.6 | libpqxx-dev, + libxml++2.6-dev | libxml++-3.0-dev, + libpython3-dev, + doxygen Package: underpass Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends}, - libboost-filesystem-dev (>= 1.69), - libboost-program-options-dev (>= 1.69), - libboost-locale-dev (>= 1.69), - libboost-iostreams-dev (>= 1.69), - libgdal28 | libgdal26, - libxml++2.6-dev | libxml++3.0-dev, - libpqxx-7.6, - bzip2, - openssl, - postgis Description: A daemon for processing OSM replication files. +Depends: ${shlibs:Depends}, ${misc:Depends}, + libboost-filesystem1.74.0, + libboost-program-options1.74.0, + libboost-locale1.74.0, + libboost-iostreams1.74.0, + libboost-date-time1.74.0, + libboost-locale1.74.0, + libboost-serialization1.74.0, + libboost-timer1.74.0, + libboost-system1.74.0, + libboost-log1.74.0, + libxml++2.6-2v5, + libjemalloc2, + libgumbo1, + bzip2, + openssl, + postgis, + libgdal26 | libgdal28 | libgdal31 | libgdal32 | libgdal33, + libpqxx-6.4 | libpqxx-7.8t64 # Package: underpass-dbg # Architecture: any diff --git a/dist/debian/deb.am b/dist/debian/deb.am index c40f8686..ec4d3d9c 100644 --- a/dist/debian/deb.am +++ b/dist/debian/deb.am @@ -34,7 +34,9 @@ DEB_BUILD_OPTIONS ?= $(shell echo $DEB_BUILD_OPTIONS) # the file editing to be done snapshot-deb: mv $(distdir) $(PACKAGE)-$(NOW) - cd $(PACKAGE)-$(NOW) ; \ - dpkg-buildpackage -rfakeroot -d -b + cd $(PACKAGE)-$(NOW) ; \ + $(LN_S) dist/debian .; \ + $(LN_S) $(srcdir)/config .; \ + dpkg-buildpackage -rfakeroot -d -b -uc -us .PHONY : deb snapshot-deb diff --git a/dist/debian/postinst b/dist/debian/postinst index 9a6e1133..717d19f9 100755 --- a/dist/debian/postinst +++ b/dist/debian/postinst @@ -1,6 +1,6 @@ -#!/bin/bash +#!/bin/bash # -# Copyright (c) 2020, 2021, 2023 Humanitarian OpenStreetMap Team +# Copyright (c) 2020, 2021, 2023, 2024 Humanitarian OpenStreetMap Team # # This file is part of Underpass. # @@ -33,7 +33,12 @@ prompt() { eval $1 echo "Database configuration for ${config['title']} " - echo "# Database configuration for ${config['title']}" >> /etc/default/underpass + if test -w /etc/default/; then + echo "# Database configuration for ${config['title']}" >> /etc/default/underpass + else + echo "ERROR: You don't have write permission to /etc/default/underpass! use sudo" + exit + fi for i in ${!config[@]}; do if test x"$i" == x"title" -o x"$i" == x"prefix"; then @@ -85,8 +90,8 @@ if [ "$1" = "configure" ]; then touch /etc/default/underpass fi - prompt "$(declare -p config)" - + declare -A config + # For the Galaxy OSM Stats database config['title']="Underpass" config['prefix']="UNDERPASS" diff --git a/dist/debian/rules b/dist/debian/rules index ae2ee862..9c79be27 100755 --- a/dist/debian/rules +++ b/dist/debian/rules @@ -29,14 +29,14 @@ configure: config-stamp config-stamp: dh_testdir @printf "\n == CONFIGURE ==\n\n" - dh_auto_configure -- CXXFLAGS="-std=c++17 -g -O0" CXX="ccache g++" LDFLAGS="-lbz2" + dh_auto_configure -- CXXFLAGS="-std=c++17 -g" CXX="ccache g++" LDFLAGS="-lbz2" touch $@ build: build-stamp build-stamp: configure dh_testdir @printf "\n == BUILD ==\n\n" - dh_auto_build -- CXXFLAGS="-std=c++17 -g -O0" + dh_auto_build -- CXXFLAGS="-std=c++17 -g" touch $@ clean: @@ -49,7 +49,9 @@ clean: install: build dh_testdir dh_testroot - dh_installdirs + dh_installdirs + dh_installchangelogs -XChangeLog + dh_installdocs @printf "\n == INSTALL ==\n\n" dh_auto_install --destdir=debian/underpass dh_systemd_enable @@ -63,6 +65,9 @@ binary binary-arch: install dh_testdir dh_testroot dh_installdirs + dh_compress + dh_makeshlibs + dh_shlibdeps dh_installdeb dh_installdebconf dh_installchangelogs -XChangeLog diff --git a/src/validate/Makefile.am b/src/validate/Makefile.am index b36ddbb5..a89218e9 100644 --- a/src/validate/Makefile.am +++ b/src/validate/Makefile.am @@ -51,8 +51,8 @@ AM_CPPFLAGS = \ -DETCDIR=\"$(ETCDIR)\" \ -DBOOST_LOCALE_HIDE_AUTO_PTR -install-data-hook: - $(MKDIR_P) $(DESTDIR)/$(pkglibdir) - cp -vp .libs/libunderpass.so $(DESTDIR)/$(pkglibdir) - $(MKDIR_P) $(DESTDIR)$(ETCDIR)/validate - cp -rvp $(top_srcdir)/config/validate/*.yaml $(DESTDIR)$(ETCDIR)/validate +# install-data-hook: +# $(MKDIR_P) $(DESTDIR)/$(pkglibdir) +# cp -vp .libs/libunderpass.so $(DESTDIR)/$(pkglibdir) +# $(MKDIR_P) $(DESTDIR)/$(pkglibdir)/config/validate +# cp -rvp $(top_srcdir)/config/validate/*.yaml $(DESTDIR)/$(pkglibdir)/config/validate \ No newline at end of file