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
|
|
|
|
export DEB_CMAKE_INSTALL_PREFIX=/usr
|
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)
|
|
|
|
make clean || true
|
|
|
|
rm -rf libgit2/build
|
|
|
|
rm -f ssrf-version.h
|
|
|
|
rm -f subsurface
|
|
|
|
rm -f Makefile
|
|
|
|
|
|
|
|
override_dh_auto_configure:
|
2014-12-15 20:08:05 +00:00
|
|
|
(cd libdivecomputer ; autoreconf --install ; ./configure --disable-shared ; make -j8 )
|
|
|
|
(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 )
|
2015-04-06 18:40:52 +00:00
|
|
|
(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 \
|
|
|
|
$$(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
|