2014-12-02 00:00:47 +00:00
|
|
|
#!/usr/bin/make -f
|
|
|
|
# -*- makefile -*-
|
|
|
|
|
|
|
|
# Uncomment this to turn on verbose mode.
|
|
|
|
export DH_VERBOSE=1
|
2015-04-06 18:40:52 +00:00
|
|
|
export DEB_BUILD_OPTIONS+=nocheck
|
2017-10-16 11:54:53 +00:00
|
|
|
export DEB_BUILD+OPTIONS+="parallel=12"
|
|
|
|
export MY_INSTALL_ROOT=$(CURDIR)/install-root
|
|
|
|
export QTVERSION=$(shell qmake -query QT_VERSION)
|
2014-12-02 00:00:47 +00:00
|
|
|
|
|
|
|
%:
|
2015-04-06 18:40:52 +00:00
|
|
|
dh $@ --buildsystem=cmake --builddirectory=subsurface-build --parallel
|
2014-12-02 00:00:47 +00:00
|
|
|
|
|
|
|
override_dh_auto_clean:
|
|
|
|
(cd libdivecomputer ; make clean || true)
|
2017-10-16 11:54:53 +00:00
|
|
|
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
|
2014-12-02 00:00:47 +00:00
|
|
|
rm -rf libgit2/build
|
2017-10-16 11:54:53 +00:00
|
|
|
rm -rf googlemaps/build
|
|
|
|
rm -rf subsurface-build
|
2014-12-02 00:00:47 +00:00
|
|
|
|
|
|
|
override_dh_auto_configure:
|
2017-10-16 11:54:53 +00:00
|
|
|
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)
|
2014-12-15 20:08:05 +00:00
|
|
|
(mkdir libgit2/build ; cd libgit2/build ; \
|
2017-10-16 11:54:53 +00:00
|
|
|
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 ; \
|
2015-04-06 18:40:52 +00:00
|
|
|
cmake -DCMAKE_BUILD_TYPE=Release \
|
2017-10-16 11:54:53 +00:00
|
|
|
-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 \
|
2015-04-06 18:40:52 +00:00
|
|
|
$$(pwd)/.. ; )
|
2014-12-02 00:00:47 +00:00
|
|
|
|
|
|
|
override_dh_installchangelogs:
|
|
|
|
dh_installchangelogs
|
2014-12-17 20:45:45 +00:00
|
|
|
dh_installchangelogs ReleaseNotes/ReleaseNotes.txt
|
2014-12-02 00:00:47 +00:00
|
|
|
txt2html Documentation/user-manual.txt > Documentation/user-manual.html
|
|
|
|
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
|
2017-10-16 11:54:53 +00:00
|
|
|
|
|
|
|
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)
|