fixes for cordova
This commit is contained in:
18
configure.ac
18
configure.ac
@@ -30,10 +30,20 @@ AX_BUILD_TEST
|
|||||||
#AX_CHECK_QT([QT], [QtCore QtGui QtNetwork], [QtWidgets])
|
#AX_CHECK_QT([QT], [QtCore QtGui QtNetwork], [QtWidgets])
|
||||||
#AX_QT_NO_KEYWORDS
|
#AX_QT_NO_KEYWORDS
|
||||||
|
|
||||||
AC_CHECK_PROG(ANDROID, [android], [1], [0],
|
AC_PATH_PROG(ANDROID, [android], [0],
|
||||||
[${PATH}${PATH_SEPARATOR}${ANDROID_HOME}/tools])
|
[${PATH}${PATH_SEPARATOR}${ANDROID_HOME}/tools])
|
||||||
AC_CHECK_PROG(CORDOVA, [cordova], [1], [0])
|
AC_PATH_PROG(CORDOVA, [cordova], [0],
|
||||||
AM_CONDITIONAL(CORDOVA, [test ${CORDOVA} -eq 1 -a ${ANDROID} -eq 1])
|
[${PATH}${PATH_SEPARATOR}$(pwd)/node_modules/cordova/bin])
|
||||||
|
if test ${CORDOVA} = 0; then
|
||||||
|
AC_CHECK_PROG(NODE_NPM, [npm node], [1], [0])
|
||||||
|
if test ${NODE_NPM} -eq 1; then
|
||||||
|
if npm install cordova; then
|
||||||
|
AC_PATH_PROG(CORDOVA, [cordova], [0],
|
||||||
|
[${PATH}${PATH_SEPARATOR}$(pwd)/node_modules/cordova/bin])
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
AM_CONDITIONAL(HAVE_CORDOVA, [test ${CORDOVA} != 0 -a ${ANDROID} != 0])
|
||||||
AX_SUBST(CORDOVA)
|
AX_SUBST(CORDOVA)
|
||||||
|
|
||||||
AC_CONFIG_FILES([html/index.html])
|
AC_CONFIG_FILES([html/index.html])
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ EXTRA_DIST = config.xml.in ${cordova_sources}
|
|||||||
ANDROID = safechat.apk
|
ANDROID = safechat.apk
|
||||||
#ANDROID_SRC = platforms/android/build/outputs/apk/android-release-unsigned.apk
|
#ANDROID_SRC = platforms/android/build/outputs/apk/android-release-unsigned.apk
|
||||||
ANDROID_SRC = platforms/android/build/outputs/apk/android-debug.apk
|
ANDROID_SRC = platforms/android/build/outputs/apk/android-debug.apk
|
||||||
if CORDOVA
|
if HAVE_CORDOVA
|
||||||
wwwdir = ${pkgdatadir}/html
|
wwwdir = ${pkgdatadir}/html
|
||||||
www_DATA = ${ANDROID}
|
www_DATA = ${ANDROID}
|
||||||
endif
|
endif
|
||||||
@@ -20,8 +20,8 @@ ${ANDROID_SRC}:
|
|||||||
chmod -R u+w "$${file}" ); \
|
chmod -R u+w "$${file}" ); \
|
||||||
done
|
done
|
||||||
if [ "$$(whoami)" != "root" ]; then \
|
if [ "$$(whoami)" != "root" ]; then \
|
||||||
cordova plugin add https://github.com/katzer/cordova-plugin-background-mode.git; \
|
${CORDOVA} plugin add https://github.com/katzer/cordova-plugin-background-mode.git; \
|
||||||
cordova build --debug || cordova build --debug; \
|
${CORDOVA} build --debug || ${CORDOVA} build --debug; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
${ANDROID}: ${ANDROID_SRC}
|
${ANDROID}: ${ANDROID_SRC}
|
||||||
|
|||||||
2
debian/control.in
vendored
2
debian/control.in
vendored
@@ -1,7 +1,7 @@
|
|||||||
Source: @PACKAGE_NAME@
|
Source: @PACKAGE_NAME@
|
||||||
Priority: extra
|
Priority: extra
|
||||||
Maintainer: @AUTHOR@
|
Maintainer: @AUTHOR@
|
||||||
Build-Depends: debhelper, subversion, pkg-config, automake, libtool, autotools-dev, lsb-release, doxygen, graphviz, mscgen, npm, nodejs
|
Build-Depends: debhelper, subversion, pkg-config, automake, libtool, autotools-dev, lsb-release, doxygen, graphviz, mscgen, npm, node
|
||||||
|
|
||||||
Package: @PACKAGE_NAME@
|
Package: @PACKAGE_NAME@
|
||||||
Section: web
|
Section: web
|
||||||
|
|||||||
Reference in New Issue
Block a user