Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[packaging] Fix local sensorfwd RPM builds
If scratchbox target has development packages required for building
hybris plugin packages, building of the main sensorfwd package fails
because unwanted files get copied under RPM BUILDROOT directory.
Apparently this happens because unconditionally executed build time
hybris availability check needed for Debian builds misfires.

Make execution of qtCompileTest(hybris) conditional and trigger it only
when making a Debian build.

Note: While this does fix the RPM build problems, I have no means to
verify whether Debian builds still work as expected.

Signed-off-by: Simo Piiroinen <simo.piiroinen@jollamobile.com>
  • Loading branch information
spiiroin committed May 24, 2018
1 parent d532d8c commit c62d356
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
2 changes: 1 addition & 1 deletion debian/rules
Expand Up @@ -48,7 +48,7 @@ configure-stamp: builddir
dh_testdir

# Add here commands to configure the package.
cd $(BUILD_DIR) && qmake $(QMAKECONFIG) CONFIG+="configs" "QMAKE_CXXFLAGS=$(CFLAGS)" "MAKE_DOCS=$(MAKE_DOCS)" ../$(PROJECT_NAME).pro
cd $(BUILD_DIR) && qmake $(QMAKECONFIG) CONFIG+="configs" CONFIG+="autohybris" "QMAKE_CXXFLAGS=$(CFLAGS)" "MAKE_DOCS=$(MAKE_DOCS)" ../$(PROJECT_NAME).pro
export LD_RUN_PATH=/usr/lib/sensord-qt5/

touch configure-stamp
Expand Down
16 changes: 14 additions & 2 deletions sensorfw.pro
@@ -1,5 +1,17 @@
load(configure)
qtCompileTest(hybris)
# RPM build: Hybris plugin has separate spec file that does:
# qmake CONFIG+=hybris
# And pro-file behavioral differences are handled via:
# contains(CONFIG,hybris) { ... }
#
# Debian builds: debian/rules triggers build time hybris check:
# qmake CONFIG+=autohybris
# And pro-file behavioral differences are handled via:
# config_hybris { ... }

contains(CONFIG,autohybris) {
load(configure)
qtCompileTest(hybris)
}

TEMPLATE = subdirs
CONFIG += ordered
Expand Down

0 comments on commit c62d356

Please sign in to comment.