From 2d48d657b6b4649df9d6a320089007d116fd331c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20W=C3=A4ckerlin?= Date: Sun, 20 Sep 2015 13:13:27 +0000 Subject: [PATCH] build for cordova an android is now optional, only if tools are available --- configure.ac | 5 ++++- cordova/makefile.am | 2 ++ debian/control.in | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index be991b2..3beb1ef 100644 --- a/configure.ac +++ b/configure.ac @@ -29,9 +29,12 @@ AX_BUILD_HTML #AX_CHECK_QT([QT], [QtCore QtGui QtNetwork], [QtWidgets]) #AX_QT_NO_KEYWORDS +AC_CHECK_PROG(CORDOVA, [cordova android], [yes], [no], + [${PATH}${PATH_SEPARATOR}${ANDROID_HOME}/tools]) +AM_CONDITIONAL(CORDOVA, [test ${CORDOVA} = "yes"]) AC_CONFIG_FILES([html/index.html]) -AC_CONFIG_FILES([cordova/config.xml]) AC_CONFIG_FILES([cordova/makefile]) +AC_CONFIG_FILES([cordova/config.xml]) # create output AC_OUTPUT diff --git a/cordova/makefile.am b/cordova/makefile.am index 7f542f6..74ccdb7 100644 --- a/cordova/makefile.am +++ b/cordova/makefile.am @@ -8,8 +8,10 @@ EXTRA_DIST = config.xml.in ${cordova_sources} ANDROID = safechat.apk #ANDROID_SRC = platforms/android/build/outputs/apk/android-release-unsigned.apk ANDROID_SRC = platforms/android/build/outputs/apk/android-debug.apk +if CORDOVA wwwdir = ${pkgdatadir}/html www_DATA = ${ANDROID} +endif ${ANDROID_SRC}: for file in ${cordova_sources}; do \ diff --git a/debian/control.in b/debian/control.in index 8f60803..5ce51c6 100644 --- a/debian/control.in +++ b/debian/control.in @@ -1,7 +1,7 @@ Source: @PACKAGE_NAME@ Priority: extra Maintainer: @AUTHOR@ -Build-Depends: debhelper, pkg-config, autotools-dev, lsb-release +Build-Depends: debhelper, pkg-config, autotools-dev, lsb-release Package: @PACKAGE_NAME@ Section: web