updated build system
This commit is contained in:
		
							
								
								
									
										22
									
								
								ChangeLog
									
									
									
									
									
								
							
							
						
						
									
										22
									
								
								ChangeLog
									
									
									
									
									
								
							@@ -1,3 +1,25 @@
 | 
				
			|||||||
 | 
					2015-11-03 22:02  marc
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						* AUTHORS, ax_check_qt.m4, ax_init_standard_project.m4,
 | 
				
			||||||
 | 
						  bootstrap.sh, configure.ac,
 | 
				
			||||||
 | 
						  cordova/platforms/android/AndroidManifest.xml,
 | 
				
			||||||
 | 
						  cordova/platforms/android/res/xml/config.xml, html/functions.php,
 | 
				
			||||||
 | 
						  html/login.php, html/messagetable.php, html/pubkey.php,
 | 
				
			||||||
 | 
						  html/safechat.js, html/send.php, html/usertable.php, makefile.am,
 | 
				
			||||||
 | 
						  resolve-rpmbuilddeps.sh, safechat.spec.in, scripts,
 | 
				
			||||||
 | 
						  scripts/makefile.am: AUTHOR updated to new homepage
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					2015-09-25 05:58  marc
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						* html/login.php: typo
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					2015-09-24 21:47  marc
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						* ChangeLog, cordova/makefile.am, html/index.html.in,
 | 
				
			||||||
 | 
						  html/login.php, html/newuser.html, html/safechat.css,
 | 
				
			||||||
 | 
						  html/safechat.js: better welcome page;
 | 
				
			||||||
 | 
						  password-forgotten-feature; refs #32
 | 
				
			||||||
 | 
					
 | 
				
			||||||
2015-09-22 18:09  marc
 | 
					2015-09-22 18:09  marc
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	* ChangeLog, cordova/config.xml.in,
 | 
						* ChangeLog, cordova/config.xml.in,
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -103,7 +103,12 @@ AC_DEFUN([AX_CHECK_QT], [
 | 
				
			|||||||
    HAVE_$1=1
 | 
					    HAVE_$1=1
 | 
				
			||||||
    AC_DEFINE([HAVE_$1])
 | 
					    AC_DEFINE([HAVE_$1])
 | 
				
			||||||
    QTDIR=$(${PKG_CONFIG} --variable=prefix Qt5Core)
 | 
					    QTDIR=$(${PKG_CONFIG} --variable=prefix Qt5Core)
 | 
				
			||||||
 | 
					    qt_host_bins=$(${PKG_CONFIG} --variable=host_bins Qt5Core)
 | 
				
			||||||
 | 
					    if test -d "${qt_host_bins}"; then
 | 
				
			||||||
 | 
					      QT_PLUGIN_PATH=${qt_host_bins}/../plugins
 | 
				
			||||||
 | 
					    else
 | 
				
			||||||
      QT_PLUGIN_PATH=${QTDIR}/share/qt5/plugins
 | 
					      QT_PLUGIN_PATH=${QTDIR}/share/qt5/plugins
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
    MOC_FLAGS+=" -DHAVE_$1=1 ${[$1]5_CFLAGS}"
 | 
					    MOC_FLAGS+=" -DHAVE_$1=1 ${[$1]5_CFLAGS}"
 | 
				
			||||||
    [$1]_CPPFLAGS="${[$1]5_CFLAGS}"
 | 
					    [$1]_CPPFLAGS="${[$1]5_CFLAGS}"
 | 
				
			||||||
    [$1]_CXXFLAGS="${[$1]5_CFLAGS}"
 | 
					    [$1]_CXXFLAGS="${[$1]5_CFLAGS}"
 | 
				
			||||||
@@ -145,7 +150,12 @@ AC_DEFUN([AX_CHECK_QT], [
 | 
				
			|||||||
      HAVE_$1=1
 | 
					      HAVE_$1=1
 | 
				
			||||||
      AC_DEFINE([HAVE_$1])
 | 
					      AC_DEFINE([HAVE_$1])
 | 
				
			||||||
      QTDIR=$(${PKG_CONFIG} --variable=prefix QtCore)
 | 
					      QTDIR=$(${PKG_CONFIG} --variable=prefix QtCore)
 | 
				
			||||||
 | 
					      qt_host_bins=$(${PKG_CONFIG} --variable=host_bins QtCore)
 | 
				
			||||||
 | 
					      if test -d "${qt_host_bins}"; then
 | 
				
			||||||
 | 
					        QT_PLUGIN_PATH=${qt_host_bins}/../plugins
 | 
				
			||||||
 | 
					      else
 | 
				
			||||||
        QT_PLUGIN_PATH=${QTDIR}/share/qt/plugins
 | 
					        QT_PLUGIN_PATH=${QTDIR}/share/qt/plugins
 | 
				
			||||||
 | 
					      fi
 | 
				
			||||||
      MOC_FLAGS+=" -DHAVE_$1=1 ${$1_CFLAGS}"
 | 
					      MOC_FLAGS+=" -DHAVE_$1=1 ${$1_CFLAGS}"
 | 
				
			||||||
      [$1]_CPPFLAGS="${[$1]_CFLAGS}"
 | 
					      [$1]_CPPFLAGS="${[$1]_CFLAGS}"
 | 
				
			||||||
      [$1]_CXXFLAGS="${[$1]_CFLAGS}"
 | 
					      [$1]_CXXFLAGS="${[$1]_CFLAGS}"
 | 
				
			||||||
@@ -188,6 +198,16 @@ AC_DEFUN([AX_CHECK_QT], [
 | 
				
			|||||||
  if test -n "${MINGW}"; then
 | 
					  if test -n "${MINGW}"; then
 | 
				
			||||||
    AX_CHECK_VALID_CXX_FLAG([-Wl,-subsystem,windows], [windows console flag])
 | 
					    AX_CHECK_VALID_CXX_FLAG([-Wl,-subsystem,windows], [windows console flag])
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
 | 
					  test "x$prefix" = xNONE && prefix=$ac_default_prefix
 | 
				
			||||||
 | 
					  if test "${QT_PLUGIN_PATH}" = "${QT_PLUGIN_PATH#${prefix}}"; then
 | 
				
			||||||
 | 
					    QT_PLUGIN_PATH=${prefix}${QT_PLUGIN_PATH#/usr}
 | 
				
			||||||
 | 
					  fi
 | 
				
			||||||
 | 
					  AC_ARG_WITH([qt-plugin-path],
 | 
				
			||||||
 | 
					              [AS_HELP_STRING([--with-qt-plugin-path=PATH],
 | 
				
			||||||
 | 
					                              [define a different qt plugin path, current @<:@default=check@:>@])],
 | 
				
			||||||
 | 
					              [QT_PLUGIN_PATH=$with_qt_plugin_path],
 | 
				
			||||||
 | 
					              [])
 | 
				
			||||||
 | 
					  AC_MSG_NOTICE([Qt Plugins are installed to ${QT_PLUGIN_PATH}])
 | 
				
			||||||
  AC_SUBST(QTDIR)
 | 
					  AC_SUBST(QTDIR)
 | 
				
			||||||
  AC_SUBST(QT_PLUGIN_PATH)
 | 
					  AC_SUBST(QT_PLUGIN_PATH)
 | 
				
			||||||
  AC_SUBST(CPPFLAGS)
 | 
					  AC_SUBST(CPPFLAGS)
 | 
				
			||||||
@@ -214,10 +234,10 @@ qrc_%.cxx: %.qrc
 | 
				
			|||||||
%.qm: %.ts
 | 
					%.qm: %.ts
 | 
				
			||||||
	${LRELEASE} $< -qm [$][@]
 | 
						${LRELEASE} $< -qm [$][@]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#%.ts: ${LANGUAGE_FILES:%=%}
 | 
					%.ts: ${LANGUAGE_FILES:%=%}
 | 
				
			||||||
#	${LUPDATE} -no-obsolete \
 | 
						${LUPDATE} -no-obsolete \
 | 
				
			||||||
#	           -target-language ${@:${LANGUAGE_FILE_BASE}_%.ts=%} \
 | 
						           -target-language ${@:${LANGUAGE_FILE_BASE}_%.ts=%} \
 | 
				
			||||||
#	           -ts [$][@] $<
 | 
						           -ts [$][@] $<
 | 
				
			||||||
 | 
					
 | 
				
			||||||
'])
 | 
					'])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -265,14 +265,8 @@ maintainer-clean-cxx-targets:
 | 
				
			|||||||
EOF
 | 
					EOF
 | 
				
			||||||
])
 | 
					])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# use this in configure.ac to support CppUnit for C++ unit tests
 | 
					# use this in configure.ac to support tests without CppUnit
 | 
				
			||||||
AC_DEFUN([AX_USE_CPPUNIT], [
 | 
					AC_DEFUN([AX_BUILD_TEST], [
 | 
				
			||||||
  AM_PATH_CPPUNIT([1.0.0], [have_cppunit="yes"], [have_cppunit="no"])
 | 
					 | 
				
			||||||
  # infos and warnings
 | 
					 | 
				
			||||||
  if test "$have_cppunit" = "no"; then
 | 
					 | 
				
			||||||
    AC_MSG_WARN([Missing cppunit development library!
 | 
					 | 
				
			||||||
     - you cannot check the library using "make check"
 | 
					 | 
				
			||||||
     - everything else works perfectly]); fi
 | 
					 | 
				
			||||||
  AC_CONFIG_FILES([test/makefile])
 | 
					  AC_CONFIG_FILES([test/makefile])
 | 
				
			||||||
  AX_ADD_MAKEFILE_TARGET_DEP([maintainer-clean-am], [maintainer-clean-test-targets], [test/makefile.in])
 | 
					  AX_ADD_MAKEFILE_TARGET_DEP([maintainer-clean-am], [maintainer-clean-test-targets], [test/makefile.in])
 | 
				
			||||||
  test -f test/makefile.in && cat >> test/makefile.in <<EOF
 | 
					  test -f test/makefile.in && cat >> test/makefile.in <<EOF
 | 
				
			||||||
@@ -283,6 +277,17 @@ maintainer-clean-test-targets:
 | 
				
			|||||||
EOF
 | 
					EOF
 | 
				
			||||||
])
 | 
					])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# use this in configure.ac to support CppUnit for C++ unit tests
 | 
				
			||||||
 | 
					AC_DEFUN([AX_USE_CPPUNIT], [
 | 
				
			||||||
 | 
					  AM_PATH_CPPUNIT([1.0.0], [have_cppunit="yes"], [have_cppunit="no"])
 | 
				
			||||||
 | 
					  # infos and warnings
 | 
				
			||||||
 | 
					  if test "$have_cppunit" = "no"; then
 | 
				
			||||||
 | 
					    AC_MSG_WARN([Missing cppunit development library!
 | 
				
			||||||
 | 
					     - you cannot check the project using "make check"
 | 
				
			||||||
 | 
					     - everything else works perfectly]); fi
 | 
				
			||||||
 | 
					  AX_BUILD_TEST
 | 
				
			||||||
 | 
					])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# use this in configure.ac to support C++ examples
 | 
					# use this in configure.ac to support C++ examples
 | 
				
			||||||
AC_DEFUN([AX_BUILD_EXAMPLES], [
 | 
					AC_DEFUN([AX_BUILD_EXAMPLES], [
 | 
				
			||||||
  AC_CONFIG_FILES([examples/makefile])
 | 
					  AC_CONFIG_FILES([examples/makefile])
 | 
				
			||||||
@@ -696,3 +701,15 @@ AC_DEFUN([AX_CHECK_VALID_LD_FLAG], [
 | 
				
			|||||||
  AC_SUBST(LDFLAGS)
 | 
					  AC_SUBST(LDFLAGS)
 | 
				
			||||||
  AC_MSG_RESULT([$newflag in $LDFLAGS])
 | 
					  AC_MSG_RESULT([$newflag in $LDFLAGS])
 | 
				
			||||||
])
 | 
					])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Check if a package exists in the current distribution, if yes, require it
 | 
				
			||||||
 | 
					# in debian/control.in append @DEB_DEPEND_IFEXISTS@ to Build-Depends
 | 
				
			||||||
 | 
					#  - parameter:
 | 
				
			||||||
 | 
					#     $1 = package name
 | 
				
			||||||
 | 
					AC_DEFUN([AX_DEB_DEPEND_IFEXISTS], [
 | 
				
			||||||
 | 
					  pkg=$1
 | 
				
			||||||
 | 
					  if test -n "$(apt-cache policy -q ${pkg} 2> /dev/null)"; then
 | 
				
			||||||
 | 
					     DEB_DEPEND_IFEXISTS+=", ${pkg}"
 | 
				
			||||||
 | 
					  fi
 | 
				
			||||||
 | 
					  AC_SUBST(DEB_DEPEND_IFEXISTS)
 | 
				
			||||||
 | 
					])
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										159
									
								
								bootstrap.sh
									
									
									
									
									
								
							
							
						
						
									
										159
									
								
								bootstrap.sh
									
									
									
									
									
								
							@@ -19,6 +19,7 @@ PROJECT_PATH=$(pwd)
 | 
				
			|||||||
DEFAULT_PROJECT_NAME=${PROJECT_PATH##*/}
 | 
					DEFAULT_PROJECT_NAME=${PROJECT_PATH##*/}
 | 
				
			||||||
configure=0
 | 
					configure=0
 | 
				
			||||||
build=0
 | 
					build=0
 | 
				
			||||||
 | 
					docker=0
 | 
				
			||||||
buildtarget="distcheck"
 | 
					buildtarget="distcheck"
 | 
				
			||||||
overwrite=0
 | 
					overwrite=0
 | 
				
			||||||
rebuild=0
 | 
					rebuild=0
 | 
				
			||||||
@@ -26,6 +27,7 @@ rebuildfiles=()
 | 
				
			|||||||
while test $# -gt 0; do
 | 
					while test $# -gt 0; do
 | 
				
			||||||
    case "$1" in
 | 
					    case "$1" in
 | 
				
			||||||
        (--configure|-c) configure=1;;
 | 
					        (--configure|-c) configure=1;;
 | 
				
			||||||
 | 
					        (--docker|-d) docker=1;;
 | 
				
			||||||
        (--build|-b) configure=1; build=1;;
 | 
					        (--build|-b) configure=1; build=1;;
 | 
				
			||||||
        (--target|-t) shift; configure=1; build=1; buildtarget="$1";;
 | 
					        (--target|-t) shift; configure=1; build=1; buildtarget="$1";;
 | 
				
			||||||
        (--overwrite|-o) overwrite=1;;
 | 
					        (--overwrite|-o) overwrite=1;;
 | 
				
			||||||
@@ -42,6 +44,7 @@ SYNOPSIS
 | 
				
			|||||||
OPTIONS
 | 
					OPTIONS
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  --configure, -c            call ./configure after initialization
 | 
					  --configure, -c            call ./configure after initialization
 | 
				
			||||||
 | 
					  --docker, -d               build and run tests in a docker instance
 | 
				
			||||||
  --build, -b                build, also call ./configure && make distcheck
 | 
					  --build, -b                build, also call ./configure && make distcheck
 | 
				
			||||||
  --target, -t <target>      same as -b, but specify target instead of distcheck
 | 
					  --target, -t <target>      same as -b, but specify target instead of distcheck
 | 
				
			||||||
  --overwrite, -o            overwrite all basic files (bootstrap.sh, m4-macros)
 | 
					  --overwrite, -o            overwrite all basic files (bootstrap.sh, m4-macros)
 | 
				
			||||||
@@ -105,6 +108,7 @@ GENERATED FILES
 | 
				
			|||||||
    * ax_check_qt.m4 - auxiliary macro definition file
 | 
					    * ax_check_qt.m4 - auxiliary macro definition file
 | 
				
			||||||
    * resolve-debbuilddeps.sh - script to install debian package dependencies
 | 
					    * resolve-debbuilddeps.sh - script to install debian package dependencies
 | 
				
			||||||
    * resolve-rpmbuilddeps.sh - script to install RPM package dependencies
 | 
					    * resolve-rpmbuilddeps.sh - script to install RPM package dependencies
 | 
				
			||||||
 | 
					    * build-in-docker.sh - script to build the project encapsulated in a docker container
 | 
				
			||||||
    * build-resource-file.sh - build resource.qrc file from a resource directory
 | 
					    * build-resource-file.sh - build resource.qrc file from a resource directory
 | 
				
			||||||
    * mac-create-app-bundle.sh - script to create apple mac os-x app-bundle
 | 
					    * mac-create-app-bundle.sh - script to create apple mac os-x app-bundle
 | 
				
			||||||
    * AUTHORS - replace your name in AUTHORS before first run
 | 
					    * AUTHORS - replace your name in AUTHORS before first run
 | 
				
			||||||
@@ -119,7 +123,7 @@ GENERATED FILES
 | 
				
			|||||||
    * scripts/makefile.in - if you enabled AX_USE_SCRIPTS
 | 
					    * scripts/makefile.in - if you enabled AX_USE_SCRIPTS
 | 
				
			||||||
    * doc/makefile.am - if you enabled AX_USE_DOXYGEN
 | 
					    * doc/makefile.am - if you enabled AX_USE_DOXYGEN
 | 
				
			||||||
    * doc/doxyfile.in - if you enabled AX_USE_DOXYGEN
 | 
					    * doc/doxyfile.in - if you enabled AX_USE_DOXYGEN
 | 
				
			||||||
    * test/makefile.am - if you enabled AX_USE_CPPUNIT
 | 
					    * test/makefile.am - if you enabled AX_BUILD_TEST or AX_USE_CPPUNIT
 | 
				
			||||||
    * examples/makefile.am - if you enabled AX_BUILD_EXAMPLES
 | 
					    * examples/makefile.am - if you enabled AX_BUILD_EXAMPLES
 | 
				
			||||||
    * debian/changelog.in - if you enabled AX_USE_DEBIAN_PACKAGING
 | 
					    * debian/changelog.in - if you enabled AX_USE_DEBIAN_PACKAGING
 | 
				
			||||||
    * debian/control.in - if you enabled AX_USE_DEBIAN_PACKAGING
 | 
					    * debian/control.in - if you enabled AX_USE_DEBIAN_PACKAGING
 | 
				
			||||||
@@ -170,7 +174,7 @@ FILE DEPENDENCIES
 | 
				
			|||||||
    * test/makefile.am depends on AX_USE_LIBTOOL
 | 
					    * test/makefile.am depends on AX_USE_LIBTOOL
 | 
				
			||||||
    * html/makefile.am depends on AX_BUILD_HTML
 | 
					    * html/makefile.am depends on AX_BUILD_HTML
 | 
				
			||||||
    * doc/doxyfile.in depends on AX_BUILD_EXAMPLES
 | 
					    * doc/doxyfile.in depends on AX_BUILD_EXAMPLES
 | 
				
			||||||
    * debian/control.in depends on AX_USE_DOXYGEN, AX_USE_CPPUNIT,
 | 
					    * debian/control.in depends on AX_USE_DOXYGEN, AX_USE_CPPUNIT
 | 
				
			||||||
      AX_CXX_QT, AX_CHECK_QT, AX_REQUIRE_QT, AX_USE_LIBTOOL
 | 
					      AX_CXX_QT, AX_CHECK_QT, AX_REQUIRE_QT, AX_USE_LIBTOOL
 | 
				
			||||||
    * debian/${DEFAULT_PROJECT_NAME}.install depends on AX_USE_LIBTOOL
 | 
					    * debian/${DEFAULT_PROJECT_NAME}.install depends on AX_USE_LIBTOOL
 | 
				
			||||||
    * debian/${DEFAULT_PROJECT_NAME}.dirs depends on AX_USE_LIBTOOL
 | 
					    * debian/${DEFAULT_PROJECT_NAME}.dirs depends on AX_USE_LIBTOOL
 | 
				
			||||||
@@ -207,6 +211,7 @@ FILES
 | 
				
			|||||||
      * Enable Debian packaging by calling "make deb": AX_USE_DEBIAN_PACKAGING
 | 
					      * Enable Debian packaging by calling "make deb": AX_USE_DEBIAN_PACKAGING
 | 
				
			||||||
      * Enable RPM packaging by calling "make rpm": AX_USE_RPM_PACKAGING
 | 
					      * Enable RPM packaging by calling "make rpm": AX_USE_RPM_PACKAGING
 | 
				
			||||||
      * Enable C++ testing using CppUnit: AX_USE_CPPUNIT
 | 
					      * Enable C++ testing using CppUnit: AX_USE_CPPUNIT
 | 
				
			||||||
 | 
					      * Enable other tests: AX_BUILD_TEST
 | 
				
			||||||
      * Enable C++ examples, i.e. for libraries: AX_BUILD_EXAMPLES
 | 
					      * Enable C++ examples, i.e. for libraries: AX_BUILD_EXAMPLES
 | 
				
			||||||
      * Check for C++11 support: AX_CXX_COMPILE_STDCXX_11 (see ax_cxx_compile_stdcxx_11.m4)
 | 
					      * Check for C++11 support: AX_CXX_COMPILE_STDCXX_11 (see ax_cxx_compile_stdcxx_11.m4)
 | 
				
			||||||
      * Require a QT module: AX_REQUIRE_QT (see ax_check_qt.m4)
 | 
					      * Require a QT module: AX_REQUIRE_QT (see ax_check_qt.m4)
 | 
				
			||||||
@@ -240,15 +245,29 @@ done
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
HEADER='## @id '"\$Id\$"'
 | 
					HEADER='## @id '"\$Id\$"'
 | 
				
			||||||
#
 | 
					##
 | 
				
			||||||
# This file has been added by '${MY_NAME}' on '$(LANG= date +"%a, %d %B %Y %H:%M:%S %z")'
 | 
					## This file has been added:
 | 
				
			||||||
# Feel free to change it or even remove and rebuild it, up to your needs
 | 
					##  - by '${MY_NAME}'
 | 
				
			||||||
#
 | 
					##  -  on '$(LANG= date +"%a, %d %B %Y %H:%M:%S %z")'
 | 
				
			||||||
 | 
					## Feel free to change it or even remove and rebuild it, up to your needs
 | 
				
			||||||
 | 
					##
 | 
				
			||||||
##       1         2         3         4         5         6         7         8
 | 
					##       1         2         3         4         5         6         7         8
 | 
				
			||||||
## 45678901234567890123456789012345678901234567890123456789012345678901234567890
 | 
					## 45678901234567890123456789012345678901234567890123456789012345678901234567890
 | 
				
			||||||
 | 
					
 | 
				
			||||||
'
 | 
					'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					CHEADER='/** @id '"\$Id\$"'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					   This file has been added:
 | 
				
			||||||
 | 
					     - by '${MY_NAME}'
 | 
				
			||||||
 | 
					     - on '$(LANG= date +"%a, %d %B %Y %H:%M:%S %z")'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					//       1         2         3         4         5         6         7         8
 | 
				
			||||||
 | 
					// 45678901234567890123456789012345678901234567890123456789012345678901234567890
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
notice() {
 | 
					notice() {
 | 
				
			||||||
    echo -e "\e[1;33m$*\e[0m"
 | 
					    echo -e "\e[1;33m$*\e[0m"
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@@ -390,6 +409,7 @@ copy ax_cxx_compile_stdcxx_11.m4
 | 
				
			|||||||
copy ax_check_qt.m4
 | 
					copy ax_check_qt.m4
 | 
				
			||||||
copy resolve-debbuilddeps.sh
 | 
					copy resolve-debbuilddeps.sh
 | 
				
			||||||
copy resolve-rpmbuilddeps.sh
 | 
					copy resolve-rpmbuilddeps.sh
 | 
				
			||||||
 | 
					copy build-in-docker.sh
 | 
				
			||||||
copy build-resource-file.sh
 | 
					copy build-resource-file.sh
 | 
				
			||||||
copy mac-create-app-bundle.sh
 | 
					copy mac-create-app-bundle.sh
 | 
				
			||||||
AUTHOR=$(gpg -K  | sed -n 's,uid *,,p' | sort | head -1)
 | 
					AUTHOR=$(gpg -K  | sed -n 's,uid *,,p' | sort | head -1)
 | 
				
			||||||
@@ -425,6 +445,7 @@ AX_INIT_STANDARD_PROJECT
 | 
				
			|||||||
#AX_USE_DEBIAN_PACKAGING
 | 
					#AX_USE_DEBIAN_PACKAGING
 | 
				
			||||||
#AX_USE_RPM_PACKAGING
 | 
					#AX_USE_RPM_PACKAGING
 | 
				
			||||||
#AX_USE_CPPUNIT
 | 
					#AX_USE_CPPUNIT
 | 
				
			||||||
 | 
					#AX_BUILD_TEST
 | 
				
			||||||
#AX_BUILD_EXAMPLES
 | 
					#AX_BUILD_EXAMPLES
 | 
				
			||||||
#AX_BUILD_HTML
 | 
					#AX_BUILD_HTML
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -436,12 +457,19 @@ AX_INIT_STANDARD_PROJECT
 | 
				
			|||||||
# create output
 | 
					# create output
 | 
				
			||||||
AC_OUTPUT
 | 
					AC_OUTPUT
 | 
				
			||||||
EOF
 | 
					EOF
 | 
				
			||||||
 | 
					
 | 
				
			||||||
PACKAGE_NAME=$(sed -n 's/.*m4_define *( *x_package_name *, *\([^ ]*\) *).*/\1/p' configure.ac)
 | 
					PACKAGE_NAME=$(sed -n 's/.*m4_define *( *x_package_name *, *\([^ ]*\) *).*/\1/p' configure.ac)
 | 
				
			||||||
if ! testtag "AX_CHECK_QT" configure.ac && \
 | 
					SAVEIFS="$IFS"
 | 
				
			||||||
   ! testtag "AX_REQUIRE_QT" configure.ac; then
 | 
					IFS="-" PackageName=( $PACKAGE_NAME )
 | 
				
			||||||
 | 
					IFS="$SAVEIFS"
 | 
				
			||||||
 | 
					PackageName=${PackageName[*]^}
 | 
				
			||||||
 | 
					PackageName=${PackageName// /}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					if ! testtag AX_CHECK_QT && \
 | 
				
			||||||
 | 
					   ! testtag AX_REQUIRE_QT; then
 | 
				
			||||||
    echo "${HEADER}MAINTAINERCLEANFILES = makefile.in" | \
 | 
					    echo "${HEADER}MAINTAINERCLEANFILES = makefile.in" | \
 | 
				
			||||||
        to --condition AX_USE_CXX src/makefile.am
 | 
					        to --condition AX_USE_CXX src/makefile.am
 | 
				
			||||||
else
 | 
					elif ! test -e src/makefile.am; then
 | 
				
			||||||
    to --condition AX_USE_CXX src/makefile.am <<EOF
 | 
					    to --condition AX_USE_CXX src/makefile.am <<EOF
 | 
				
			||||||
${HEADER}bin_PROGRAMS = ${PACKAGE_NAME}
 | 
					${HEADER}bin_PROGRAMS = ${PACKAGE_NAME}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -475,7 +503,7 @@ ${PACKAGE_NAME//-/_}_UIFILES = ui_${PACKAGE_NAME}.hxx
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
## list all %.qrc resource files as qrc_%.cxx
 | 
					## list all %.qrc resource files as qrc_%.cxx
 | 
				
			||||||
## note: if there exists a directory %, the file %.qrc is generated from that
 | 
					## note: if there exists a directory %, the file %.qrc is generated from that
 | 
				
			||||||
${PACKAGE_NAME//-/_}_RESOURCES = qrc_languages.cxx qrc_resources.cxx
 | 
					${PACKAGE_NAME//-/_}_RESOURCES =  qrc_languages.cxx # qrc_resources.cxx
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## list all final translation files, list all supported languages here
 | 
					## list all final translation files, list all supported languages here
 | 
				
			||||||
${PACKAGE_NAME//-/_}_TRANSLATIONS = \${LANGUAGE_FILE_BASE}_en.qm	\\
 | 
					${PACKAGE_NAME//-/_}_TRANSLATIONS = \${LANGUAGE_FILE_BASE}_en.qm	\\
 | 
				
			||||||
@@ -487,7 +515,7 @@ ${PACKAGE_NAME//-/_}_TRANSLATIONS = \${LANGUAGE_FILE_BASE}_en.qm	\\
 | 
				
			|||||||
${PACKAGE_NAME//-/_}_TR_FILES = main.cxx version.cxx
 | 
					${PACKAGE_NAME//-/_}_TR_FILES = main.cxx version.cxx
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## automatic assembly, no need to change
 | 
					## automatic assembly, no need to change
 | 
				
			||||||
${PACKAGE_NAME//-/_}_SOURCES = ${swisssign_pin_entry_TR_FILES} ${BUILT_SOURCES}
 | 
					${PACKAGE_NAME//-/_}_SOURCES = \${${PACKAGE_NAME//-/_}_TR_FILES} \${BUILT_SOURCES}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## automatic assembly, no need to change
 | 
					## automatic assembly, no need to change
 | 
				
			||||||
BUILT_SOURCES = \${${PACKAGE_NAME//-/_}_MOCFILES} \
 | 
					BUILT_SOURCES = \${${PACKAGE_NAME//-/_}_MOCFILES} \
 | 
				
			||||||
@@ -510,6 +538,89 @@ EXTRA_DIST = \${EXTRA_DIST_TR} \
 | 
				
			|||||||
LANGUAGE_FILES = \${EXTRA_DIST_TR} \${${PACKAGE_NAME//-/_}_TR_FILES}
 | 
					LANGUAGE_FILES = \${EXTRA_DIST_TR} \${${PACKAGE_NAME//-/_}_TR_FILES}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
MAINTAINERCLEANFILES = makefile.in
 | 
					MAINTAINERCLEANFILES = makefile.in
 | 
				
			||||||
 | 
					EOF
 | 
				
			||||||
 | 
					    to --condition AX_USE_CXX src/main.cxx <<EOF
 | 
				
			||||||
 | 
					${CHEADER}#include <${PACKAGE_NAME}.hxx>
 | 
				
			||||||
 | 
					#include <QApplication>
 | 
				
			||||||
 | 
					#include <QCommandLineParser>
 | 
				
			||||||
 | 
					#include <iostream>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					int main(int argc, char *argv[]) try {
 | 
				
			||||||
 | 
					  QApplication a(argc, argv);
 | 
				
			||||||
 | 
					  QCommandLineParser parser;
 | 
				
			||||||
 | 
					  parser.addHelpOption();
 | 
				
			||||||
 | 
					  parser.process(a);
 | 
				
			||||||
 | 
					  QStringList scripts(parser.positionalArguments());
 | 
				
			||||||
 | 
					  ${PackageName} w;
 | 
				
			||||||
 | 
					  w.show();
 | 
				
			||||||
 | 
					  return a.exec();
 | 
				
			||||||
 | 
					 } catch (std::exception &x) {
 | 
				
			||||||
 | 
					  std::cerr<<"**** error: "<<x.what()<<std::endl;
 | 
				
			||||||
 | 
					  return 1;
 | 
				
			||||||
 | 
					 }
 | 
				
			||||||
 | 
					EOF
 | 
				
			||||||
 | 
					    to --condition AX_USE_CXX src/${PACKAGE_NAME}.hxx <<EOF
 | 
				
			||||||
 | 
					${CHEADER}#ifndef ${PackageName^^}_HXX
 | 
				
			||||||
 | 
					#define ${PackageName^^}_HXX
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include <QMainWindow>
 | 
				
			||||||
 | 
					#include <ui_${PACKAGE_NAME}.hxx>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/// Main Window
 | 
				
			||||||
 | 
					/** Main window for ${PACKAGE_NAME} */
 | 
				
			||||||
 | 
					class ${PackageName}: public QMainWindow, protected Ui::${PackageName} {
 | 
				
			||||||
 | 
					    Q_OBJECT;
 | 
				
			||||||
 | 
					  public:
 | 
				
			||||||
 | 
					    explicit ${PackageName}(QWidget *parent = 0): QMainWindow(parent) {
 | 
				
			||||||
 | 
					      setupUi(this);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    virtual ~${PackageName}() {}
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					EOF
 | 
				
			||||||
 | 
					    to --condition AX_USE_CXX src/${PACKAGE_NAME}.ui <<EOF
 | 
				
			||||||
 | 
					<?xml version="1.0" encoding="UTF-8"?>
 | 
				
			||||||
 | 
					<ui version="4.0">
 | 
				
			||||||
 | 
					 <class>${PackageName}</class>
 | 
				
			||||||
 | 
					 <widget class="QMainWindow" name="${PackageName}">
 | 
				
			||||||
 | 
					  <property name="geometry">
 | 
				
			||||||
 | 
					   <rect>
 | 
				
			||||||
 | 
					    <x>0</x>
 | 
				
			||||||
 | 
					    <y>0</y>
 | 
				
			||||||
 | 
					    <width>800</width>
 | 
				
			||||||
 | 
					    <height>600</height>
 | 
				
			||||||
 | 
					   </rect>
 | 
				
			||||||
 | 
					  </property>
 | 
				
			||||||
 | 
					  <property name="windowTitle">
 | 
				
			||||||
 | 
					   <string>${PackageName}</string>
 | 
				
			||||||
 | 
					  </property>
 | 
				
			||||||
 | 
					  <widget class="QWidget" name="centralwidget"/>
 | 
				
			||||||
 | 
					  <widget class="QMenuBar" name="menubar">
 | 
				
			||||||
 | 
					   <property name="geometry">
 | 
				
			||||||
 | 
					    <rect>
 | 
				
			||||||
 | 
					     <x>0</x>
 | 
				
			||||||
 | 
					     <y>0</y>
 | 
				
			||||||
 | 
					     <width>800</width>
 | 
				
			||||||
 | 
					     <height>22</height>
 | 
				
			||||||
 | 
					    </rect>
 | 
				
			||||||
 | 
					   </property>
 | 
				
			||||||
 | 
					  </widget>
 | 
				
			||||||
 | 
					  <widget class="QStatusBar" name="statusbar"/>
 | 
				
			||||||
 | 
					 </widget>
 | 
				
			||||||
 | 
					 <resources/>
 | 
				
			||||||
 | 
					 <connections/>
 | 
				
			||||||
 | 
					</ui>
 | 
				
			||||||
 | 
					EOF
 | 
				
			||||||
 | 
					    to --condition AX_USE_CXX src/languages.qrc <<EOF
 | 
				
			||||||
 | 
					<RCC>
 | 
				
			||||||
 | 
					    <qresource prefix="/language">
 | 
				
			||||||
 | 
					        <file>${PACKAGE_NAME}_de.qm</file>
 | 
				
			||||||
 | 
					        <file>${PACKAGE_NAME}_fr.qm</file>
 | 
				
			||||||
 | 
					        <file>${PACKAGE_NAME}_it.qm</file>
 | 
				
			||||||
 | 
					        <file>${PACKAGE_NAME}_en.qm</file>
 | 
				
			||||||
 | 
					    </qresource>
 | 
				
			||||||
 | 
					</RCC>
 | 
				
			||||||
EOF
 | 
					EOF
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
to --condition AX_USE_CXX src/version.hxx <<EOF
 | 
					to --condition AX_USE_CXX src/version.hxx <<EOF
 | 
				
			||||||
@@ -591,10 +702,20 @@ namespace NAMESPACE {
 | 
				
			|||||||
EOF
 | 
					EOF
 | 
				
			||||||
echo "${HEADER}MAINTAINERCLEANFILES = makefile.in" | to --condition AX_USE_SCRIPTS scripts/makefile.am
 | 
					echo "${HEADER}MAINTAINERCLEANFILES = makefile.in" | to --condition AX_USE_SCRIPTS scripts/makefile.am
 | 
				
			||||||
echo "${HEADER}MAINTAINERCLEANFILES = makefile.in" | to --condition AX_USE_DOXYGEN doc/makefile.am
 | 
					echo "${HEADER}MAINTAINERCLEANFILES = makefile.in" | to --condition AX_USE_DOXYGEN doc/makefile.am
 | 
				
			||||||
to --condition AX_USE_CPPUNIT test/makefile.am <<EOF
 | 
					to --condition 'AX_BUILD_TEST|AX_USE_CPPUNIT' test/makefile.am <<EOF
 | 
				
			||||||
${HEADER}AM_CPPFLAGS = -I\${top_srcdir}/src -I\${top_builddir}/src
 | 
					${HEADER}$(if testtag AX_USE_CXX; then
 | 
				
			||||||
 | 
					cat <<EOF2
 | 
				
			||||||
 | 
					AM_CPPFLAGS = -I\${top_srcdir}/src -I\${top_builddir}/src
 | 
				
			||||||
AM_LDFLAGS = -L\${abs_top_builddir}/src/.libs
 | 
					AM_LDFLAGS = -L\${abs_top_builddir}/src/.libs
 | 
				
			||||||
 | 
					$(if testtag AX_USE_LIBTOOL; then
 | 
				
			||||||
 | 
					cat <<EOF3
 | 
				
			||||||
LDADD = -l${PACKAGE_NAME#lib}
 | 
					LDADD = -l${PACKAGE_NAME#lib}
 | 
				
			||||||
 | 
					EOF3
 | 
				
			||||||
 | 
					fi)
 | 
				
			||||||
 | 
					EOF2
 | 
				
			||||||
 | 
					fi)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					TESTS =
 | 
				
			||||||
 | 
					
 | 
				
			||||||
MAINTAINERCLEANFILES = makefile.in
 | 
					MAINTAINERCLEANFILES = makefile.in
 | 
				
			||||||
EOF
 | 
					EOF
 | 
				
			||||||
@@ -657,7 +778,7 @@ if testtag AX_USE_DOXYGEN; then
 | 
				
			|||||||
        if testtag AX_BUILD_HTML; then
 | 
					        if testtag AX_BUILD_HTML; then
 | 
				
			||||||
            doxyadd INPUT "@top_srcdir@/html"
 | 
					            doxyadd INPUT "@top_srcdir@/html"
 | 
				
			||||||
        fi
 | 
					        fi
 | 
				
			||||||
        if testtag AX_USE_CPPUNIT; then
 | 
					        if testtag AX_BUILD_TEST AX_USE_CPPUNIT; then
 | 
				
			||||||
            doxyadd INPUT "@top_srcdir@/test"
 | 
					            doxyadd INPUT "@top_srcdir@/test"
 | 
				
			||||||
        fi
 | 
					        fi
 | 
				
			||||||
        doxyreplace FILE_PATTERNS '*.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.idl *.ddl *.odl *.h *.hh *.hxx *.hpp *.h++ *.cs *.d *.php *.php4 *.php5 *.phtml *.inc *.m *.markdown *.md *.mm *.dox *.py *.f90 *.f *.for *.tcl *.vhd *.vhdl *.ucf *.qsf *.as *.js *.wt'
 | 
					        doxyreplace FILE_PATTERNS '*.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.idl *.ddl *.odl *.h *.hh *.hxx *.hpp *.h++ *.cs *.d *.php *.php4 *.php5 *.phtml *.inc *.m *.markdown *.md *.mm *.dox *.py *.f90 *.f *.for *.tcl *.vhd *.vhdl *.ucf *.qsf *.as *.js *.wt'
 | 
				
			||||||
@@ -698,11 +819,12 @@ if testtag AX_USE_DEBIAN_PACKAGING; then
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 -- @AUTHOR@  @BUILD_DATE@
 | 
					 -- @AUTHOR@  @BUILD_DATE@
 | 
				
			||||||
EOF
 | 
					EOF
 | 
				
			||||||
 | 
					    BUILD_DEPENDS="debhelper, subversion, svn2cl, pkg-config, automake, libtool, autotools-dev, lsb-release $(if testtag AX_USE_DOXYGEN; then echo -n ", doxygen, graphviz, mscgen"; fi; if testtag AX_USE_CPPUNIT; then echo -n ", libcppunit-dev"; fi; if testtag AX_CXX_QT || testtag AX_CHECK_QT AX_REQUIRE_QT; then echo -n ", qt5-default | qt4-default | qt5-qmake | qt4-qmake, qtbase5-dev | libqt4-dev, qtbase5-dev-tools | qt4-dev-tools, qttools5-dev-tools | qt4-dev-tools, qttools5-dev-tools | qt4-dev-tools"; fi)"
 | 
				
			||||||
    to debian/control.in <<EOF
 | 
					    to debian/control.in <<EOF
 | 
				
			||||||
Source: @PACKAGE_NAME@
 | 
					Source: @PACKAGE_NAME@
 | 
				
			||||||
Priority: extra
 | 
					Priority: extra
 | 
				
			||||||
Maintainer: @AUTHOR@
 | 
					Maintainer: @AUTHOR@
 | 
				
			||||||
Build-Depends: debhelper, subversion, pkg-config, autotools-dev, lsb-release $(if testtag AX_USE_DOXYGEN; then echo -n ", doxygen, graphviz, mscgen"; fi; if testtag AX_USE_CPPUNIT; then echo -n ", libcppunit-dev"; fi; if testtag AX_CXX_QT || testtag AX_CHECK_QT AX_REQUIRE_QT; then echo -n ", qt5-default | qt4-default | qt5-qmake | qt4-qmake, qtbase5-dev | libqt4-dev, qtbase5-dev-tools | qt4-dev-tools, qttools5-dev-tools | qt4-dev-tools, qttools5-dev-tools | qt4-dev-tools"; fi)
 | 
					Build-Depends: ${BUILD-DEPENDS}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Package: @PACKAGE_NAME@
 | 
					Package: @PACKAGE_NAME@
 | 
				
			||||||
Section: $(if testtag AX_USE_LIBTOOL; then echo  "libs"; fi)
 | 
					Section: $(if testtag AX_USE_LIBTOOL; then echo  "libs"; fi)
 | 
				
			||||||
@@ -716,7 +838,7 @@ $(      if testtag AX_USE_LIBTOOL; then
 | 
				
			|||||||
Package: @PACKAGE_NAME@-dev
 | 
					Package: @PACKAGE_NAME@-dev
 | 
				
			||||||
Section: libdevel
 | 
					Section: libdevel
 | 
				
			||||||
Architecture: any
 | 
					Architecture: any
 | 
				
			||||||
Depends: @PACKAGE_NAME@ (= \${binary:Version})
 | 
					Depends: @PACKAGE_NAME@ (= \${binary:Version}), ${BUILD-DEPENDS}
 | 
				
			||||||
Description: @DESCRIPTION@ - Development Package
 | 
					Description: @DESCRIPTION@ - Development Package
 | 
				
			||||||
@README_DEB@
 | 
					@README_DEB@
 | 
				
			||||||
EOF2
 | 
					EOF2
 | 
				
			||||||
@@ -907,3 +1029,8 @@ fi
 | 
				
			|||||||
if test "$build" -eq 1; then
 | 
					if test "$build" -eq 1; then
 | 
				
			||||||
    make $buildtarget
 | 
					    make $buildtarget
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#### Build In Docker If User Requires ####
 | 
				
			||||||
 | 
					if test "$docker" -eq 1; then
 | 
				
			||||||
 | 
					    ./build-in-docker.sh
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										15
									
								
								build-in-docker.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										15
									
								
								build-in-docker.sh
									
									
									
									
									
										Executable file
									
								
							@@ -0,0 +1,15 @@
 | 
				
			|||||||
 | 
					#! /bin/bash -ex
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# build and test everything in a fresh docker installation
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					DOCKER_ID=$(docker run -d -v $(pwd):/workdir -w /workdir ubuntu sleep infinity)
 | 
				
			||||||
 | 
					trap "docker rm -f ${DOCKER_ID}" INT TERM EXIT
 | 
				
			||||||
 | 
					docker exec ${DOCKER_ID} apt-get install -y software-properties-common apt-transport-https dpkg-dev
 | 
				
			||||||
 | 
					docker exec ${DOCKER_ID} apt-add-repository universe
 | 
				
			||||||
 | 
					docker exec ${DOCKER_ID} apt-add-repository https://dev.marc.waeckerlin.org/repository
 | 
				
			||||||
 | 
					wget -O- https://dev.marc.waeckerlin.org/repository/PublicKey \
 | 
				
			||||||
 | 
					   | docker exec -i ${DOCKER_ID} apt-key add -
 | 
				
			||||||
 | 
					docker exec ${DOCKER_ID} apt-get update
 | 
				
			||||||
 | 
					docker exec ${DOCKER_ID} ./resolve-debbuilddeps.sh
 | 
				
			||||||
 | 
					docker exec -u $(id -u) ${DOCKER_ID} svn upgrade || true
 | 
				
			||||||
 | 
					docker exec -u $(id -u) ${DOCKER_ID} ./bootstrap.sh -t "all check distcheck"
 | 
				
			||||||
@@ -12,33 +12,63 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
SCHROOTNAME="$1"
 | 
					SCHROOTNAME="$1"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
sed 's,@[^@]*@, dummytext,g' debian/control.in > debian/control
 | 
					function install() {
 | 
				
			||||||
 | 
					    if test -n "${SCHROOTNAME}"; then
 | 
				
			||||||
 | 
					        if schroot -c "${SCHROOTNAME}" -u root -d / -- apt-get -y install $*; then
 | 
				
			||||||
 | 
					            return 0
 | 
				
			||||||
 | 
					        fi
 | 
				
			||||||
 | 
					    else
 | 
				
			||||||
 | 
					        if apt-get -y install $*; then
 | 
				
			||||||
 | 
					            return 0
 | 
				
			||||||
 | 
					        fi
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
 | 
					    return 1
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					TO_INSTALL=
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					if test -e debian/control.in -a ! -e debian/control; then
 | 
				
			||||||
 | 
					    for f in $(sed -n 's, *AX_DEB_DEPEND_IFEXISTS(\([^)]*\)).*,\1,p' configure.ac); do
 | 
				
			||||||
 | 
					        if test -n "$(apt-cache policy -q ${f})" && ! dpkg -l "${f}"; then
 | 
				
			||||||
 | 
					            TO_INSTALL+=" ${f}"
 | 
				
			||||||
 | 
					        fi
 | 
				
			||||||
 | 
					    done
 | 
				
			||||||
 | 
					    trap "rm debian/control" INT TERM EXIT
 | 
				
			||||||
 | 
					    sed 's,@DEB_DEPEND_IFEXISTS@,,g' debian/control.in | \
 | 
				
			||||||
 | 
					        sed 's,@[^@]*@, dummytext,g' > debian/control
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if test -n "${SCHROOTNAME}"; then
 | 
					if test -n "${SCHROOTNAME}"; then
 | 
				
			||||||
 | 
					  schroot -c "${SCHROOTNAME}" -u root -d / -- apt-get -y install dpkg-dev
 | 
				
			||||||
  DEPS=$(schroot -c "${SCHROOTNAME}" -- dpkg-checkbuilddeps 2>&1 || true)
 | 
					  DEPS=$(schroot -c "${SCHROOTNAME}" -- dpkg-checkbuilddeps 2>&1 || true)
 | 
				
			||||||
else
 | 
					else
 | 
				
			||||||
 | 
					  apt-get -y install dpkg-dev
 | 
				
			||||||
  DEPS=$(dpkg-checkbuilddeps 2>&1 || true)
 | 
					  DEPS=$(dpkg-checkbuilddeps 2>&1 || true)
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
DEPS=$(echo "$DEPS" | sed -n '/Unmet build dependencies/ { s,.*Unmet build dependencies: ,,g; s, ([^)]*),,g; s, *| *,|,g; p}')
 | 
					DEPS=$(echo "$DEPS" | sed -n '/Unmet build dependencies/ { s,.*Unmet build dependencies: ,,g; s, ([^)]*),,g; s, *| *,|,g; p}')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
for pa in ${DEPS}; do
 | 
					for pa in ${DEPS}; do
 | 
				
			||||||
 | 
					    if test ${pa//|/} = ${pa}; then
 | 
				
			||||||
 | 
					        TO_INSTALL+=" ${pa}"
 | 
				
			||||||
 | 
					        continue;
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
    success=0
 | 
					    success=0
 | 
				
			||||||
    for p in $(echo "${pa}" | sed 's,|, ,g'); do
 | 
					    for p in ${pa//|/ }; do
 | 
				
			||||||
        if test -n "${SCHROOTNAME}"; then
 | 
					        if install ${TO_INSTALL} ${p}; then
 | 
				
			||||||
            if schroot -c "${SCHROOTNAME}" -u root -d / -- apt-get -y install ${p}; then
 | 
					            TO_INSTALL+=" ${p}"
 | 
				
			||||||
            success=1
 | 
					            success=1
 | 
				
			||||||
                break;
 | 
					            break
 | 
				
			||||||
            fi
 | 
					 | 
				
			||||||
        else
 | 
					 | 
				
			||||||
            if sudo apt-get -y install ${p}; then
 | 
					 | 
				
			||||||
                success=1
 | 
					 | 
				
			||||||
                break;
 | 
					 | 
				
			||||||
            fi
 | 
					 | 
				
			||||||
        fi
 | 
					        fi
 | 
				
			||||||
    done
 | 
					    done
 | 
				
			||||||
    if test ${success} -eq 0; then
 | 
					    if test ${success} -eq 0; then
 | 
				
			||||||
        echo "**** Error: Installation Failed: ${pa}"
 | 
					        echo "**** Error: Installation Failed: ${pa}"
 | 
				
			||||||
 | 
					        exit 1
 | 
				
			||||||
    fi
 | 
					    fi
 | 
				
			||||||
done
 | 
					done
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					if test -n "${TO_INSTALL}" && ! install ${TO_INSTALL}; then
 | 
				
			||||||
 | 
					    echo "**** Error: Installation Failed: ${TO_INSTALL}"
 | 
				
			||||||
 | 
					    exit 1
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
echo "**** Success: All Dependencies Resolved"
 | 
					echo "**** Success: All Dependencies Resolved"
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user