Updates to Ubuntu package building process

Marble can't be static, so instead we build a shared library but give it a
different name so it can be installed in parallel with the "real"
libmarblewidget.so.

Also make sure that the correct libusb is installed so that Atomics Aquatics
dive computers are supported.

Fixes #782

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2014-12-10 12:39:27 -08:00
parent 4ee59bc1b7
commit c9f927d547
5 changed files with 19 additions and 14 deletions

View file

@ -17,7 +17,7 @@ Build-Depends: asciidoc,
automake, automake,
cmake, cmake,
dpkg-dev (>= 1.16.1.1), dpkg-dev (>= 1.16.1.1),
libusb-dev, libusb-1.0-0-dev,
dh-autoreconf, dh-autoreconf,
libz-dev, libz-dev,
libssl-dev, libssl-dev,

View file

@ -21,11 +21,15 @@ override_dh_auto_configure:
(cd libdivecomputer ; autoreconf --install ; ./configure ; make -j8 ) (cd libdivecomputer ; autoreconf --install ; ./configure ; make -j8 )
(mkdir libgit2/build ; cd libgit2/build ; cmake -DBUILD_SHARED_LIBS=OFF .. ; sed -i 's/.so$/.a/' CMakeCache.txt ; make -j8 ) (mkdir libgit2/build ; cd libgit2/build ; cmake -DBUILD_SHARED_LIBS=OFF .. ; sed -i 's/.so$/.a/' CMakeCache.txt ; make -j8 )
(mkdir marble-build ; cd marble-build ; \ (mkdir marble-build ; cd marble-build ; \
cmake -DQTONLY=ON -DBUILD_MARBLE_APPS=OFF -DBUILD_MARBLE_EXAMPLES=OFF -DBUILD_MARBLE_TESTS=OFF -DBUILD_MARBLE_TOOLS=OFF -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTING=OFF -DWITH_DESIGNER_PLUGIN=OFF -DBUILD_WITH_DBUS=OFF ../marble-source ; \ cmake -DQTONLY=ON -DQT5BUILD=ON \
-DBUILD_MARBLE_APPS=OFF -DBUILD_MARBLE_EXAMPLES=OFF \
-DBUILD_MARBLE_TESTS=OFF -DBUILD_MARBLE_TOOLS=OFF \
-DBUILD_TESTING=OFF -DWITH_DESIGNER_PLUGIN=OFF \
-DBUILD_WITH_DBUS=OFF ../marble-source ; \
make -j8 ; \ make -j8 ; \
mkdir include ; cd include ; for i in `find ../../marble-source -name \*.h` ; do ln -s $$i . ; echo ln -s $$i . ; done ; \ mkdir include ; cd include ; for i in `find ../../marble-source -name \*.h` ; do ln -s $$i . ; echo ln -s $$i . ; done ; \
ln -s . marble ) ln -s . marble )
qmake LIBDCDEVEL=./libdivecomputer LIBGIT2DEVEL=./libgit2 LIBGIT2STATIC=1 LIBMARBLEDEVEL=./marble-build LIBMARBLESTATIC=1 subsurface.pro qmake LIBDCDEVEL=./libdivecomputer LIBGIT2DEVEL=./libgit2 LIBGIT2STATIC=1 LIBMARBLEDEVEL=./marble-build SPECIAL_MARBLE_PREFIX=1 subsurface.pro
override_dh_installchangelogs: override_dh_installchangelogs:
dh_installchangelogs dh_installchangelogs
@ -34,4 +38,3 @@ override_dh_installchangelogs:
mkdir -p debian/subsurface/usr/share/doc/subsurface mkdir -p debian/subsurface/usr/share/doc/subsurface
cp Documentation/user-manual.txt 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 cp Documentation/user-manual.html debian/subsurface/usr/share/doc/subsurface/html

View file

@ -17,7 +17,7 @@ fi
mkdir subsurface_$VERSION mkdir subsurface_$VERSION
(cd subsurface ; tar cf - . ) | (cd subsurface_$VERSION ; tar xf - ) (cd subsurface ; tar cf - . ) | (cd subsurface_$VERSION ; tar xf - )
cd subsurface_$VERSION cd subsurface_$VERSION
rm -rf .git libdivecomputer/.git libgit2/.git rm -rf .git libdivecomputer/.git libgit2/.git marble-source/.git
echo $GITVERSION > .gitversion echo $GITVERSION > .gitversion
dh_make --email dirk@hohndel.org -c gpl2 --createorig --single --yes -p subsurface_$VERSION dh_make --email dirk@hohndel.org -c gpl2 --createorig --single --yes -p subsurface_$VERSION

View file

@ -156,18 +156,14 @@ contains(QMAKE_PLATFORM, android): DEFINES += NO_MARBLE NO_USERMANUAL NO_PRINTIN
!isEmpty(LIBMARBLEDEVEL) { !isEmpty(LIBMARBLEDEVEL) {
# find it next to our sources # find it next to our sources
INCLUDEPATH += $$LIBMARBLEDEVEL/include INCLUDEPATH += $$LIBMARBLEDEVEL/include
isEmpty(LIBMARBLESTATIC) { LIBS += -L$$LIBMARBLEDEVEL/lib
LIBS += -L$$LIBMARBLEDEVEL/lib
}
} }
!contains(DEFINES, NO_MARBLE) { !contains(DEFINES, NO_MARBLE) {
win32: CONFIG(debug, debug|release): LIBS += -lmarblewidgetd win32: CONFIG(debug, debug|release): LIBS += -lmarblewidgetd
else: { else: !isEmpty(SPECIAL_MARBLE_PREFIX) {
isEmpty(LIBMARBLESTATIC) { LIBS += -L$$LIBMARBLEDEVEL/src/lib/marble -lssrfmarblewidget
LIBS += -lmarblewidget } else {
} else { LIBS += -lmarblewidget
LIBS += $$LIBMARBLEDEVEL/src/lib/marble/libmarblewidget.a
}
} }
} }

View file

@ -165,6 +165,11 @@ mac {
target.path = /$(EXPORT_BINDIR) target.path = /$(EXPORT_BINDIR)
target.files = $$TARGET target.files = $$TARGET
!isEmpty(SPECIAL_MARBLE_PREFIX) {
ourmarble.path = /$(prefix)/lib
ourmarble.files = marble-build/src/lib/marble/libssrfmarblewidget.so*
}
desktop.path = /$(EXPORT_DESKTOPDIR) desktop.path = /$(EXPORT_DESKTOPDIR)
desktop.files = $$DESKTOP_FILE desktop.files = $$DESKTOP_FILE
manpage.path = /$(EXPORT_MANDIR) manpage.path = /$(EXPORT_MANDIR)
@ -183,6 +188,7 @@ mac {
translation.CONFIG += no_check_exist translation.CONFIG += no_check_exist
INSTALLS += target desktop manpage doc marbledir translation icon theme INSTALLS += target desktop manpage doc marbledir translation icon theme
!isEmpty(SPECIAL_MARBLE_PREFIX) : INSTALLS += ourmarble
install.target = install install.target = install
} }
!isEmpty(TRANSLATIONS) { !isEmpty(TRANSLATIONS) {