basic android abb works, distcheck fails; refs #24
@@ -38,6 +38,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
AC_DEFUN([AX_CXX_QT_TOOL], [
 | 
					AC_DEFUN([AX_CXX_QT_TOOL], [
 | 
				
			||||||
 | 
					  PKG_PROG_PKG_CONFIG
 | 
				
			||||||
  if test -z "$HAVE_$1"; then
 | 
					  if test -z "$HAVE_$1"; then
 | 
				
			||||||
    HAVE_$1=1
 | 
					    HAVE_$1=1
 | 
				
			||||||
    AC_MSG_CHECKING([for $2])
 | 
					    AC_MSG_CHECKING([for $2])
 | 
				
			||||||
@@ -61,7 +62,7 @@ AC_DEFUN([AX_CXX_QT_TOOL], [
 | 
				
			|||||||
      fi
 | 
					      fi
 | 
				
			||||||
    fi
 | 
					    fi
 | 
				
			||||||
    AC_SUBST($1)
 | 
					    AC_SUBST($1)
 | 
				
			||||||
    AM_CONDITIONAL(HAVE_$1, test $HAVE_$1 -eq 1)
 | 
					    AM_CONDITIONAL(HAVE_$1, test $HAVE_[$1] -eq 1)
 | 
				
			||||||
    if test $HAVE_$1 -eq 1; then
 | 
					    if test $HAVE_$1 -eq 1; then
 | 
				
			||||||
      AC_MSG_RESULT([$$1])
 | 
					      AC_MSG_RESULT([$$1])
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
@@ -79,24 +80,6 @@ AC_DEFUN([AX_CXX_QT_TOOLS], [
 | 
				
			|||||||
  AX_CXX_QT_TOOL(LRELEASE, lrelease)
 | 
					  AX_CXX_QT_TOOL(LRELEASE, lrelease)
 | 
				
			||||||
])
 | 
					])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
AC_DEFUN([AX_CHECK_VALID_FLAG], [
 | 
					 | 
				
			||||||
  AC_MSG_CHECKING([m4_default([$2], [for valid flag in "$1"])])
 | 
					 | 
				
			||||||
  save_cppflags="$CPPFLAGS"
 | 
					 | 
				
			||||||
  newflag="no"
 | 
					 | 
				
			||||||
  for test_flag in $1; do
 | 
					 | 
				
			||||||
    CPPFLAGS+=" ${test_flag}"
 | 
					 | 
				
			||||||
    AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [
 | 
					 | 
				
			||||||
      newflag="$test_flag"
 | 
					 | 
				
			||||||
      CPPFLAGS="$save_cppflags"
 | 
					 | 
				
			||||||
      CPPFLAGS+=" ${test_flag}"
 | 
					 | 
				
			||||||
      break;
 | 
					 | 
				
			||||||
    ])
 | 
					 | 
				
			||||||
    CPPFLAGS="$save_cppflags"
 | 
					 | 
				
			||||||
  done
 | 
					 | 
				
			||||||
  AC_SUBST(CPPFLAGS)
 | 
					 | 
				
			||||||
  AC_MSG_RESULT([$newflag])
 | 
					 | 
				
			||||||
])
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
AC_DEFUN([AX_CHECK_QT], [
 | 
					AC_DEFUN([AX_CHECK_QT], [
 | 
				
			||||||
  qt_modules="$2"
 | 
					  qt_modules="$2"
 | 
				
			||||||
  qt_modules_optional="$3"
 | 
					  qt_modules_optional="$3"
 | 
				
			||||||
@@ -148,8 +131,11 @@ AC_DEFUN([AX_CHECK_QT], [
 | 
				
			|||||||
      fi
 | 
					      fi
 | 
				
			||||||
    ], [HAVE_$1=0])
 | 
					    ], [HAVE_$1=0])
 | 
				
			||||||
  ])
 | 
					  ])
 | 
				
			||||||
  AM_CONDITIONAL(HAVE_$1, test $HAVE_$1 -eq 1)
 | 
					  AM_CONDITIONAL(HAVE_$1, test $HAVE_[$1] -eq 1)
 | 
				
			||||||
  AX_CHECK_VALID_FLAG([-fPIC -fPIE], [position independent code flag])
 | 
					  AX_CHECK_VALID_CXX_FLAG([-fPIC -fPIE], [position independent code flag])
 | 
				
			||||||
 | 
					  if test "${MINGW}" != "no"; then
 | 
				
			||||||
 | 
					    AX_CHECK_VALID_CXX_FLAG([-Wl,-subsystem,windows], [windows console flag])
 | 
				
			||||||
 | 
					  fi
 | 
				
			||||||
  AC_SUBST(QTDIR)
 | 
					  AC_SUBST(QTDIR)
 | 
				
			||||||
  AC_SUBST(QT_PLUGIN_PATH)
 | 
					  AC_SUBST(QT_PLUGIN_PATH)
 | 
				
			||||||
  AC_SUBST(CPPFLAGS)
 | 
					  AC_SUBST(CPPFLAGS)
 | 
				
			||||||
@@ -176,7 +162,7 @@ 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 [$][@] $<
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -131,7 +131,7 @@ AC_DEFUN([AX_INIT_STANDARD_PROJECT], [
 | 
				
			|||||||
  AX_SUBST(DISTRO)
 | 
					  AX_SUBST(DISTRO)
 | 
				
			||||||
  BUILD_NUMBER=${BUILD_NUMBER:-1}
 | 
					  BUILD_NUMBER=${BUILD_NUMBER:-1}
 | 
				
			||||||
  AX_SUBST(BUILD_NUMBER)
 | 
					  AX_SUBST(BUILD_NUMBER)
 | 
				
			||||||
  BUILD_DATE=$(LANG= date +"%a, %d %B %Y %H:%M:%S %z")
 | 
					  BUILD_DATE=$(LANG= date +"%a, %d %b %Y %H:%M:%S %z")
 | 
				
			||||||
  AX_SUBST(BUILD_DATE)
 | 
					  AX_SUBST(BUILD_DATE)
 | 
				
			||||||
  if test -f "${PROJECT_NAME}-logo.png"; then
 | 
					  if test -f "${PROJECT_NAME}-logo.png"; then
 | 
				
			||||||
     PROJECT_LOGO="${PROJECT_NAME}-logo.png"
 | 
					     PROJECT_LOGO="${PROJECT_NAME}-logo.png"
 | 
				
			||||||
@@ -160,9 +160,10 @@ AC_DEFUN([AX_INIT_STANDARD_PROJECT], [
 | 
				
			|||||||
  AX_ADD_MAKEFILE_TARGET_DEP([clean-am], [clean-standard-project-targets], [makefile.in])
 | 
					  AX_ADD_MAKEFILE_TARGET_DEP([clean-am], [clean-standard-project-targets], [makefile.in])
 | 
				
			||||||
  AX_ADD_MAKEFILE_TARGET_DEP([distclean-am], [distclean-standard-project-targets], [makefile.in])
 | 
					  AX_ADD_MAKEFILE_TARGET_DEP([distclean-am], [distclean-standard-project-targets], [makefile.in])
 | 
				
			||||||
  AX_ADD_MAKEFILE_TARGET_DEP([maintainer-clean-am], [maintainer-clean-standard-project-targets], [makefile.in])
 | 
					  AX_ADD_MAKEFILE_TARGET_DEP([maintainer-clean-am], [maintainer-clean-standard-project-targets], [makefile.in])
 | 
				
			||||||
 | 
					  test -f makefile.in && sed -i '1iEXTRA_DIST = ' makefile.in
 | 
				
			||||||
  test -f makefile.in && cat >> makefile.in <<EOF
 | 
					  test -f makefile.in && cat >> makefile.in <<EOF
 | 
				
			||||||
#### Begin: Appended by $0
 | 
					#### Begin: Appended by $0
 | 
				
			||||||
EXTRA_DIST = bootstrap.sh
 | 
					EXTRA_DIST += bootstrap.sh
 | 
				
			||||||
clean-standard-project-targets:
 | 
					clean-standard-project-targets:
 | 
				
			||||||
	-rm -rf \${PACKAGE_NAME}-\${PACKAGE_VERSION}
 | 
						-rm -rf \${PACKAGE_NAME}-\${PACKAGE_VERSION}
 | 
				
			||||||
	-rm \${PACKAGE_TARNAME}-\${PACKAGE_VERSION}.tar.gz
 | 
						-rm \${PACKAGE_TARNAME}-\${PACKAGE_VERSION}.tar.gz
 | 
				
			||||||
@@ -430,7 +431,7 @@ AC_DEFUN([AX_PKG_REQUIRE], [
 | 
				
			|||||||
    ], [
 | 
					    ], [
 | 
				
			||||||
      for x in ${$1_CFLAGS}; do
 | 
					      for x in ${$1_CFLAGS}; do
 | 
				
			||||||
        AC_MSG_NOTICE([search for $3 in ${x[#]-I}])
 | 
					        AC_MSG_NOTICE([search for $3 in ${x[#]-I}])
 | 
				
			||||||
        for f in $(find ${x[#]-I} -name "$3"); do
 | 
					        for f in $(find ${x[#]-I} -name "$3" 2> /dev/null); do
 | 
				
			||||||
          if test -f "$f"; then
 | 
					          if test -f "$f"; then
 | 
				
			||||||
            $1_found=${tmp_package}
 | 
					            $1_found=${tmp_package}
 | 
				
			||||||
            $1_CFLAGS+=" -I${f%/*}"
 | 
					            $1_CFLAGS+=" -I${f%/*}"
 | 
				
			||||||
@@ -446,7 +447,7 @@ AC_DEFUN([AX_PKG_REQUIRE], [
 | 
				
			|||||||
        tmp_includedir=$(${PKG_CONFIG} --variable=includedir $tmp_package)
 | 
					        tmp_includedir=$(${PKG_CONFIG} --variable=includedir $tmp_package)
 | 
				
			||||||
        for x in ${tmp_includedir}; do
 | 
					        for x in ${tmp_includedir}; do
 | 
				
			||||||
          AC_MSG_NOTICE([search for $3 in $x])
 | 
					          AC_MSG_NOTICE([search for $3 in $x])
 | 
				
			||||||
          for f in $(find ${x} -name "$3"); do
 | 
					          for f in $(find ${x} -name "$3" 2> /dev/null); do
 | 
				
			||||||
            if test -f "$f"; then
 | 
					            if test -f "$f"; then
 | 
				
			||||||
              $1_found=${tmp_package}
 | 
					              $1_found=${tmp_package}
 | 
				
			||||||
              $1_CFLAGS+=" -I${f%/*}"
 | 
					              $1_CFLAGS+=" -I${f%/*}"
 | 
				
			||||||
@@ -501,7 +502,7 @@ AC_DEFUN([AX_PKG_CHECK], [
 | 
				
			|||||||
  ], [
 | 
					  ], [
 | 
				
			||||||
    HAVE_$1=0
 | 
					    HAVE_$1=0
 | 
				
			||||||
  ])
 | 
					  ])
 | 
				
			||||||
  AM_CONDITIONAL(HAVE_$1, test $HAVE_$1 -eq 1)
 | 
					  AM_CONDITIONAL(HAVE_$1, test $HAVE_[$1] -eq 1)
 | 
				
			||||||
  AC_SUBST(HAVE_$1)
 | 
					  AC_SUBST(HAVE_$1)
 | 
				
			||||||
  AC_SUBST(CPPFLAGS)
 | 
					  AC_SUBST(CPPFLAGS)
 | 
				
			||||||
  AC_SUBST(CXXFLAGS)
 | 
					  AC_SUBST(CXXFLAGS)
 | 
				
			||||||
@@ -532,3 +533,95 @@ AC_DEFUN([AX_REQUIRE_HEADER], [
 | 
				
			|||||||
    ], [])
 | 
					    ], [])
 | 
				
			||||||
  ], [])
 | 
					  ], [])
 | 
				
			||||||
])
 | 
					])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Check within a list of CPP-Flags for the first that is usable and
 | 
				
			||||||
 | 
					# configure it
 | 
				
			||||||
 | 
					#  - parameter:
 | 
				
			||||||
 | 
					#     $1 = white-space separated list of alternative flags
 | 
				
			||||||
 | 
					#     $2 = module name (optional, if different from id)
 | 
				
			||||||
 | 
					AC_DEFUN([AX_CHECK_VALID_CPP_FLAG], [
 | 
				
			||||||
 | 
					  AC_MSG_CHECKING([m4_default([$2], [for valid flag in "$1"])])
 | 
				
			||||||
 | 
					  save_cppflags="$CPPFLAGS"
 | 
				
			||||||
 | 
					  newflag="no"
 | 
				
			||||||
 | 
					  for test_flag in $1; do
 | 
				
			||||||
 | 
					    CPPFLAGS+=" ${test_flag}"
 | 
				
			||||||
 | 
					    AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [
 | 
				
			||||||
 | 
					      newflag="$test_flag"
 | 
				
			||||||
 | 
					      CPPFLAGS="$save_cppflags"
 | 
				
			||||||
 | 
					      CPPFLAGS+=" ${test_flag}"
 | 
				
			||||||
 | 
					      break;
 | 
				
			||||||
 | 
					    ])
 | 
				
			||||||
 | 
					    CPPFLAGS="$save_cppflags"
 | 
				
			||||||
 | 
					  done
 | 
				
			||||||
 | 
					  AC_SUBST(CPPFLAGS)
 | 
				
			||||||
 | 
					  AC_MSG_RESULT([$newflag in $CPPFLAGS])
 | 
				
			||||||
 | 
					])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Check within a list of CXX-Flags for the first that is usable and
 | 
				
			||||||
 | 
					# configure it
 | 
				
			||||||
 | 
					#  - parameter:
 | 
				
			||||||
 | 
					#     $1 = white-space separated list of alternative flags
 | 
				
			||||||
 | 
					#     $2 = module name (optional, if different from id)
 | 
				
			||||||
 | 
					AC_DEFUN([AX_CHECK_VALID_CXX_FLAG], [
 | 
				
			||||||
 | 
					  AC_MSG_CHECKING([m4_default([$2], [for valid flag in "$1"])])
 | 
				
			||||||
 | 
					  save_cxxflags="$CXXFLAGS"
 | 
				
			||||||
 | 
					  newflag="no"
 | 
				
			||||||
 | 
					  for test_flag in $1; do
 | 
				
			||||||
 | 
					    CXXFLAGS+=" ${test_flag}"
 | 
				
			||||||
 | 
					    AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [
 | 
				
			||||||
 | 
					      newflag="$test_flag"
 | 
				
			||||||
 | 
					      CXXFLAGS="$save_cxxflags"
 | 
				
			||||||
 | 
					      CXXFLAGS+=" ${test_flag}"
 | 
				
			||||||
 | 
					      break;
 | 
				
			||||||
 | 
					    ])
 | 
				
			||||||
 | 
					    CXXFLAGS="$save_cxxflags"
 | 
				
			||||||
 | 
					  done
 | 
				
			||||||
 | 
					  AC_SUBST(CXXFLAGS)
 | 
				
			||||||
 | 
					  AC_MSG_RESULT([$newflag in $CXXFLAGS])
 | 
				
			||||||
 | 
					])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Check within a list of C-Flags for the first that is usable and
 | 
				
			||||||
 | 
					# configure it
 | 
				
			||||||
 | 
					#  - parameter:
 | 
				
			||||||
 | 
					#     $1 = white-space separated list of alternative flags
 | 
				
			||||||
 | 
					#     $2 = module name (optional, if different from id)
 | 
				
			||||||
 | 
					AC_DEFUN([AX_CHECK_VALID_C_FLAG], [
 | 
				
			||||||
 | 
					  AC_MSG_CHECKING([m4_default([$2], [for valid flag in "$1"])])
 | 
				
			||||||
 | 
					  save_cflags="$CFLAGS"
 | 
				
			||||||
 | 
					  newflag="no"
 | 
				
			||||||
 | 
					  for test_flag in $1; do
 | 
				
			||||||
 | 
					    CFLAGS+=" ${test_flag}"
 | 
				
			||||||
 | 
					    AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [
 | 
				
			||||||
 | 
					      newflag="$test_flag"
 | 
				
			||||||
 | 
					      CFLAGS="$save_cflags"
 | 
				
			||||||
 | 
					      CFLAGS+=" ${test_flag}"
 | 
				
			||||||
 | 
					      break;
 | 
				
			||||||
 | 
					    ])
 | 
				
			||||||
 | 
					    CFLAGS="$save_cflags"
 | 
				
			||||||
 | 
					  done
 | 
				
			||||||
 | 
					  AC_SUBST(CFLAGS)
 | 
				
			||||||
 | 
					  AC_MSG_RESULT([$newflag in $CFLAGS])
 | 
				
			||||||
 | 
					])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Check within a list of LD-Flags for the first that is usable and
 | 
				
			||||||
 | 
					# configure it
 | 
				
			||||||
 | 
					#  - parameter:
 | 
				
			||||||
 | 
					#     $1 = white-space separated list of alternative flags
 | 
				
			||||||
 | 
					#     $2 = module name (optional, if different from id)
 | 
				
			||||||
 | 
					AC_DEFUN([AX_CHECK_VALID_LD_FLAG], [
 | 
				
			||||||
 | 
					  AC_MSG_CHECKING([m4_default([$2], [for valid flag in "$1"])])
 | 
				
			||||||
 | 
					  save_ldflags="$LDFLAGS"
 | 
				
			||||||
 | 
					  newflag="no"
 | 
				
			||||||
 | 
					  for test_flag in $1; do
 | 
				
			||||||
 | 
					    LDFLAGS+=" ${test_flag}"
 | 
				
			||||||
 | 
					    AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [
 | 
				
			||||||
 | 
					      newflag="$test_flag"
 | 
				
			||||||
 | 
					      LDFLAGS="$save_ldflags"
 | 
				
			||||||
 | 
					      LDFLAGS+=" ${test_flag}"
 | 
				
			||||||
 | 
					      break;
 | 
				
			||||||
 | 
					    ])
 | 
				
			||||||
 | 
					    LDFLAGS="$save_ldflags"
 | 
				
			||||||
 | 
					  done
 | 
				
			||||||
 | 
					  AC_SUBST(LDFLAGS)
 | 
				
			||||||
 | 
					  AC_MSG_RESULT([$newflag in $LDFLAGS])
 | 
				
			||||||
 | 
					])
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										56
									
								
								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
 | 
				
			||||||
 | 
					buildtarget="distcheck"
 | 
				
			||||||
overwrite=0
 | 
					overwrite=0
 | 
				
			||||||
rebuild=0
 | 
					rebuild=0
 | 
				
			||||||
rebuildfiles=()
 | 
					rebuildfiles=()
 | 
				
			||||||
@@ -26,6 +27,7 @@ while test $# -gt 0; do
 | 
				
			|||||||
    case "$1" in
 | 
					    case "$1" in
 | 
				
			||||||
        (--configure|-c) configure=1;;
 | 
					        (--configure|-c) configure=1;;
 | 
				
			||||||
        (--build|-b) configure=1; build=1;;
 | 
					        (--build|-b) configure=1; build=1;;
 | 
				
			||||||
 | 
					        (--target|-t) shift; configure=1; build=1; buildtarget="$1";;
 | 
				
			||||||
        (--overwrite|-o) overwrite=1;;
 | 
					        (--overwrite|-o) overwrite=1;;
 | 
				
			||||||
        (--rebuild|-r) rebuild=1;;
 | 
					        (--rebuild|-r) rebuild=1;;
 | 
				
			||||||
        (--rebuild-file|-f) shift; rebuildfiles+=("$1");;
 | 
					        (--rebuild-file|-f) shift; rebuildfiles+=("$1");;
 | 
				
			||||||
@@ -40,7 +42,8 @@ SYNOPSIS
 | 
				
			|||||||
OPTIONS
 | 
					OPTIONS
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  --configure, -c            call ./configure after initialization
 | 
					  --configure, -c            call ./configure after initialization
 | 
				
			||||||
  --build, -b                build, also call ./configure && make
 | 
					  --build, -b                build, also call ./configure && make 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)
 | 
				
			||||||
  --rebuild, -r              force rebuild of generated files, even if modified
 | 
					  --rebuild, -r              force rebuild of generated files, even if modified
 | 
				
			||||||
  --rebuild-file, -f <file>  rebild specific file (can be added multiple times)
 | 
					  --rebuild-file, -f <file>  rebild specific file (can be added multiple times)
 | 
				
			||||||
@@ -100,6 +103,9 @@ GENERATED FILES
 | 
				
			|||||||
    * ax_init_standard_project.m4 - auxiliary macro definition file
 | 
					    * ax_init_standard_project.m4 - auxiliary macro definition file
 | 
				
			||||||
    * ax_cxx_compile_stdcxx_11.m4 - auxiliary macro definition file
 | 
					    * ax_cxx_compile_stdcxx_11.m4 - auxiliary macro definition file
 | 
				
			||||||
    * 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-rpmbuilddeps.sh - script to install RPM package dependencies
 | 
				
			||||||
 | 
					    * 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
 | 
				
			||||||
    * NEWS - empty file add your project's news
 | 
					    * NEWS - empty file add your project's news
 | 
				
			||||||
@@ -165,13 +171,13 @@ FILE DEPENDENCIES
 | 
				
			|||||||
    * 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_CXX_CHECK_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
 | 
				
			||||||
    * debian/${DEFAULT_PROJECT_NAME}-dev.install depends on AX_USE_LIBTOOL
 | 
					    * debian/${DEFAULT_PROJECT_NAME}-dev.install depends on AX_USE_LIBTOOL
 | 
				
			||||||
    * debian/${DEFAULT_PROJECT_NAME}-dev.dirs depends on AX_USE_LIBTOOL
 | 
					    * debian/${DEFAULT_PROJECT_NAME}-dev.dirs depends on AX_USE_LIBTOOL
 | 
				
			||||||
    * ${DEFAULT_PROJECT_NAME}.spec.in dependson AX_USE_RPM_PACKAGING,
 | 
					    * ${DEFAULT_PROJECT_NAME}.spec.in depends on AX_USE_RPM_PACKAGING,
 | 
				
			||||||
      AX_USE_LIBTOOL, AX_CXX_CHECK_QT, AX_CXX_QT, AX_USE_CPPUNIT
 | 
					      AX_USE_LIBTOOL, AX_CHECK_QT, AX_REQUIRE_QT, AX_CXX_QT, AX_USE_CPPUNIT
 | 
				
			||||||
 | 
					
 | 
				
			||||||
FILES
 | 
					FILES
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -276,7 +282,8 @@ run() {
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
testtag() {
 | 
					testtag() {
 | 
				
			||||||
    egrep -q '^ *'"$1" configure.ac
 | 
					    local IFS="|"
 | 
				
			||||||
 | 
					    egrep -q '^ *'"($*)" configure.ac
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
contains() {
 | 
					contains() {
 | 
				
			||||||
@@ -381,6 +388,9 @@ copy ${MY_NAME}
 | 
				
			|||||||
copy ax_init_standard_project.m4
 | 
					copy ax_init_standard_project.m4
 | 
				
			||||||
copy ax_cxx_compile_stdcxx_11.m4
 | 
					copy ax_cxx_compile_stdcxx_11.m4
 | 
				
			||||||
copy ax_check_qt.m4
 | 
					copy ax_check_qt.m4
 | 
				
			||||||
 | 
					copy resolve-debbuilddeps.sh
 | 
				
			||||||
 | 
					copy resolve-rpmbuilddeps.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)
 | 
				
			||||||
if test -z "${AUTHOR}"; then
 | 
					if test -z "${AUTHOR}"; then
 | 
				
			||||||
@@ -420,6 +430,7 @@ AX_INIT_STANDARD_PROJECT
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
# qt features, uncomment, what you need:
 | 
					# qt features, uncomment, what you need:
 | 
				
			||||||
#AX_CHECK_QT([QT], [QtCore QtGui QtNetwork], [QtWidgets])
 | 
					#AX_CHECK_QT([QT], [QtCore QtGui QtNetwork], [QtWidgets])
 | 
				
			||||||
 | 
					#AX_REQUIRE_QT([QT], [QtCore QtGui QtNetwork], [QtWidgets])
 | 
				
			||||||
#AX_QT_NO_KEYWORDS
 | 
					#AX_QT_NO_KEYWORDS
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# create output
 | 
					# create output
 | 
				
			||||||
@@ -691,7 +702,7 @@ 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_CXX_CHECK_QT; then echo -n ", qtbase5-dev | libqt4-dev, qtbase5-dev-tools | qt4-dev-tools"; fi)
 | 
					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)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
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)
 | 
				
			||||||
@@ -724,6 +735,7 @@ usr/lib/lib*.a
 | 
				
			|||||||
usr/lib/lib*.so
 | 
					usr/lib/lib*.so
 | 
				
			||||||
usr/lib/pkgconfig/*
 | 
					usr/lib/pkgconfig/*
 | 
				
			||||||
usr/lib/*.la
 | 
					usr/lib/*.la
 | 
				
			||||||
 | 
					usr/share/${PACKAGE_NAME}
 | 
				
			||||||
usr/share/doc/${PACKAGE_NAME}/html
 | 
					usr/share/doc/${PACKAGE_NAME}/html
 | 
				
			||||||
EOF
 | 
					EOF
 | 
				
			||||||
    to --mode "u=rwx,g=rwx,o=rx" debian/rules <<EOF
 | 
					    to --mode "u=rwx,g=rwx,o=rx" debian/rules <<EOF
 | 
				
			||||||
@@ -744,11 +756,14 @@ else
 | 
				
			|||||||
  echo Applications/...;
 | 
					  echo Applications/...;
 | 
				
			||||||
fi)
 | 
					fi)
 | 
				
			||||||
Source0: %{name}-%{version}.tar.gz
 | 
					Source0: %{name}-%{version}.tar.gz
 | 
				
			||||||
 | 
					BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
 | 
				
			||||||
BuildRequires: gnupg, subversion, automake, autoconf$(
 | 
					BuildRequires: gnupg, subversion, automake, autoconf$(
 | 
				
			||||||
    if testtag AX_USE_DOXYGEN; then
 | 
					    if testtag AX_USE_DOXYGEN; then
 | 
				
			||||||
      echo -n ", doxygen, graphviz";
 | 
					      echo -n ", doxygen";
 | 
				
			||||||
    fi)
 | 
					    fi)
 | 
				
			||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
 | 
					%if 0%{?fedora} != 20
 | 
				
			||||||
 | 
					$(if testtag AX_USE_DOXYGEN; then echo -n "BuildRequires: graphviz"; fi)
 | 
				
			||||||
 | 
					%endif
 | 
				
			||||||
%if 0%{?fedora} || 0%{?rhel} || 0%{?rhl} || 0%{?centos} || 0%{?centos_ver} || 0%{?centos_version}
 | 
					%if 0%{?fedora} || 0%{?rhel} || 0%{?rhl} || 0%{?centos} || 0%{?centos_ver} || 0%{?centos_version}
 | 
				
			||||||
BuildRequires: pkgconfig, redhat-lsb$(
 | 
					BuildRequires: pkgconfig, redhat-lsb$(
 | 
				
			||||||
    if testtag AX_USE_CPPUNIT; then
 | 
					    if testtag AX_USE_CPPUNIT; then
 | 
				
			||||||
@@ -756,9 +771,9 @@ BuildRequires: pkgconfig, redhat-lsb$(
 | 
				
			|||||||
    fi)
 | 
					    fi)
 | 
				
			||||||
%if ! ( 0%{?centos} || 0%{?centos_ver} || 0%{?centos_version} )
 | 
					%if ! ( 0%{?centos} || 0%{?centos_ver} || 0%{?centos_version} )
 | 
				
			||||||
$(if testtag AX_USE_DOXYGEN; then echo -n "BuildRequires: mscgen"; fi)
 | 
					$(if testtag AX_USE_DOXYGEN; then echo -n "BuildRequires: mscgen"; fi)
 | 
				
			||||||
$(if testtag AX_REQUIRE_QT || testtag AX_CHECK_QT; then echo -n "BuildRequires: qt5-qtbase-devel, qt5-qttools, qt5-qtwebkit-devel"; fi)
 | 
					$(if testtag AX_REQUIRE_QT || testtag AX_CHECK_QT AX_REQUIRE_QT; then echo -n "BuildRequires: qt5-qtbase-devel, qt5-qttools, qt5-qtwebkit-devel"; fi)
 | 
				
			||||||
%else
 | 
					%else
 | 
				
			||||||
$(if testtag AX_REQUIRE_QT || testtag AX_CHECK_QT; then echo -n "BuildRequires: qt-devel"; fi)
 | 
					$(if testtag AX_REQUIRE_QT || testtag AX_CHECK_QT AX_REQUIRE_QT; then echo -n "BuildRequires: qt-devel"; fi)
 | 
				
			||||||
%endif
 | 
					%endif
 | 
				
			||||||
%else%if 0%{?suse_version} || 0%{?sles_version}
 | 
					%else%if 0%{?suse_version} || 0%{?sles_version}
 | 
				
			||||||
BuildRequires: pkg-config, lsb-release$(
 | 
					BuildRequires: pkg-config, lsb-release$(
 | 
				
			||||||
@@ -766,9 +781,9 @@ BuildRequires: pkg-config, lsb-release$(
 | 
				
			|||||||
      echo -n ", libcppunit-devel";
 | 
					      echo -n ", libcppunit-devel";
 | 
				
			||||||
    fi)
 | 
					    fi)
 | 
				
			||||||
%if 0%{?suse_version} < 1200 ||  0%{?sles_version} < 1200
 | 
					%if 0%{?suse_version} < 1200 ||  0%{?sles_version} < 1200
 | 
				
			||||||
$(if testtag AX_REQUIRE_QT || testtag AX_CHECK_QT; then echo -n "BuildRequires: libqt4-devel, qt4-x11-tools, libQtWebKit-devel"; fi)
 | 
					$(if testtag AX_REQUIRE_QT || testtag AX_CHECK_QT AX_REQUIRE_QT; then echo -n "BuildRequires: libqt4-devel, qt4-x11-tools, libQtWebKit-devel"; fi)
 | 
				
			||||||
%else
 | 
					%else
 | 
				
			||||||
$(if testtag AX_REQUIRE_QT || testtag AX_CHECK_QT; then echo -n "BuildRequires: libqt5-qtbase-devel, libqt5-qttools, libQt5WebKit5-devel"; fi)
 | 
					$(if testtag AX_REQUIRE_QT || testtag AX_CHECK_QT AX_REQUIRE_QT; then echo -n "BuildRequires: libqt5-qtbase-devel, libqt5-qttools, libQt5WebKit5-devel"; fi)
 | 
				
			||||||
%endif
 | 
					%endif
 | 
				
			||||||
%endif%endif
 | 
					%endif%endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -783,6 +798,7 @@ fi)
 | 
				
			|||||||
%prep
 | 
					%prep
 | 
				
			||||||
%setup -q
 | 
					%setup -q
 | 
				
			||||||
./configure --prefix=/usr \\
 | 
					./configure --prefix=/usr \\
 | 
				
			||||||
 | 
					            --sysconfdir=/etc \\
 | 
				
			||||||
            --docdir=/usr/share/doc/packages/@PACKAGE_NAME@ \\
 | 
					            --docdir=/usr/share/doc/packages/@PACKAGE_NAME@ \\
 | 
				
			||||||
            --libdir=/usr/%_lib
 | 
					            --libdir=/usr/%_lib
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -800,15 +816,21 @@ rm -rf \$RPM_BUILD_ROOT
 | 
				
			|||||||
$(if testtag AX_USE_LIBTOOL; then
 | 
					$(if testtag AX_USE_LIBTOOL; then
 | 
				
			||||||
echo '/usr/%_lib/@PACKAGE_NAME@.so.*'
 | 
					echo '/usr/%_lib/@PACKAGE_NAME@.so.*'
 | 
				
			||||||
else
 | 
					else
 | 
				
			||||||
echo /usr/bin/
 | 
					echo '/usr/bin/*'
 | 
				
			||||||
fi)
 | 
					fi)
 | 
				
			||||||
%doc
 | 
					%doc
 | 
				
			||||||
 | 
					$(if testtag AX_USE_LIBTOOL; then
 | 
				
			||||||
 | 
					  cat <<EOF2
 | 
				
			||||||
/usr/share/doc/packages/@PACKAGE_NAME@/AUTHORS
 | 
					/usr/share/doc/packages/@PACKAGE_NAME@/AUTHORS
 | 
				
			||||||
/usr/share/doc/packages/@PACKAGE_NAME@/COPYING
 | 
					/usr/share/doc/packages/@PACKAGE_NAME@/COPYING
 | 
				
			||||||
/usr/share/doc/packages/@PACKAGE_NAME@/ChangeLog
 | 
					/usr/share/doc/packages/@PACKAGE_NAME@/ChangeLog
 | 
				
			||||||
/usr/share/doc/packages/@PACKAGE_NAME@/INSTALL
 | 
					/usr/share/doc/packages/@PACKAGE_NAME@/INSTALL
 | 
				
			||||||
/usr/share/doc/packages/@PACKAGE_NAME@/NEWS
 | 
					/usr/share/doc/packages/@PACKAGE_NAME@/NEWS
 | 
				
			||||||
/usr/share/doc/packages/@PACKAGE_NAME@/README
 | 
					/usr/share/doc/packages/@PACKAGE_NAME@/README
 | 
				
			||||||
 | 
					EOF2
 | 
				
			||||||
 | 
					else
 | 
				
			||||||
 | 
					  echo '/usr/share/*'
 | 
				
			||||||
 | 
					fi)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
$(if testtag AX_USE_LIBTOOL; then
 | 
					$(if testtag AX_USE_LIBTOOL; then
 | 
				
			||||||
cat <<EOF2
 | 
					cat <<EOF2
 | 
				
			||||||
@@ -828,8 +850,9 @@ This Package contains all files required for developement.
 | 
				
			|||||||
/usr/%_lib/@PACKAGE_NAME@.a
 | 
					/usr/%_lib/@PACKAGE_NAME@.a
 | 
				
			||||||
/usr/%_lib/@PACKAGE_NAME@.la
 | 
					/usr/%_lib/@PACKAGE_NAME@.la
 | 
				
			||||||
/usr/%_lib/pkgconfig
 | 
					/usr/%_lib/pkgconfig
 | 
				
			||||||
/usr/include/
 | 
					/usr/include/*
 | 
				
			||||||
%doc
 | 
					%doc
 | 
				
			||||||
 | 
					/usr/share/@PACKAGE_NAME@
 | 
				
			||||||
/usr/share/doc/packages/@PACKAGE_NAME@/html
 | 
					/usr/share/doc/packages/@PACKAGE_NAME@/html
 | 
				
			||||||
EOF2
 | 
					EOF2
 | 
				
			||||||
fi)
 | 
					fi)
 | 
				
			||||||
@@ -853,6 +876,7 @@ ${HEADER}prefix=@prefix@
 | 
				
			|||||||
exec_prefix=@exec_prefix@
 | 
					exec_prefix=@exec_prefix@
 | 
				
			||||||
libdir=\${exec_prefix}/lib
 | 
					libdir=\${exec_prefix}/lib
 | 
				
			||||||
includedir=\${prefix}/include
 | 
					includedir=\${prefix}/include
 | 
				
			||||||
 | 
					translationsdir=@datadir@/@PACKAGE_NAME@/translations
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Name: @PACKAGE_NAME@
 | 
					Name: @PACKAGE_NAME@
 | 
				
			||||||
Description: @DESCRIPTION@
 | 
					Description: @DESCRIPTION@
 | 
				
			||||||
@@ -870,7 +894,7 @@ fi
 | 
				
			|||||||
#### Bootstrap Before Configure ####
 | 
					#### Bootstrap Before Configure ####
 | 
				
			||||||
run --no-check svn2cl
 | 
					run --no-check svn2cl
 | 
				
			||||||
run aclocal
 | 
					run aclocal
 | 
				
			||||||
run libtoolize --force
 | 
					if testtag AX_USE_LIBTOOL; then run libtoolize --force; fi
 | 
				
			||||||
run automake -a
 | 
					run automake -a
 | 
				
			||||||
run autoconf
 | 
					run autoconf
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -881,5 +905,5 @@ fi
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
#### Run Make If User Requires ####
 | 
					#### Run Make If User Requires ####
 | 
				
			||||||
if test "$build" -eq 1; then
 | 
					if test "$build" -eq 1; then
 | 
				
			||||||
    make
 | 
					    make $buildtarget
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										31
									
								
								build-resource-file.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						@@ -0,0 +1,31 @@
 | 
				
			|||||||
 | 
					#! /bin/bash -ex
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## @id $Id$
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## build resource.qrc file from a resource directory
 | 
				
			||||||
 | 
					##
 | 
				
			||||||
 | 
					## Argument: $1: resource path (default: resources)
 | 
				
			||||||
 | 
					## Result: file named <resource-path>.qrc (default: resources.qrc)
 | 
				
			||||||
 | 
					##
 | 
				
			||||||
 | 
					## Call:
 | 
				
			||||||
 | 
					##
 | 
				
			||||||
 | 
					##   cd src
 | 
				
			||||||
 | 
					##   ../build-resource-file.sh
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					##       1         2         3         4         5         6         7         8
 | 
				
			||||||
 | 
					## 45678901234567890123456789012345678901234567890123456789012345678901234567890
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					RESOURCES=${1:-resources}
 | 
				
			||||||
 | 
					TARGET=${RESOURCES}.qrc
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					test -d ${RESOURCES}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					echo "<RCC>" > ${TARGET}
 | 
				
			||||||
 | 
					for d in $(find resources -mindepth 1 -type d); do
 | 
				
			||||||
 | 
					    echo "  <qresource prefix=\"${d#${RESOURCES}/}\">" >> ${TARGET}
 | 
				
			||||||
 | 
					    for f in $(find $d -mindepth 1 -maxdepth 1 -type f); do
 | 
				
			||||||
 | 
					        echo "    <file alias=\"${f##*/}\">$f</file>" >> ${TARGET}
 | 
				
			||||||
 | 
					    done
 | 
				
			||||||
 | 
					    echo "  </qresource>" >> ${TARGET}
 | 
				
			||||||
 | 
					done
 | 
				
			||||||
 | 
					echo "</RCC>" >> ${TARGET}
 | 
				
			||||||
							
								
								
									
										
											BIN
										
									
								
								cordova/logo.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 3.3 KiB  | 
@@ -5,18 +5,20 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
EXTRA_DIST = config.xml.in hooks platforms plugins www
 | 
					EXTRA_DIST = config.xml.in hooks platforms plugins www
 | 
				
			||||||
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
 | 
				
			||||||
wwwdir = ${pkgdatadir}/html
 | 
					wwwdir = ${pkgdatadir}/html
 | 
				
			||||||
www_DATA = ${ANDROID}
 | 
					www_DATA = ${ANDROID}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
${ANDROID_SRC}: ${EXTRA_DIST}
 | 
					${ANDROID_SRC}: ${EXTRA_DIST}
 | 
				
			||||||
	cordova build --release
 | 
						cordova build --debug
 | 
				
			||||||
 | 
					
 | 
				
			||||||
${ANDROID}: ${ANDROID_SRC}
 | 
					${ANDROID}: ${ANDROID_SRC}
 | 
				
			||||||
	mv $< $@
 | 
						mv $< $@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
clean-local:
 | 
					clean-local:
 | 
				
			||||||
	platforms/android/cordova/clean
 | 
						platforms/android/cordova/clean
 | 
				
			||||||
 | 
						-rm -r platforms/android/.gradle
 | 
				
			||||||
 | 
					
 | 
				
			||||||
CLEANFILES = ${ANDROID} ${ANDROID_SRC}
 | 
					CLEANFILES = ${ANDROID} ${ANDROID_SRC}
 | 
				
			||||||
MAINTAINERCLEANFILES = makefile.in
 | 
					MAINTAINERCLEANFILES = makefile.in
 | 
				
			||||||
 
 | 
				
			|||||||
| 
		 Before Width: | Height: | Size: 5.9 KiB  | 
| 
		 Before Width: | Height: | Size: 3.0 KiB  | 
| 
		 Before Width: | Height: | Size: 4.0 KiB  | 
| 
		 Before Width: | Height: | Size: 7.5 KiB  | 
| 
		 Before Width: | Height: | Size: 7.5 KiB After Width: | Height: | Size: 3.3 KiB  | 
							
								
								
									
										44
									
								
								resolve-debbuilddeps.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						@@ -0,0 +1,44 @@
 | 
				
			|||||||
 | 
					#! /bin/bash -ex
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## @id $Id$
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## Resolve Debian Build Dependencies
 | 
				
			||||||
 | 
					## Installs all the required packages
 | 
				
			||||||
 | 
					## Call: ./resolve-debbuilddeps 'name of build schroot'
 | 
				
			||||||
 | 
					## e.g. call: ./resolve-debbuilddeps trusty_amd64
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					##       1         2         3         4         5         6         7         8
 | 
				
			||||||
 | 
					## 45678901234567890123456789012345678901234567890123456789012345678901234567890
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					SCHROOTNAME="$1"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					sed 's,@[^@]*@, dummytext,g' debian/control.in > debian/control
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					if test -n "${SCHROOTNAME}"; then
 | 
				
			||||||
 | 
					  DEPS=$(schroot -c "${SCHROOTNAME}" -- dpkg-checkbuilddeps 2>&1 || true)
 | 
				
			||||||
 | 
					else
 | 
				
			||||||
 | 
					  DEPS=$(dpkg-checkbuilddeps 2>&1 || true)
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
 | 
					DEPS=$(echo "$DEPS" | sed -n '/Unmet build dependencies/ { s,.*Unmet build dependencies: ,,g; s, ([^)]*),,g; s, *| *,|,g; p}')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					for pa in ${DEPS}; do
 | 
				
			||||||
 | 
					    success=0
 | 
				
			||||||
 | 
					    for p in $(echo "${pa}" | sed 's,|, ,g'); do
 | 
				
			||||||
 | 
					        if test -n "${SCHROOTNAME}"; then
 | 
				
			||||||
 | 
					            if schroot -c "${SCHROOTNAME}" -u root -d / -- apt-get -y install ${p}; then
 | 
				
			||||||
 | 
					                success=1
 | 
				
			||||||
 | 
					                break;
 | 
				
			||||||
 | 
					            fi
 | 
				
			||||||
 | 
					        else
 | 
				
			||||||
 | 
					            if sudo apt-get -y install ${p}; then
 | 
				
			||||||
 | 
					                success=1
 | 
				
			||||||
 | 
					                break;
 | 
				
			||||||
 | 
					            fi
 | 
				
			||||||
 | 
					        fi
 | 
				
			||||||
 | 
					    done
 | 
				
			||||||
 | 
					    if test ${success} -eq 0; then
 | 
				
			||||||
 | 
					        echo "**** Error: Installation Failed: ${pa}"
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
 | 
					done
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					echo "**** Success: All Dependencies Resolved"
 | 
				
			||||||
							
								
								
									
										34
									
								
								resolve-rpmbuilddeps.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						@@ -0,0 +1,34 @@
 | 
				
			|||||||
 | 
					#! /bin/bash -ex
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## @id $Id$
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## Resolve RPM Build Dependencies
 | 
				
			||||||
 | 
					## Installs all the required packages
 | 
				
			||||||
 | 
					## Call: ./resolve-rpmbuilddeps 'name of build schroot'
 | 
				
			||||||
 | 
					## e.g. call: ./resolve-rpmbuilddeps opensuse-13.2_x86_64
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					##       1         2         3         4         5         6         7         8
 | 
				
			||||||
 | 
					## 45678901234567890123456789012345678901234567890123456789012345678901234567890
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					SCHROOTNAME="$1"
 | 
				
			||||||
 | 
					PACKAGE_NAME=$(sed -n 's/^ *m4_define(x_package_name, \(.*\)).*/\1/p' configure.ac)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					sed 's,@[^@]*@,dummytext,g' ${PACKAGE_NAME}.spec.in > ${PACKAGE_NAME}.spec
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					if test -n "${SCHROOTNAME}"; then
 | 
				
			||||||
 | 
					    FILES=$(LANG= schroot -c ${SCHROOTNAME} -- rpmbuild -bb --define "_topdir ." --define "_sourcedir ." ${PACKAGE_NAME}.spec  2>&1 | sed -n 's, is needed by.*,,p')
 | 
				
			||||||
 | 
					    if test -n "${FILES}"; then
 | 
				
			||||||
 | 
					        schroot -c ${SCHROOTNAME} -u root -- yum install -y ${FILES} || \
 | 
				
			||||||
 | 
					            schroot -c ${SCHROOTNAME} -u root -- zypper install -y ${FILES} || \
 | 
				
			||||||
 | 
					        schroot -c ${SCHROOTNAME} -u root -- dnf install -y ${FILES}
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
 | 
					else
 | 
				
			||||||
 | 
					    FILES=$(LANG= rpmbuild -bb --define "_topdir ." --define "_sourcedir ." ${PACKAGE_NAME}.spec 2>&1 | sed -n 's, is needed by.*,,p')
 | 
				
			||||||
 | 
					    if test -n "${FILES}"; then
 | 
				
			||||||
 | 
					        yum install -y ${FILES} || \
 | 
				
			||||||
 | 
					            zypper install -y ${FILES} || \
 | 
				
			||||||
 | 
					            dnf install -y ${FILES}
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					echo "**** Success: All Dependencies Resolved"
 | 
				
			||||||