update buildsystem
This commit is contained in:
		| @@ -119,10 +119,17 @@ AC_DEFUN([AX_CHECK_QT], [ | |||||||
|     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) |     qt_host_bins=$(${PKG_CONFIG} --variable=host_bins Qt5Core) | ||||||
|     if test -d "${qt_host_bins}"; then |     qt_libdir=$(${PKG_CONFIG} --variable=libdir Qt5Core) | ||||||
|       QT_PLUGIN_PATH=${qt_host_bins}/../plugins |     if test -d "${qt_libdir}" -a -d "${qt_libdir}/plugins"; then | ||||||
|     else |       QT_PLUGIN_PATH="${qt_libdir}/plugins" | ||||||
|       QT_PLUGIN_PATH=${QTDIR}/share/qt5/plugins |     elif test -d "${qt_libdir}/qt5" -a -d "${qt_libdir}/qt5/plugins"; then | ||||||
|  |       QT_PLUGIN_PATH="${qt_libdir}/qt5/plugins" | ||||||
|  |     elif test -d "${qt_host_bins}" -a -d "${qt_host_bins}/../plugins"; then | ||||||
|  |       QT_PLUGIN_PATH="${qt_host_bins}/../plugins" | ||||||
|  |     elif test -d "${QTDIR}/plugins; then | ||||||
|  |       QT_PLUGIN_PATH="${QTDIR}/plugins" | ||||||
|  |     elif test -d "${QTDIR}/share/qt5/plugins; then | ||||||
|  |       QT_PLUGIN_PATH="${QTDIR}/share/qt5/plugins" | ||||||
|     fi |     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}" | ||||||
| @@ -166,10 +173,17 @@ AC_DEFUN([AX_CHECK_QT], [ | |||||||
|       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) |       qt_host_bins=$(${PKG_CONFIG} --variable=host_bins QtCore) | ||||||
|       if test -d "${qt_host_bins}"; then |       qt_libdir=$(${PKG_CONFIG} --variable=libdir QtCore) | ||||||
|         QT_PLUGIN_PATH=${qt_host_bins}/../plugins |       if test -d "${qt_libdir}" -a -d "${qt_libdir}/plugins"; then | ||||||
|       else |         QT_PLUGIN_PATH="${qt_libdir}/plugins" | ||||||
|         QT_PLUGIN_PATH=${QTDIR}/share/qt/plugins |       elif test -d "${qt_libdir}/qt5" -a -d "${qt_libdir}/qt5/plugins"; then | ||||||
|  |         QT_PLUGIN_PATH="${qt_libdir}/qt5/plugins" | ||||||
|  |       elif test -d "${qt_host_bins}" -a -d "${qt_host_bins}/../plugins"; then | ||||||
|  |         QT_PLUGIN_PATH="${qt_host_bins}/../plugins" | ||||||
|  |       elif test -d "${QTDIR}/plugins; then | ||||||
|  |         QT_PLUGIN_PATH="${QTDIR}/plugins" | ||||||
|  |       elif test -d "${QTDIR}/share/qt5/plugins; then | ||||||
|  |         QT_PLUGIN_PATH="${QTDIR}/share/qt5/plugins" | ||||||
|       fi |       fi | ||||||
|       MOC_FLAGS+=" -DHAVE_$1=1 ${$1_CFLAGS}" |       MOC_FLAGS+=" -DHAVE_$1=1 ${$1_CFLAGS}" | ||||||
|       [$1]_CPPFLAGS="${[$1]_CFLAGS}" |       [$1]_CPPFLAGS="${[$1]_CFLAGS}" | ||||||
| @@ -214,9 +228,6 @@ AC_DEFUN([AX_CHECK_QT], [ | |||||||
|     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 |   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], |   AC_ARG_WITH([qt-plugin-path], | ||||||
|               [AS_HELP_STRING([--with-qt-plugin-path=PATH], |               [AS_HELP_STRING([--with-qt-plugin-path=PATH], | ||||||
|                               [define a different qt plugin path, current @<:@default=check@:>@])], |                               [define a different qt plugin path, current @<:@default=check@:>@])], | ||||||
|   | |||||||
| @@ -1,4 +1,4 @@ | |||||||
| ## @id $Id$ | ## @id $Id: ax_init_standard_project.m4 204 2016-09-29 18:29:53Z marc $ | ||||||
|  |  | ||||||
| ##       1         2         3         4         5         6         7         8 | ##       1         2         3         4         5         6         7         8 | ||||||
| ## 45678901234567890123456789012345678901234567890123456789012345678901234567890 | ## 45678901234567890123456789012345678901234567890123456789012345678901234567890 | ||||||
| @@ -218,8 +218,17 @@ AC_DEFUN([AX_INIT_STANDARD_PROJECT], [ | |||||||
|   AX_SUBST(AUTHOR_URL) |   AX_SUBST(AUTHOR_URL) | ||||||
|   AX_SUBST(AUTHOR_MAIL) |   AX_SUBST(AUTHOR_MAIL) | ||||||
|   AX_SUBST(PACKAGER) |   AX_SUBST(PACKAGER) | ||||||
|   PROJECT_URL="${PROJECT_URL:-${AUTHOR_URL}/projects/${PACKAGE_NAME}}" |   PROJECT_URL="${PROJECT_URL:-${AUTHOR_URL}}" | ||||||
|   SOURCE_DOWNLOAD="${SOURCE_DOWNLOAD:-${AUTHOR_URL}/downloads/${PACKAGE_NAME}}" |   for path in . .. ../.. ../../..; do | ||||||
|  |     if test -d ${path}/.svn; then | ||||||
|  |       PROJECT_URL="$(LANG= svn info | sed -n 's,^Repository Root: ,,p')" | ||||||
|  |       break | ||||||
|  |     elif test -d ${path}/.git; then | ||||||
|  |       PROJECT_URL="$(git remote get-url origin)" | ||||||
|  |       break | ||||||
|  |     fi | ||||||
|  |   done | ||||||
|  |   SOURCE_DOWNLOAD="${SOURCE_DOWNLOAD:-${PROJECT_URL}}" | ||||||
|   AX_SUBST(PROJECT_URL) |   AX_SUBST(PROJECT_URL) | ||||||
|   AX_SUBST(SOURCE_DOWNLOAD) |   AX_SUBST(SOURCE_DOWNLOAD) | ||||||
|   VENDOR=$((lsb_release -is 2>/dev/null || echo unknown) | tr ' ' '_') |   VENDOR=$((lsb_release -is 2>/dev/null || echo unknown) | tr ' ' '_') | ||||||
| @@ -365,12 +374,13 @@ AC_DEFUN([AX_USE_CXX], [ | |||||||
| #### Begin: Appended by $0 | #### Begin: Appended by $0 | ||||||
| %.app: % | %.app: % | ||||||
| 	-rm -r [\$][@] | 	-rm -r [\$][@] | ||||||
| 	\$(MAKE) DESTDIR=[\$][\$](pwd)/[\$][@]/tmp install | 	\$(MAKE) DESTDIR=[\$][\$](pwd)/tmp install | ||||||
| 	QTDIR="\${QTDIR}" \ | 	QTDIR="\${QTDIR}" \ | ||||||
| 	QT_PLUGINS="\${QT_PLUGINS}" \ | 	QT_PLUGINS="\${QT_PLUGINS}" \ | ||||||
| 	QT_PLUGIN_PATH="\${QT_PLUGIN_PATH}" \ | 	QT_PLUGIN_PATH="\${QT_PLUGIN_PATH}" \ | ||||||
| 	  \${top_builddir}/mac-create-app-bundle.sh \ | 	  \${top_builddir}/mac-create-app-bundle.sh \ | ||||||
| 	    [\$][@] [\$][<] [\$][\$](pwd)/[\$][@]/tmp\${prefix} | 	    [\$][@] [\$][<] [\$][\$](pwd)/tmp[\$]{prefix} | ||||||
|  | 	-rm -rf tmp | ||||||
|  |  | ||||||
| maintainer-clean-cxx-targets: | maintainer-clean-cxx-targets: | ||||||
| 	-rm makefile.in | 	-rm makefile.in | ||||||
| @@ -857,7 +867,7 @@ AC_DEFUN([AX_PKG_REQUIRE], [ | |||||||
|   DEV_DIST_PKG= |   DEV_DIST_PKG= | ||||||
|   pkg=m4_default([$2], [$1]) |   pkg=m4_default([$2], [$1]) | ||||||
|   $6 |   $6 | ||||||
|   dep_pkg=${DEV_DEB_DIST_PKG:-${DEV_DIST_PKG:-${pkg}}-dev} |   deb_pkg=${DEV_DEB_DIST_PKG:-${DEV_DIST_PKG:-${pkg}}-dev} | ||||||
|   rpm_pkg=${DEV_RPM_DIST_PKG:-${DEV_DIST_PKG:-${pkg}}-devel} |   rpm_pkg=${DEV_RPM_DIST_PKG:-${DEV_DIST_PKG:-${pkg}}-devel} | ||||||
|   if test -n "$4"; then |   if test -n "$4"; then | ||||||
|     for f in $pkg $4; do |     for f in $pkg $4; do | ||||||
| @@ -1066,37 +1076,37 @@ AC_DEFUN([AX_CHECK_VALID_LD_FLAG], [ | |||||||
|  |  | ||||||
| # Check if a package exists in the current distribution, if yes, require it | # Check if a package exists in the current distribution, if yes, require it | ||||||
| # in debian/control.in append @DEB_DEPEND_IFEXISTS@ to Build-Depends | # in debian/control.in append @DEB_DEPEND_IFEXISTS@ to Build-Depends | ||||||
|  | # if you pass a list, it will require the first matching, if any matches | ||||||
| #  - parameter: | #  - parameter: | ||||||
| #     $1 = package name | #     $1 = space separated list of package names | ||||||
| AC_DEFUN([AX_DEB_DEPEND_IFEXISTS], [ | AC_DEFUN([AX_DEB_DEPEND_IFEXISTS], [ | ||||||
|   pkg="$1" |   for pkg in $1; do | ||||||
|   if test -n "$(apt-cache policy -q ${pkg} 2> /dev/null)"; then |     if test -n "$(apt-cache policy -q ${pkg} 2> /dev/null)"; then | ||||||
|      DEB_DEPEND_IFEXISTS="${DEB_DEPEND_IFEXISTS}, ${pkg}" |        DEB_DEPEND_IFEXISTS="${DEB_DEPEND_IFEXISTS}, ${pkg}" | ||||||
|   fi |        break | ||||||
|  |     fi | ||||||
|  |   done | ||||||
| ]) | ]) | ||||||
|  |  | ||||||
| # require package in debian/control.in append @DEB_BUILD_DEPEND@ to Build-Depends | # require package in debian/control.in append @DEB_BUILD_DEPEND@ to Build-Depends | ||||||
| #  - parameter: | #  - parameter: | ||||||
| #     $1 = package name | #     $1 = package name | ||||||
| AC_DEFUN([AX_DEB_BUILD_DEPEND], [ | AC_DEFUN([AX_DEB_BUILD_DEPEND], [ | ||||||
|   pkg="$1" |   DEB_BUILD_DEPEND="${DEB_BUILD_DEPEND}, $1" | ||||||
|   DEB_BUILD_DEPEND="${DEB_BUILD_DEPEND}, ${pkg}" |  | ||||||
| ]) | ]) | ||||||
|  |  | ||||||
| # require package in debian/control.in append @DEB_DEPEND@ to Depends | # require package in debian/control.in append @DEB_DEPEND@ to Depends | ||||||
| #  - parameter: | #  - parameter: | ||||||
| #     $1 = package name | #     $1 = package name | ||||||
| AC_DEFUN([AX_DEB_DEPEND], [ | AC_DEFUN([AX_DEB_DEPEND], [ | ||||||
|   pkg="$1" |   DEB_DEPEND="${DEB_DEPEND}, $1" | ||||||
|   DEB_DEPEND="${DEB_DEPEND}, ${pkg}" |  | ||||||
| ]) | ]) | ||||||
|  |  | ||||||
| # require package in debian/control.in append @DEB_DEPEND@ to Depends | # require package in debian/control.in append @DEB_DEPEND@ to Depends | ||||||
| #  - parameter: | #  - parameter: | ||||||
| #     $1 = package name | #     $1 = package name | ||||||
| AC_DEFUN([AX_DEB_SECTION], [ | AC_DEFUN([AX_DEB_SECTION], [ | ||||||
|   pkg="$1" |   DEB_SECTION="$1" | ||||||
|   DEB_SECTION="${pkg}" |  | ||||||
| ]) | ]) | ||||||
|  |  | ||||||
| # call after setting debian dependencies | # call after setting debian dependencies | ||||||
| @@ -1109,36 +1119,36 @@ AC_DEFUN([AX_DEB_RESOLVE], [ | |||||||
|  |  | ||||||
| # Check if a package exists in the current distribution, if yes, require it | # Check if a package exists in the current distribution, if yes, require it | ||||||
| # in .spec.in append @RPM_DEPEND_IFEXISTS@ to Build-Depends | # in .spec.in append @RPM_DEPEND_IFEXISTS@ to Build-Depends | ||||||
|  | # if you pass a list, it will require the first matching, if any matches | ||||||
| #  - parameter: | #  - parameter: | ||||||
| #     $1 = package name | #     $1 = space separated package names | ||||||
| AC_DEFUN([AX_RPM_DEPEND_IFEXISTS], [ | AC_DEFUN([AX_RPM_DEPEND_IFEXISTS], [ | ||||||
|   pkg="$1" |   for pkg in $1; do | ||||||
|    |     if (test -x /usr/bin/zypper && zypper search -x "$pkg" 1>&2 > /dev/null) || \ | ||||||
|   if (test -x /usr/bin/zypper && zypper search -x "$pkg" 1>&2 > /dev/null) || \ |        (test -x /usr/bin/dnf && dnf list -q "$pkg" 1>&2 > /dev/null) || \ | ||||||
|      (test -x /usr/bin/dnf && dnf list -q "$pkg" 1>&2 > /dev/null) || \ |        (test -x /usr/bin/yum && yum list -q "$pkg" 1>&2 > /dev/null) || \ | ||||||
|      (test -x /usr/bin/yum && yum list -q "$pkg" 1>&2 > /dev/null) || \ |        (test -x /usr/sbin/urpmq && urpmq "$pkg" 1>&2 > /dev/null); then | ||||||
|      (test -x /usr/sbin/urpmq && urpmq "$pkg" 1>&2 > /dev/null); then |          RPM_DEPEND_IFEXISTS="${RPM_DEPEND_IFEXISTS}, ${pkg}" | ||||||
|        RPM_DEPEND_IFEXISTS="${RPM_DEPEND_IFEXISTS}, ${pkg}" | 	 break | ||||||
|   fi |     fi | ||||||
|  |   done | ||||||
| ]) | ]) | ||||||
|  |  | ||||||
| # require package in .spec.in append @RPM_BUILD_DEPEND@ to Build-Depends | # require package in .spec.in append @RPM_BUILD_DEPEND@ to Build-Depends | ||||||
| #  - parameter: | #  - parameter: | ||||||
| #     $1 = package name | #     $1 = package name | ||||||
| AC_DEFUN([AX_RPM_BUILD_DEPEND], [ | AC_DEFUN([AX_RPM_BUILD_DEPEND], [ | ||||||
|   pkg="$1" |   RPM_BUILD_DEPEND="${RPM_BUILD_DEPEND}, $1" | ||||||
|   RPM_BUILD_DEPEND="${RPM_BUILD_DEPEND}, ${pkg}" |  | ||||||
| ]) | ]) | ||||||
|  |  | ||||||
| # require package in .spec.in append @RPM_DEPEND@ to Depends | # require package in .spec.in append @RPM_DEPEND@ to Depends | ||||||
| #  - parameter: | #  - parameter: | ||||||
| #     $1 = package name | #     $1 = package name | ||||||
| AC_DEFUN([AX_RPM_DEPEND], [ | AC_DEFUN([AX_RPM_DEPEND], [ | ||||||
|   pkg="$1" |  | ||||||
|   if test -z "${RPM_DEPEND}"; then |   if test -z "${RPM_DEPEND}"; then | ||||||
|     RPM_DEPEND="${pkg}" |     RPM_DEPEND="$1" | ||||||
|   else |   else | ||||||
|     RPM_DEPEND="${RPM_DEPEND}, ${pkg}" |     RPM_DEPEND="${RPM_DEPEND}, $1" | ||||||
|   fi |   fi | ||||||
| ]) | ]) | ||||||
|  |  | ||||||
| @@ -1146,8 +1156,7 @@ AC_DEFUN([AX_RPM_DEPEND], [ | |||||||
| #  - parameter: | #  - parameter: | ||||||
| #     $1 = package name | #     $1 = package name | ||||||
| AC_DEFUN([AX_RPM_GROUP], [ | AC_DEFUN([AX_RPM_GROUP], [ | ||||||
|   pkg="$1" |   RPM_GROUP="$1" | ||||||
|   RPM_GROUP="${pkg}" |  | ||||||
| ]) | ]) | ||||||
|  |  | ||||||
| # call after setting rpmian dependencies | # call after setting rpmian dependencies | ||||||
| @@ -1160,36 +1169,23 @@ AC_DEFUN([AX_RPM_RESOLVE], [ | |||||||
|  |  | ||||||
| # Check if a package exists in the current distribution, if yes, require it | # Check if a package exists in the current distribution, if yes, require it | ||||||
| # in .spec.in append @ALL_DEPEND_IFEXISTS@ to Build-Depends | # in .spec.in append @ALL_DEPEND_IFEXISTS@ to Build-Depends | ||||||
|  | # if you pass a list, it will require the first matching, if any matches | ||||||
| #  - parameter: | #  - parameter: | ||||||
| #     $1 = package name | #     $1 = space separated list of package names | ||||||
| AC_DEFUN([AX_ALL_DEPEND_IFEXISTS], [ | AC_DEFUN([AX_ALL_DEPEND_IFEXISTS], [ | ||||||
|   pkg="$1" |   AX_DEB_DEPEND_IFEXISTS([$1]) | ||||||
|   if test -n "$(apt-cache policy -q ${pkg} 2> /dev/null)"; then |   AX_RPM_DEPEND_IFEXISTS([$1]) | ||||||
|      DEB_DEPEND_IFEXISTS="${DEB_DEPEND_IFEXISTS}, ${pkg}" |  | ||||||
|   fi |  | ||||||
|   if (test -x /usr/bin/zypper && zypper search -x "$pkg" 1>&2 > /dev/null) || \ |  | ||||||
|      (test -x /usr/bin/dnf && dnf list -q "$pkg" 1>&2 > /dev/null) || \ |  | ||||||
|      (test -x /usr/bin/yum && yum list -q "$pkg" 1>&2 > /dev/null) || \ |  | ||||||
|      (test -x /usr/sbin/urpmq && urpmq "$pkg" 1>&2 > /dev/null); then |  | ||||||
|        RPM_DEPEND_IFEXISTS="${RPM_DEPEND_IFEXISTS}, ${pkg}" |  | ||||||
|   fi |  | ||||||
| ]) | ]) | ||||||
|  |  | ||||||
| # Check if a package exists in the current distribution, if yes, require it | # Check if a package exists in the current distribution, if yes, require it | ||||||
| # in .spec.in append @ALL_DEPEND_IFEXISTS@ to Build-Depends | # in .spec.in append @ALL_DEPEND_IFEXISTS@ to Build-Depends | ||||||
|  | # if you pass a list, it will require the first matching, if any matches | ||||||
| #  - parameter: | #  - parameter: | ||||||
| #     $1 = package name | #     $1 = package name | ||||||
| AC_DEFUN([AX_ALL_DEPEND_IFEXISTS_DEV], [ | AC_DEFUN([AX_ALL_DEPEND_IFEXISTS_DEV], [ | ||||||
|   pkg="$1" |   pkgs="$1" | ||||||
|   if test -n "$(apt-cache policy -q ${pkg}-dev 2> /dev/null)"; then |   AX_DEB_DEPEND_IFEXISTS([${pkgs// /-dev }-dev]) | ||||||
|      DEB_DEPEND_IFEXISTS="${DEB_DEPEND_IFEXISTS}, ${pkg}-dev" |   AX_RPM_DEPEND_IFEXISTS([${pkgs// /-devel }-devel]) | ||||||
|   fi |  | ||||||
|   if (test -x /usr/bin/zypper && zypper search -x "$pkg"-devel 1>&2 > /dev/null) || \ |  | ||||||
|      (test -x /usr/bin/dnf && dnf list -q "$pkg"-devel 1>&2 > /dev/null) || \ |  | ||||||
|      (test -x /usr/bin/yum && yum list -q "$pkg"-devel 1>&2 > /dev/null) || \ |  | ||||||
|      (test -x /usr/sbin/urpmq && urpmq "$pkg"-devel 1>&2 > /dev/null); then |  | ||||||
|        RPM_DEPEND_IFEXISTS="${RPM_DEPEND_IFEXISTS}, ${pkg}-devel" |  | ||||||
|   fi |  | ||||||
| ]) | ]) | ||||||
|  |  | ||||||
| # require package in .spec.in append @ALL_BUILD_DEPEND@ to Build-Depends | # require package in .spec.in append @ALL_BUILD_DEPEND@ to Build-Depends | ||||||
| @@ -1201,6 +1197,15 @@ AC_DEFUN([AX_ALL_BUILD_DEPEND], [ | |||||||
|   RPM_BUILD_DEPEND="${RPM_BUILD_DEPEND}, ${pkg}" |   RPM_BUILD_DEPEND="${RPM_BUILD_DEPEND}, ${pkg}" | ||||||
| ]) | ]) | ||||||
|  |  | ||||||
|  | # require package in .spec.in and control.in, append to runtime depends | ||||||
|  | #  - parameter: | ||||||
|  | #     $1 = package name | ||||||
|  | AC_DEFUN([AX_ALL_DEPEND], [ | ||||||
|  |   pkg="$1" | ||||||
|  |   DEB_DEPEND="${DEB_DEPEND}, ${pkg}" | ||||||
|  |   RPM_DEPEND="${RPM_DEPEND}, ${pkg}" | ||||||
|  | ]) | ||||||
|  |  | ||||||
| # require package in .spec.in append @ALL_BUILD_DEPEND@ to Build-Depends | # require package in .spec.in append @ALL_BUILD_DEPEND@ to Build-Depends | ||||||
| #  - parameter: | #  - parameter: | ||||||
| #     $1 = package name | #     $1 = package name | ||||||
|   | |||||||
							
								
								
									
										31
									
								
								bootstrap.sh
									
									
									
									
									
								
							
							
						
						
									
										31
									
								
								bootstrap.sh
									
									
									
									
									
								
							| @@ -1,7 +1,7 @@ | |||||||
| #! /bin/bash | #! /bin/bash | ||||||
| ## @file | ## @file | ||||||
| ## | ## | ||||||
| ## $Id$ | ## $Id: bootstrap.sh 52 2015-11-03 15:38:21Z marc $ | ||||||
| ## | ## | ||||||
| ## $Date: 2004/08/31 15:57:19 $ | ## $Date: 2004/08/31 15:57:19 $ | ||||||
| ## $Author: marc $ | ## $Author: marc $ | ||||||
| @@ -41,7 +41,7 @@ while test $# -gt 0; do | |||||||
|         (--no-vcs|-n) novcs=1;; |         (--no-vcs|-n) novcs=1;; | ||||||
|         (--exclude-vcs|-x) shift; excludevcs+=("$1");; |         (--exclude-vcs|-x) shift; excludevcs+=("$1");; | ||||||
|         (--version|-v) |         (--version|-v) | ||||||
|             echo "$Id$"; |             echo "$Id: bootstrap.sh 52 2015-11-03 15:38:21Z marc $"; | ||||||
|             exit;; |             exit;; | ||||||
|         (--help|-h) less <<EOF |         (--help|-h) less <<EOF | ||||||
| SYNOPSIS | SYNOPSIS | ||||||
| @@ -1352,7 +1352,7 @@ ${HEADER}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 | ||||||
| LDADD = -l${PACKAGE_NAME#lib} | LDADD = -l${PACKAGE_NAME#lib} | ||||||
|  |  | ||||||
| exampledir = ${docdir}/examples | exampledir = \${docdir}/examples | ||||||
| example_DATA =  | example_DATA =  | ||||||
|  |  | ||||||
| MAINTAINERCLEANFILES = makefile.in | MAINTAINERCLEANFILES = makefile.in | ||||||
| @@ -1605,8 +1605,8 @@ if testtag AX_USE_DEBIAN_PACKAGING; then | |||||||
|  |  | ||||||
|  -- @PACKAGER@  @BUILD_DATE@ |  -- @PACKAGER@  @BUILD_DATE@ | ||||||
| EOF | EOF | ||||||
|     RUN_DEPENDS="$(if testtag AX_USE_NODEJS; then echo -n ", nodejs, npm"; fi)" |     RUN_DEPENDS="$(if testtag AX_USE_NODEJS; then echo -n ", nodejs, npm,"; fi)" | ||||||
|     BUILD_DEPENDS="debhelper, fakeroot, ${VCSDEPENDS_DEB} pkg-config, automake, libtool, autotools-dev, pandoc, lsb-release$(if testtag AX_USE_DOXYGEN; then echo -n ", doxygen, graphviz, mscgen, default-jre-headless|default-jre"; fi; if testtag AX_USE_PERLDOC; then echo -n ", libpod-tree-perl"; 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 | libqt4-core | libqtcore4, 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="gnupg, debhelper, fakeroot, ${VCSDEPENDS_DEB} pkg-config, automake, libtool, libltdl-dev, autotools-dev, pandoc, lsb-release$(if testtag AX_USE_DOXYGEN; then echo -n ", doxygen, graphviz, mscgen, default-jre-headless|default-jre"; fi; if testtag AX_USE_PERLDOC; then echo -n ", libpod-tree-perl"; 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 | libqt4-core | libqtcore4, qt5-qmake | qt4-qmake, qtbase5-dev | libqt4-dev, qtbase5-dev-tools | qt4-dev-tools, qttools5-dev-tools | qt4-dev-tools, qttools5-dev | qt4-dev,"; fi)" | ||||||
|     to debian/control.in <<EOF |     to debian/control.in <<EOF | ||||||
| Source: @PACKAGE_NAME@ | Source: @PACKAGE_NAME@ | ||||||
| Priority: extra | Priority: extra | ||||||
| @@ -1646,6 +1646,9 @@ usr/lib/lib*.so | |||||||
| usr/lib/pkgconfig/* | usr/lib/pkgconfig/* | ||||||
| usr/lib/*.la | usr/lib/*.la | ||||||
| usr/share/doc/${PACKAGE_NAME}/html | usr/share/doc/${PACKAGE_NAME}/html | ||||||
|  | $(if testtag AX_BUILD_EXAMPLES; then | ||||||
|  |   echo usr/share/doc/${PACKAGE_NAME}/examples | ||||||
|  | fi) | ||||||
| EOF | EOF | ||||||
|     to --mode "u=rwx,g=rwx,o=rx" debian/rules <<EOF |     to --mode "u=rwx,g=rwx,o=rx" debian/rules <<EOF | ||||||
| ${HEADER}%: | ${HEADER}%: | ||||||
| @@ -1678,7 +1681,7 @@ fi) | |||||||
| $(if testtag AX_RPM_DEPEND; then echo "Requires: @RPM_DEPEND@"; fi) | $(if testtag AX_RPM_DEPEND; then echo "Requires: @RPM_DEPEND@"; fi) | ||||||
| Source0: %{name}-%{version}.tar.gz | Source0: %{name}-%{version}.tar.gz | ||||||
| BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root | ||||||
| BuildRequires: which, pkgconfig, pandoc, gnupg, expect, ${VCSDEPENDS_RPM}make, automake, autoconf, rpm-build$( | BuildRequires: which, pkgconfig, gnupg, expect, ${VCSDEPENDS_RPM}make, automake, autoconf, rpm-build$( | ||||||
|     if testtag AX_USE_CXX; then |     if testtag AX_USE_CXX; then | ||||||
|       echo -n ", binutils-devel, gcc-c++" |       echo -n ", binutils-devel, gcc-c++" | ||||||
|     fi |     fi | ||||||
| @@ -1700,13 +1703,17 @@ BuildRequires: lsb-release$( | |||||||
|       echo -n ", libqt5-qtbase-devel, libqt5-qttools, libqt5-linguist-devel, libQt5WebKit5-devel libqt5-qtwebengine-devel libQt5WebKitWidgets-devel"; |       echo -n ", libqt5-qtbase-devel, libqt5-qttools, libqt5-linguist-devel, libQt5WebKit5-devel libqt5-qtwebengine-devel libQt5WebKitWidgets-devel"; | ||||||
|     fi) |     fi) | ||||||
| %else | %else | ||||||
|  | %if  0%{?mageia} | ||||||
|  | BuildRequires: rpm-sign, lsb-release | ||||||
|  | $( | ||||||
|  |     if testtag AX_REQUIRE_QT || testtag AX_CHECK_QT; then | ||||||
|  |       echo -n "BuildRequires: qtbase5-common-devel, qttools5, lib64qt5webkit-devel, lib64qt5webkitwidgets-devel"; | ||||||
|  |     fi) | ||||||
|  | %else | ||||||
| $( | $( | ||||||
|     if testtag AX_REQUIRE_QT || testtag AX_CHECK_QT; then |     if testtag AX_REQUIRE_QT || testtag AX_CHECK_QT; then | ||||||
|       echo -n "BuildRequires: qt5-qtbase-devel, qt5-qttools-devel, qt5-qtwebkit-devel"; |       echo -n "BuildRequires: qt5-qtbase-devel, qt5-qttools-devel, qt5-qtwebkit-devel"; | ||||||
|     fi) |     fi) | ||||||
| %if  0%{?mageia} |  | ||||||
| BuildRequires: rpm-sign, lsb-release |  | ||||||
| %else |  | ||||||
| BuildRequires: rpm-sign, redhat-lsb | BuildRequires: rpm-sign, redhat-lsb | ||||||
| %global debug_package %{nil} | %global debug_package %{nil} | ||||||
| %endif | %endif | ||||||
| @@ -1715,6 +1722,9 @@ $( | |||||||
|     if testtag AX_USE_DOXYGEN; then cat <<EOS |     if testtag AX_USE_DOXYGEN; then cat <<EOS | ||||||
| %if ! 0%{?centos} | %if ! 0%{?centos} | ||||||
| BuildRequires: mscgen | BuildRequires: mscgen | ||||||
|  | %if ! 0%{?mageia} | ||||||
|  | BuildRequires: pandoc | ||||||
|  | %endif | ||||||
| %endif | %endif | ||||||
| EOS | EOS | ||||||
|     fi |     fi | ||||||
| @@ -1766,7 +1776,7 @@ $(if testtag AX_USE_ETC; then | |||||||
|  |  | ||||||
| cat <<EOF2 | cat <<EOF2 | ||||||
| %config | %config | ||||||
| /etc/* | /etc | ||||||
|  |  | ||||||
| EOF2 | EOF2 | ||||||
| fi) | fi) | ||||||
| @@ -1875,6 +1885,7 @@ $(if test -e README.md -a ! -e README; then | |||||||
| cat <<EOF2 | cat <<EOF2 | ||||||
|  |  | ||||||
| README: README.md | README: README.md | ||||||
|  | 	cp README.md README | ||||||
|  |  | ||||||
| CLEANFILES = README | CLEANFILES = README | ||||||
| EOF2 | EOF2 | ||||||
|   | |||||||
| @@ -6,7 +6,7 @@ myarch=$(dpkg --print-architecture) | |||||||
| if test "${arch}" = "amd64"; then | if test "${arch}" = "amd64"; then | ||||||
|     myarch="amd64|i386" |     myarch="amd64|i386" | ||||||
| fi | fi | ||||||
| mode="deb" | mode= | ||||||
| img="mwaeckerlin/ubuntu:latest" | img="mwaeckerlin/ubuntu:latest" | ||||||
| repos=() | repos=() | ||||||
| keys=() | keys=() | ||||||
| @@ -200,11 +200,25 @@ function ifthenelse() { | |||||||
|     arg="$1" |     arg="$1" | ||||||
|     shift |     shift | ||||||
|     cmd="$*" |     cmd="$*" | ||||||
|     DISTRIBUTOR=$(docker exec ${DOCKER_ID} lsb_release -si | sed 's, .*,,' | tr [:upper:] [:lower:]) |     DISTRIBUTOR=$(docker exec ${DOCKER_ID} lsb_release -si | sed 's, .*,,;s,.*,\L&,g') | ||||||
|     CODENAME=$(docker exec ${DOCKER_ID} lsb_release -cs) |     CODENAME=$(docker exec ${DOCKER_ID} lsb_release -cs) | ||||||
|     ARCH=$((docker exec ${DOCKER_ID} which dpkg > /dev/null 2> /dev/null && docker exec ${DOCKER_ID} dpkg --print-architecture) || echo amd64) |     ARCH=$((docker exec ${DOCKER_ID} which dpkg > /dev/null 2> /dev/null && docker exec ${DOCKER_ID} dpkg --print-architecture) || echo amd64) | ||||||
|  |     case "$DISTRIBUTOR" in | ||||||
|  |         (opensuse) # code name may be not available, then set leap or tumbleweed | ||||||
|  |             if test "$CODENAME" = "n/a"; then | ||||||
|  |                 CODENAME=$(docker exec ${DOCKER_ID} lsb_release -ds | sed "s,\($(docker exec ${DOCKER_ID} lsb_release -si | sed 's, ,\\|,g')\) *,,"';s, .*,,g;s,",,g;s,.*,\L&,g') | ||||||
|  |             fi | ||||||
|  |             ;; | ||||||
|  |         (fedora|mageia) # numeric code name | ||||||
|  |             CODENAME=$(docker exec ${DOCKER_ID} lsb_release -rs) | ||||||
|  |             ;; | ||||||
|  |         (centos) # only look at major number in centos | ||||||
|  |             CODENAME=$(docker exec ${DOCKER_ID} lsb_release -rs | sed 's,\..*,,') | ||||||
|  |             ;; | ||||||
|  |     esac | ||||||
|     if test "${arg/:::/}" = "${arg}"; then |     if test "${arg/:::/}" = "${arg}"; then | ||||||
|         docker exec ${DOCKER_ID} bash -c "${cmd//ARG/${arg//@DISTRIBUTOR@/${DISTRIBUTOR}}}" |         cmd_tmp="${cmd//ARG/${arg//@DISTRIBUTOR@/${DISTRIBUTOR}}}" | ||||||
|  |         docker exec ${DOCKER_ID} bash -c "${cmd_tmp//@CODENAME@/${CODENAME}}" | ||||||
|     else |     else | ||||||
|         os="${arg%%:::*}" |         os="${arg%%:::*}" | ||||||
|         thenpart="${arg#*:::}" |         thenpart="${arg#*:::}" | ||||||
| @@ -215,11 +229,13 @@ function ifthenelse() { | |||||||
|         fi |         fi | ||||||
|         if [[ "${DISTRIBUTOR}-${CODENAME}-${ARCH}" =~ ${os} ]]; then |         if [[ "${DISTRIBUTOR}-${CODENAME}-${ARCH}" =~ ${os} ]]; then | ||||||
|             if test -n "${thenpart}"; then |             if test -n "${thenpart}"; then | ||||||
|                 docker exec ${DOCKER_ID} bash -c "${cmd//ARG/${thenpart//@DISTRIBUTOR@/${DISTRIBUTOR}}}" |                 cmd_tmp="${cmd//ARG/${thenpart//@DISTRIBUTOR@/${DISTRIBUTOR}}}" | ||||||
|  |                 docker exec ${DOCKER_ID} bash -c "${cmd_tmp//@CODENAME@/${CODENAME}}" | ||||||
|             fi |             fi | ||||||
|         else |         else | ||||||
|             if test -n "${elsepart}"; then |             if test -n "${elsepart}"; then | ||||||
|                 docker exec ${DOCKER_ID} bash -c "${cmd//ARG/${elsepart//@DISTRIBUTOR@/${DISTRIBUTOR}}}" |                 cmd_tmp="${cmd//ARG/${elsepart//@DISTRIBUTOR@/${DISTRIBUTOR}}}" | ||||||
|  |                 docker exec ${DOCKER_ID} bash -c "${cmd_tmp//@CODENAME@/${CODENAME}}" | ||||||
|             fi |             fi | ||||||
|         fi |         fi | ||||||
|     fi |     fi | ||||||
| @@ -241,33 +257,52 @@ if ! docker exec ${DOCKER_ID} getent passwd $(id -u) > /dev/null 2>&1; then | |||||||
|     docker exec ${DOCKER_ID} useradd -m -u $(id -u) -g $(id -g) -d"${HOME}" $(id -un) |     docker exec ${DOCKER_ID} useradd -m -u $(id -u) -g $(id -g) -d"${HOME}" $(id -un) | ||||||
| fi | fi | ||||||
| docker exec ${DOCKER_ID} chown $(id -u):$(id -g) "${HOME}" | docker exec ${DOCKER_ID} chown $(id -u):$(id -g) "${HOME}" | ||||||
| case $mode in | if test -z "$mode"; then | ||||||
|  |     case "$targets" in | ||||||
|  |         (*deb*) mode=deb;; | ||||||
|  |         (*rpm*) mode=rpm;; | ||||||
|  |         (*) case "$img" in | ||||||
|  |                 (*ubuntu*|*debian*|*mint*) mode=deb;; | ||||||
|  |                 (*fedora*|*centos*|*mageia*) mode=rpm;; | ||||||
|  |                 (*mingw*|*win*) mode=win;; | ||||||
|  |                 (*) mode=deb;; | ||||||
|  |             esac;; | ||||||
|  |     esac | ||||||
|  | fi | ||||||
|  | case "$mode" in | ||||||
|     (deb|apt|win) |     (deb|apt|win) | ||||||
|  |         OPTIONS='-o Dpkg::Options::=--force-confdef -o Dpkg::Options::=--force-confnew -y --force-yes --no-install-suggests --no-install-recommends' | ||||||
|  |         PREVENT='libpam-systemd policykit.* colord dconf-service' | ||||||
|  |         docker exec ${DOCKER_ID} apt-get update ${OPTIONS} | ||||||
|  |         docker exec ${DOCKER_ID} apt-mark hold ${PREVENT} | ||||||
|  |         #docker exec ${DOCKER_ID} apt-get upgrade ${OPTIONS} | ||||||
|  |         docker exec ${DOCKER_ID} apt-get install ${OPTIONS} ${PREVENT// /- }- python-software-properties software-properties-common apt-transport-https dpkg-dev lsb-release wget || \ | ||||||
|  |             docker exec ${DOCKER_ID} apt-get install ${OPTIONS} ${PREVENT// /- }- software-properties-common apt-transport-https dpkg-dev lsb-release wget || \ | ||||||
|  |             docker exec ${DOCKER_ID} apt-get install ${OPTIONS} ${PREVENT// /- }- python-software-properties apt-transport-https dpkg-dev lsb-release wget; | ||||||
|         if [[ "${img}" =~ "ubuntu" ]]; then |         if [[ "${img}" =~ "ubuntu" ]]; then | ||||||
|  |             docker exec ${DOCKER_ID} apt-get install ${OPTIONS} ${PREVENT// /- }- locales | ||||||
|             docker exec ${DOCKER_ID} locale-gen ${LANG} |             docker exec ${DOCKER_ID} locale-gen ${LANG} | ||||||
|             docker exec ${DOCKER_ID} update-locale LANG=${LANG} |             docker exec ${DOCKER_ID} update-locale LANG=${LANG} | ||||||
|         fi |         fi | ||||||
|         OPTIONS='-o Dpkg::Options::=--force-confdef -o Dpkg::Options::=--force-confnew -y --force-yes --no-install-suggests --no-install-recommends' |         for f in ${PREVENT}; do | ||||||
|         for f in 'libpam-systemd:amd64' 'policykit*' 'colord'; do |             docker exec ${DOCKER_ID} bash -c "echo 'Package: ${f}' >> /etc/apt/preferences" | ||||||
|             docker exec ${DOCKER_ID} bash -c "echo 'Package: $f' >> /etc/apt/preferences" |  | ||||||
|             docker exec ${DOCKER_ID} bash -c "echo 'Pin-Priority: -100' >> /etc/apt/preferences" |             docker exec ${DOCKER_ID} bash -c "echo 'Pin-Priority: -100' >> /etc/apt/preferences" | ||||||
|             docker exec ${DOCKER_ID} bash -c "echo >> /etc/apt/preferences" |             docker exec ${DOCKER_ID} bash -c "echo >> /etc/apt/preferences" | ||||||
|         done |         done | ||||||
|         docker exec ${DOCKER_ID} apt-get update ${OPTIONS} |         if test -n "${keys[@]}"; then # fix dependency bug in cosmic and stretch | ||||||
|         docker exec ${DOCKER_ID} apt-get upgrade ${OPTIONS} |             docker exec ${DOCKER_ID} apt-get install ${OPTIONS} ${PREVENT// /- }- gnupg | ||||||
|         docker exec ${DOCKER_ID} apt-get install ${OPTIONS} python-software-properties software-properties-common apt-transport-https dpkg-dev lsb-release wget || \ |             for key in "${keys[@]}"; do | ||||||
|             docker exec ${DOCKER_ID} apt-get install ${OPTIONS} software-properties-common apt-transport-https dpkg-dev lsb-release wget || \ |                 wget -O- "$key" \ | ||||||
|             docker exec ${DOCKER_ID} apt-get install ${OPTIONS} python-software-properties apt-transport-https dpkg-dev lsb-release wget; |                     | docker exec -i ${DOCKER_ID} apt-key add - | ||||||
|         for key in "${keys[@]}"; do |             done | ||||||
|             wget -O- "$key" \ |         fi | ||||||
|                 | docker exec -i ${DOCKER_ID} apt-key add - |  | ||||||
|         done |  | ||||||
|         for repo in "${repos[@]}"; do |         for repo in "${repos[@]}"; do | ||||||
|             ifthenelse "${repo}" "apt-add-repository 'ARG'" |             ifthenelse "${repo}" "apt-add-repository 'ARG'" | ||||||
|         done |         done | ||||||
|  |  | ||||||
|         docker exec ${DOCKER_ID} apt-get update ${OPTIONS} |         docker exec ${DOCKER_ID} apt-get update ${OPTIONS} | ||||||
|         for package in "${packages[@]}"; do |         for package in "${packages[@]}"; do | ||||||
|             ifthenelse "${package}" "apt-get install ${OPTIONS} ARG" |             ifthenelse "${package}" "apt-get install ${OPTIONS} ${PREVENT// /- }- ARG" | ||||||
|         done |         done | ||||||
|         for command in "${commands[@]}"; do |         for command in "${commands[@]}"; do | ||||||
|             ifthenelse "${command}" "ARG" |             ifthenelse "${command}" "ARG" | ||||||
| @@ -276,7 +311,7 @@ case $mode in | |||||||
|         ;; |         ;; | ||||||
|     (rpm|yum|dnf|zypper|urpmi) |     (rpm|yum|dnf|zypper|urpmi) | ||||||
|         if [[ "$img" =~ "centos" ]]; then |         if [[ "$img" =~ "centos" ]]; then | ||||||
|             docker exec ${DOCKER_ID} yum install -y redhat-lsb |             docker exec ${DOCKER_ID} yum install -y redhat-lsb epel-release | ||||||
|             docker exec -i ${DOCKER_ID} bash -c 'cat > /etc/yum.repos.d/wandisco-svn.repo' <<EOF |             docker exec -i ${DOCKER_ID} bash -c 'cat > /etc/yum.repos.d/wandisco-svn.repo' <<EOF | ||||||
| [WandiscoSVN] | [WandiscoSVN] | ||||||
| name=Wandisco SVN Repo | name=Wandisco SVN Repo | ||||||
| @@ -288,21 +323,24 @@ gpgcheck=0 | |||||||
| EOF | EOF | ||||||
|         fi |         fi | ||||||
|         INSTALL_TOOL=$((docker exec ${DOCKER_ID} test -x /usr/bin/zypper && echo zypper install -y) ||  (docker exec ${DOCKER_ID} test -x /usr/bin/dnf && echo dnf install -y) || (docker exec ${DOCKER_ID} test -x /usr/bin/yum && echo yum install -y) || (docker exec ${DOCKER_ID} test -x /usr/sbin/urpmi && echo urpmi --auto)) |         INSTALL_TOOL=$((docker exec ${DOCKER_ID} test -x /usr/bin/zypper && echo zypper install -y) ||  (docker exec ${DOCKER_ID} test -x /usr/bin/dnf && echo dnf install -y) || (docker exec ${DOCKER_ID} test -x /usr/bin/yum && echo yum install -y) || (docker exec ${DOCKER_ID} test -x /usr/sbin/urpmi && echo urpmi --auto)) | ||||||
|         if test "$INSTALL_TOOL" = "urpmi --auto"; then |         if test "$INSTALL_TOOL" = "urpmi --auto" -o "$INSTALL_TOOL" = "zypper install -y"; then | ||||||
|             LSB_RELEASE=lsb-release |             LSB_RELEASE=lsb-release | ||||||
|         else |         else | ||||||
|             LSB_RELEASE=/usr/bin/lsb_release |             LSB_RELEASE=/usr/bin/lsb_release | ||||||
|         fi |         fi | ||||||
|         docker exec ${DOCKER_ID} ${INSTALL_TOOL} rpm-build automake libtool subversion gcc-c++ pkgconfig wget $LSB_RELEASE |         docker exec ${DOCKER_ID} ${INSTALL_TOOL} rpm-build automake libtool subversion gcc-c++ pkgconfig wget $LSB_RELEASE | ||||||
|  |         if docker exec ${DOCKER_ID} test -x /usr/bin/dnf; then | ||||||
|  |             docker exec ${DOCKER_ID} dnf install -y 'dnf-command(config-manager)' | ||||||
|  |         fi | ||||||
|         i=0 |         i=0 | ||||||
|         for key in "${keys[@]}"; do |         for key in "${keys[@]}"; do | ||||||
|             wget -Orpm-key "$key" |             docker exec -i ${DOCKER_ID} wget -Orpm-key "$key" | ||||||
|             docker exec -i ${DOCKER_ID} rpm --import rpm-key |             docker exec -i ${DOCKER_ID} rpm --import rpm-key | ||||||
|             rm rpm-key |             docker exec -i ${DOCKER_ID} rm rpm-key | ||||||
|         done |         done | ||||||
|         for repo in "${repos[@]}"; do |         for repo in "${repos[@]}"; do | ||||||
|             INSTALL_REPO=$((docker exec ${DOCKER_ID} test -x /usr/bin/zypper && echo zypper ar) || (docker exec ${DOCKER_ID} test -x /usr/bin/dnf && echo dnf config-manager --add-repo) || (docker exec ${DOCKER_ID} test -x /usr/bin/yum && echo wget -O/etc/yum.repos.d/additional$i.repo) || (docker exec ${DOCKER_ID} test -x /usr/sbin/urpmi && echo false)) |             INSTALL_REPO=$((docker exec ${DOCKER_ID} test -x /usr/bin/zypper && echo zypper ar) || (docker exec ${DOCKER_ID} test -x /usr/bin/dnf && echo dnf config-manager --add-repo) || (docker exec ${DOCKER_ID} test -x /usr/bin/yum && echo yum-config-manager --add-repo) || (docker exec ${DOCKER_ID} test -x /usr/sbin/urpmi && echo false)) | ||||||
|             ifthenelse "${repo}" "${INSTALL_REPO} 'ARG'" |             ifthenelse "${repo}" "${INSTALL_REPO} ARG" | ||||||
|             ((++i)) |             ((++i)) | ||||||
|         done |         done | ||||||
|         for package in "${packages[@]}"; do |         for package in "${packages[@]}"; do | ||||||
| @@ -320,3 +358,17 @@ for f in "${flags[@]}"; do | |||||||
| done | done | ||||||
|            |            | ||||||
| docker exec -u $(id -u):$(id -g) ${DOCKER_ID} ./bootstrap.sh -t "${targets}" ${host} "${FLAGS[@]}" | docker exec -u $(id -u):$(id -g) ${DOCKER_ID} ./bootstrap.sh -t "${targets}" ${host} "${FLAGS[@]}" | ||||||
|  |  | ||||||
|  | # last check: try to install built deb or rpm files (if not already cleaned up) | ||||||
|  | # not supported in trusty and jessie | ||||||
|  | if test "$mode" = deb -a "${img//trusty/}" = "${img}" -a "${img//jessie/}" = "${img}"; then | ||||||
|  |    if test "${targets//deb/}" != "${targets}" && ls *.deb > /dev/null 2> /dev/null; then | ||||||
|  |        docker exec ${DOCKER_ID} bash -c "apt-get install ${OPTIONS} ${PREVENT// /- }- /workdir/*.deb" | ||||||
|  |    fi | ||||||
|  | fi | ||||||
|  | if test "$mode" = rpm -a "${targets//rpm/}" != "${targets}"; then | ||||||
|  |     if ls *.rpm > /dev/null 2> /dev/null; then | ||||||
|  |         docker exec ${DOCKER_ID} bash -c "${INSTALL_TOOL} /workdir/*.rpm" | ||||||
|  |     fi | ||||||
|  | fi | ||||||
|  | echo "done." | ||||||
|   | |||||||
| @@ -7,7 +7,7 @@ | |||||||
| ## Parameters: | ## Parameters: | ||||||
| ##  $1: name of the app-target | ##  $1: name of the app-target | ||||||
| ##  $2: name of the project | ##  $2: name of the project | ||||||
| ##  $3: installation source | ##  $3: package installation target | ||||||
| ## | ## | ||||||
| ##       1         2         3         4         5         6         7         8 | ##       1         2         3         4         5         6         7         8 | ||||||
| ## 45678901234567890123456789012345678901234567890123456789012345678901234567890 | ## 45678901234567890123456789012345678901234567890123456789012345678901234567890 | ||||||
| @@ -16,31 +16,33 @@ if test "$(uname -s)" != "Darwin"; then | |||||||
|     echo "**** ERROR: run on Mac OS-X: $0" |     echo "**** ERROR: run on Mac OS-X: $0" | ||||||
|     exit 1 |     exit 1 | ||||||
| fi | fi | ||||||
| test -n "$1" |  | ||||||
| test -n "$2" | project=${2:-$(sed -n 's/ *m4_define *( *x_package_name, *\(.*\) *).*/\1/p' $(pwd)/configure.ac)} | ||||||
| test -d "$3" | apptarget=${1:-${project}.app} | ||||||
| target="$(pwd)/${1}/Contents/MacOS" | sources=${3:-$(pwd)/tmp} | ||||||
|  | ! test -e "$apptarget" || rm -rf "$apptarget" | ||||||
|  | test -n "$project" | ||||||
|  | test -d "$sources" | ||||||
|  | target="$(pwd)/${apptarget}/Contents/MacOS" | ||||||
|  |  | ||||||
|  | echo "Creating $apptarget for $project from $sources" | ||||||
|  |  | ||||||
| # Step 1: create and fill app directory structure | # Step 1: create and fill app directory structure | ||||||
| mkdir -p ${1}/Contents/{Resources,MacOS} | mkdir -p ${apptarget}/Contents/{Resources,MacOS} | ||||||
| ! test -d ${3}/bin || \ | ! test -d ${sources}/bin || \ | ||||||
|      find ${3}/bin -mindepth 1 -maxdepth 1 -exec mv {} ${1}/Contents/MacOS/ \; |     find ${sources}/bin -mindepth 1 -maxdepth 1 -exec cp -a {} ${apptarget}/Contents/MacOS/ \; | ||||||
| executablefile=$(ls -1 ${1}/Contents/MacOS/ | head -1) | ! test -d ${sources}/scripts || \ | ||||||
| ! test -d ${3}/lib || \ |     find ${sources}/scripts -mindepth 1 -maxdepth 1 -exec cp -a {} ${apptarget}/Contents/MacOS/ \; | ||||||
|     find ${3}/lib -mindepth 1 -maxdepth 1 -exec mv {} ${1}/Contents/MacOS/ \; | executablefile=${apptarget}/Contents/MacOS/${project} | ||||||
| ! test -d ${3}/share/${2} || \ | test -x $executablefile || executablefile=$(ls -1 ${apptarget}/Contents/MacOS/ | head -1) | ||||||
|     find ${3}/share/${2} -mindepth 1 -maxdepth 1 -exec mv {} ${1}/Contents/Resources/ \; | ! test -d ${sources}/lib || \ | ||||||
| ! test -d ${3}/share/${2} || rmdir ${3}/share/${2} |     find ${sources}/lib -mindepth 1 -maxdepth 1 -exec cp -a {} ${apptarget}/Contents/MacOS/ \; | ||||||
| ! test -d ${3}/share || \ | ! test -d ${sources}/share/${project} || \ | ||||||
|     find ${3}/share -mindepth 1 -maxdepth 1 -exec mv {} ${1}/Contents/Resources/ \; |     find ${sources}/share/${project} -mindepth 1 -maxdepth 1 -exec cp -a {} ${apptarget}/Contents/Resources/ \; | ||||||
| ! test -d ${3}/bin || rmdir ${3}/bin | ! test -d ${sources}/share || \ | ||||||
| ! test -d ${3}/lib || rmdir ${3}/lib |     find ${sources}/share -mindepth 1 -maxdepth 1 -name ${project} -prune -o -exec cp -a {} ${apptarget}/Contents/Resources/ \; | ||||||
| ! test -d ${3}/share || rmdir ${3}/share | ! test -d ${sources} || \ | ||||||
| ! test -d ${3} || \ |     find ${sources} -mindepth 1 -maxdepth 1 -name share -o -name bin -o -name lib -o -name scripts -prune -o -exec cp -a {} ${apptarget}/Contents/Resources/ \; | ||||||
|     find ${3} -mindepth 1 -maxdepth 1 -exec mv {} ${1}/Contents/Resources/ \; |  | ||||||
| ! test -d ${3}/include || rm -r ${3}/include |  | ||||||
| ! test -d ${3} || rmdir ${3} |  | ||||||
| ! test -d ${1}/tmp || rm -r ${1}/tmp |  | ||||||
|  |  | ||||||
| # Step 2: copy qt plugins, if necessary | # Step 2: copy qt plugins, if necessary | ||||||
| for f in ${QT_PLUGINS}; do | for f in ${QT_PLUGINS}; do | ||||||
| @@ -57,7 +59,7 @@ while [ $found -ne 0 ]; do | |||||||
|     cd "${target}" |     cd "${target}" | ||||||
|     for file in $(find . -type f); do |     for file in $(find . -type f); do | ||||||
|         for lib in $(otool -L ${file} | tail -n +2 \ |         for lib in $(otool -L ${file} | tail -n +2 \ | ||||||
|             | egrep '/opt/local/|'"${HOME}" \ |             | egrep '/usr/local/|/opt/local/|/opt/X11/|'"${HOME}" \ | ||||||
|             | grep -v $file | awk '{print $1}'); do |             | grep -v $file | awk '{print $1}'); do | ||||||
|             found=1 |             found=1 | ||||||
|             test -f ${lib##*/} \ |             test -f ${lib##*/} \ | ||||||
| @@ -79,25 +81,24 @@ if test -n "${QTDIR}"; then | |||||||
|     MENU_NIB=$(find ${QTDIR} -name .svn -o -name .git -prune -o -name qt_menu.nib -print \ |     MENU_NIB=$(find ${QTDIR} -name .svn -o -name .git -prune -o -name qt_menu.nib -print \ | ||||||
|                | head -1) |                | head -1) | ||||||
|     if test -e "${MENU_NIB}"; then |     if test -e "${MENU_NIB}"; then | ||||||
|         rsync -r "${MENU_NIB}" ${1}/Contents/Resources/ |         rsync -r "${MENU_NIB}" ${apptarget}/Contents/Resources/ | ||||||
|         test -d ${1}/Contents/Resources/qt_menu.nib |         test -d ${apptarget}/Contents/Resources/qt_menu.nib | ||||||
|     fi |     fi | ||||||
| fi | fi | ||||||
|  |  | ||||||
| # Step 5: copy or create info.plist | # Step 5: copy local or create new info.plist | ||||||
| infoplist=$(find ${1}/Contents/Resources -name Info.plist) | if test -f Info.plist; then | ||||||
| if test -f "${infoplist}"; then |     cp -a Info.plist ${apptarget}/Contents/Info.plist | ||||||
|     mv "${infoplist}" ${1}/Contents/Info.plist |  | ||||||
| else | else | ||||||
|     cat > ${1}/Contents/Info.plist <<EOF |     cat > ${apptarget}/Contents/Info.plist <<EOF | ||||||
| <?xml version="1.0" encoding="UTF-8"?> | <?xml version="1.0" encoding="UTF-8"?> | ||||||
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||||||
| <plist version="1.0"> | <plist version="1.0"> | ||||||
|   <dict> |   <qdict> | ||||||
|     <key>CFBundleIdentifier</key> |     <key>CFBundleIdentifier</key> | ||||||
|     <string>${2}</string> |     <string>${project}</string> | ||||||
|     <key>CFBundleExecutable</key> |     <key>CFBundleExecutable</key> | ||||||
|     <string>${executablefile##/}</string> |     <string>${executablefile##*/}</string> | ||||||
|   </dict> |   </dict> | ||||||
| </plist> | </plist> | ||||||
| EOF | EOF | ||||||
|   | |||||||
| @@ -24,7 +24,7 @@ else | |||||||
| fi | fi | ||||||
|  |  | ||||||
| function install() { | function install() { | ||||||
|     if ${SUDO} apt-get -y install $*; then |     if ${SUDO} apt-get install -y --force-yes --no-install-suggests --no-install-recommends $*; then | ||||||
|         return 0 |         return 0 | ||||||
|     else |     else | ||||||
|         return 1 |         return 1 | ||||||
|   | |||||||
| @@ -97,12 +97,12 @@ fi | |||||||
|  |  | ||||||
| if test -n "${SCHROOTNAME}"; then | if test -n "${SCHROOTNAME}"; then | ||||||
|     FILES=$(LANG= schroot -c ${SCHROOTNAME} -- rpmbuild -bb --clean --nobuild --define "_topdir ." --define "_sourcedir ." ${PACKAGE_NAME}.spec  2>&1 | sed -n 's, is needed by.*,,p') |     FILES=$(LANG= schroot -c ${SCHROOTNAME} -- rpmbuild -bb --clean --nobuild --define "_topdir ." --define "_sourcedir ." ${PACKAGE_NAME}.spec  2>&1 | sed -n 's, is needed by.*,,p') | ||||||
|     if test -n "${FILES}"; then |     if test -n "${FILES// /}${DEPS// /}"; then | ||||||
|         schroot -c ${SCHROOTNAME} -u root -- ${INSTALL_TOOL}  ${FILES} ${DEPS} |         schroot -c ${SCHROOTNAME} -u root -- ${INSTALL_TOOL}  ${FILES} ${DEPS} | ||||||
|     fi |     fi | ||||||
| else | else | ||||||
|     FILES=$(LANG= rpmbuild -bb --clean --nobuild --define "_topdir ." --define "_sourcedir ." ${PACKAGE_NAME}.spec 2>&1 | sed -n 's, is needed by.*,,p') |     FILES=$(LANG= rpmbuild -bb --clean --nobuild --define "_topdir ." --define "_sourcedir ." ${PACKAGE_NAME}.spec 2>&1 | sed -n 's, is needed by.*,,p') | ||||||
|     if test -n "${FILES}"; then |     if test -n "${FILES// /}${DEPS// /}"; then | ||||||
|         ${INSTALL_TOOL} ${FILES} ${DEPS} |         ${INSTALL_TOOL} ${FILES} ${DEPS} | ||||||
|     fi |     fi | ||||||
| fi | fi | ||||||
| @@ -112,7 +112,7 @@ if test -n "${SCHROOTNAME}"; then | |||||||
| else | else | ||||||
|     FILES=$(LANG= rpmbuild -bb --clean --nobuild --define "_topdir ." --define "_sourcedir ." ${PACKAGE_NAME}.spec 2>&1 | sed -n 's, is needed by.*,,p') |     FILES=$(LANG= rpmbuild -bb --clean --nobuild --define "_topdir ." --define "_sourcedir ." ${PACKAGE_NAME}.spec 2>&1 | sed -n 's, is needed by.*,,p') | ||||||
| fi | fi | ||||||
| if test -n "${FILES}"; then | if test -n "${FILES// /}"; then | ||||||
|     echo "**** ERROR: Cannot install: " $FILES |     echo "**** ERROR: Cannot install: " $FILES | ||||||
|     exit 1 |     exit 1 | ||||||
| fi | fi | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user