diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2017-10-16 04:54:53 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2017-10-16 04:54:53 -0700 |
commit | cbf5d788e07ace3896a50e7d57da7d1f2a9b44ab (patch) | |
tree | 77f3bae87d4f9d495cd092babbbfeff61085571b /packaging/ubuntu/debian | |
parent | 0b6fb4948900f3008e76a5feb55ad763f30fdada (diff) | |
download | subsurface-cbf5d788e07ace3896a50e7d57da7d1f2a9b44ab.tar.gz |
Update Ubuntu/Debian packaging
Part of this is based on code from Miika Turkia.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'packaging/ubuntu/debian')
-rw-r--r-- | packaging/ubuntu/debian/control | 11 | ||||
-rw-r--r-- | packaging/ubuntu/debian/copyright | 2 | ||||
-rwxr-xr-x | packaging/ubuntu/debian/rules | 75 |
3 files changed, 72 insertions, 16 deletions
diff --git a/packaging/ubuntu/debian/control b/packaging/ubuntu/debian/control index 62d16c2a0..a6947f13c 100644 --- a/packaging/ubuntu/debian/control +++ b/packaging/ubuntu/debian/control @@ -21,13 +21,22 @@ Build-Depends: asciidoc, dh-autoreconf, libz-dev, libssl-dev, + libssh2-1-dev, git, qttools5-dev-tools, qt5-qmake, libqt5svg5-dev, libqt5webkit5-dev, qtscript5-dev, - qt5-default + qttools5-dev, + qt5-default, + qtlocation5-dev, + qtpositioning5-dev, + qml-module-qtpositioning, + qml-module-qtlocation, + libcurl4-openssl-dev, + qtconnectivity5-dev, + libgrantlee5-dev Standards-Version: 3.9.5 Homepage: http://subsurface-divelog.org #Vcs-Git: git://git.debian.org/collab-maint/subsurface-4.2.90.git diff --git a/packaging/ubuntu/debian/copyright b/packaging/ubuntu/debian/copyright index 6e2433cdf..c759cd45d 100644 --- a/packaging/ubuntu/debian/copyright +++ b/packaging/ubuntu/debian/copyright @@ -7,7 +7,7 @@ Copyright: 2011-2017 Dirk Hohndel, Linus Torvalds, Tomaz Canabrava and others License: GPL-2.0 Files: debian/* -Copyright: 2012 Khalid El Fathi <khalid@elfathi.fr>, 2013-2014 Sylvestre Ledru <sylvestre@debian.org>, 2014-2015 Dirk Hohndel <dirk@hohndel.org> +Copyright: 2012 Khalid El Fathi <khalid@elfathi.fr>, 2013-2014 Sylvestre Ledru <sylvestre@debian.org>, 2014-2017 Dirk Hohndel <dirk@hohndel.org> License: GPL-2.0+ License: GPL-2.0 diff --git a/packaging/ubuntu/debian/rules b/packaging/ubuntu/debian/rules index 7a4696dfa..730b10b57 100755 --- a/packaging/ubuntu/debian/rules +++ b/packaging/ubuntu/debian/rules @@ -4,31 +4,71 @@ # Uncomment this to turn on verbose mode. export DH_VERBOSE=1 export DEB_BUILD_OPTIONS+=nocheck -export DEB_CMAKE_INSTALL_PREFIX=/usr +export DEB_BUILD+OPTIONS+="parallel=12" +export MY_INSTALL_ROOT=$(CURDIR)/install-root +export QTVERSION=$(shell qmake -query QT_VERSION) %: dh $@ --buildsystem=cmake --builddirectory=subsurface-build --parallel override_dh_auto_clean: (cd libdivecomputer ; make clean || true) - make clean || true + rm -f Documentation/user-manual.html + rm -f libdivecomputer/Makefile.in + rm -f libdivecomputer/aclocal.m4 + rm -f libdivecomputer/ar-lib + rm -f libdivecomputer/compile + rm -f libdivecomputer/config.guess + rm -f libdivecomputer/config.h.in + rm -f libdivecomputer/config.sub + rm -f libdivecomputer/configure + rm -f libdivecomputer/depcomp + rm -f libdivecomputer/examples/Makefile.in + rm -f libdivecomputer/include/Makefile.in + rm -f libdivecomputer/include/libdivecomputer/Makefile.in + rm -f libdivecomputer/install-sh + rm -f libdivecomputer/ltmain.sh + rm -f libdivecomputer/m4/libtool.m4 + rm -f libdivecomputer/m4/ltoptions.m4 + rm -f libdivecomputer/m4/ltsugar.m4 + rm -f libdivecomputer/m4/ltversion.m4 + rm -f libdivecomputer/m4/lt~obsolete.m4 + rm -f libdivecomputer/missing + rm -f libdivecomputer/src/Makefile.in + rm -rf install-root rm -rf libgit2/build - rm -f ssrf-version.h - rm -f subsurface - rm -f Makefile + rm -rf googlemaps/build + rm -rf subsurface-build override_dh_auto_configure: - (cd libdivecomputer ; autoreconf --install ; ./configure --disable-shared ; make -j8 ) + mkdir -p install-root + (mkdir -p googlemaps/build ; cd googlemaps/build ; \ + qmake "INCLUDEPATH=../../QtHeaders/$(QTVERSION)/include" ../googlemaps.pro ; \ + rm -rf $(QTLOC_GIT) > /dev/null 2>&1 ; \ + make -j8 ; \ + INSTALL_ROOT=$(MY_INSTALL_ROOT) make install ; \ + ln -sf $(MY_INSTALL_ROOT)/usr/lib/x86_64-linux-gnu/qt5/plugins/geoservices/*.so $(MY_INSTALL_ROOT)) + (cd libdivecomputer ; \ + autoreconf --install ; \ + ./configure --disable-examples --prefix=$(MY_INSTALL_ROOT) --disable-shared ; \ + make -j8 ; \ + make install) (mkdir libgit2/build ; cd libgit2/build ; \ - cmake -DBUILD_SHARED_LIBS=OFF -DBUILD_CLAR=OFF -DBUILD_EXAMPLES=OFF .. ; \ - sed -i 's/.so$/.a/' CMakeCache.txt ; make -j8 ) - (mkdir subsurface-build ; cd subsurface-build ; \ + cmake -DCMAKE_INSTALL_PREFIX=$(MY_INSTALL_ROOT) -DBUILD_SHARED_LIBS=OFF -DBUILD_CLAR=OFF -DBUILD_EXAMPLES=OFF .. ; \ + make -j8 ; \ + make install) + (mkdir subsurface-build ; cd subsurface-build ; \ cmake -DCMAKE_BUILD_TYPE=Release \ - -DPREFER_GIT_FROMSOURCE=1 \ - -DLIBGIT2_INCLUDE_DIR=$$(pwd)/../libgit2/include \ - -DLIBGIT2_LIBRARIES=$$(pwd)/../libgit2/build/libgit2.a \ - -DLIBDIVECOMPUTER_INCLUDE_DIR=$$(pwd)/../libdivecomputer/include \ - -DLIBDIVECOMPUTER_LIBRARIES=$$(pwd)/../libdivecomputer/src/.libs/libdivecomputer.a \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DLIBGIT2_INCLUDE_DIR=$(MY_INSTALL_ROOT)/include \ + -DLIBGIT2_LIBRARIES=$(MY_INSTALL_ROOT)/lib/libgit2.a \ + -DLIBDIVECOMPUTER_INCLUDE_DIR=$(MY_INSTALL_ROOT)/include \ + -DLIBDIVECOMPUTER_LIBRARIES=$(MY_INSTALL_ROOT)/lib/libdivecomputer.a \ + -DUSE_LIBGIT23_API=1 \ + -DFORCE_LIBSSH=1 \ + -DNO_PRINTING=OFF \ + -DMAKE_TESTS=OFF \ + -DNO_MARBLE=ON \ $$(pwd)/.. ; ) override_dh_installchangelogs: @@ -38,3 +78,10 @@ override_dh_installchangelogs: mkdir -p debian/subsurface/usr/share/doc/subsurface cp Documentation/user-manual.txt debian/subsurface/usr/share/doc/subsurface/ cp Documentation/user-manual.html debian/subsurface/usr/share/doc/subsurface/html + +override_dh_auto_build: + (cd subsurface-build ; make -j8) + +override_dh_auto_install: + (cd subsurface-build ; DESTDIR=$(CURDIR)/debian/subsurface $(MAKE) install) + (cd googlemaps/build ; INSTALL_ROOT=$(CURDIR)/debian/subsurface $(MAKE) install) |