resolve build dependencies
This commit is contained in:
		| @@ -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([distclean-am], [distclean-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 | ||||
| #### Begin: Appended by $0 | ||||
| EXTRA_DIST = bootstrap.sh | ||||
| EXTRA_DIST += bootstrap.sh | ||||
| clean-standard-project-targets: | ||||
| 	-rm -rf \${PACKAGE_NAME}-\${PACKAGE_VERSION} | ||||
| 	-rm \${PACKAGE_TARNAME}-\${PACKAGE_VERSION}.tar.gz | ||||
|   | ||||
							
								
								
									
										11
									
								
								bootstrap.sh
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								bootstrap.sh
									
									
									
									
									
								
							| @@ -103,6 +103,7 @@ GENERATED FILES | ||||
|     * ax_init_standard_project.m4 - auxiliary macro definition file | ||||
|     * ax_cxx_compile_stdcxx_11.m4 - auxiliary macro definition file | ||||
|     * ax_check_qt.m4 - auxiliary macro definition file | ||||
|     * resolve-debbuilddeps.sh - script to install debian package dependencies | ||||
|     * mac-create-app-bundle.sh - script to create apple mac os-x app-bundle | ||||
|     * AUTHORS - replace your name in AUTHORS before first run | ||||
|     * NEWS - empty file add your project's news | ||||
| @@ -168,13 +169,13 @@ FILE DEPENDENCIES | ||||
|     * html/makefile.am depends on AX_BUILD_HTML | ||||
|     * doc/doxyfile.in depends on AX_BUILD_EXAMPLES | ||||
|     * 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_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}-dev.install 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, | ||||
|       AX_USE_LIBTOOL, AX_CXX_CHECK_QT, AX_CXX_QT, AX_USE_CPPUNIT | ||||
|       AX_USE_LIBTOOL, AX_CHECK_QT, AX_CXX_QT, AX_USE_CPPUNIT | ||||
|  | ||||
| FILES | ||||
|  | ||||
| @@ -384,6 +385,7 @@ copy ${MY_NAME} | ||||
| copy ax_init_standard_project.m4 | ||||
| copy ax_cxx_compile_stdcxx_11.m4 | ||||
| copy ax_check_qt.m4 | ||||
| copy resolve-debbuilddeps.sh | ||||
| copy mac-create-app-bundle.sh | ||||
| AUTHOR=$(gpg -K  | sed -n 's,uid *,,p' | sort | head -1) | ||||
| if test -z "${AUTHOR}"; then | ||||
| @@ -694,7 +696,7 @@ EOF | ||||
| Source: @PACKAGE_NAME@ | ||||
| Priority: extra | ||||
| 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, qttools5-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; 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@ | ||||
| Section: $(if testtag AX_USE_LIBTOOL; then echo  "libs"; fi) | ||||
| @@ -790,6 +792,7 @@ fi) | ||||
| %prep | ||||
| %setup -q | ||||
| ./configure --prefix=/usr \\ | ||||
|             --sysconfdir=/etc \\ | ||||
|             --docdir=/usr/share/doc/packages/@PACKAGE_NAME@ \\ | ||||
|             --libdir=/usr/%_lib | ||||
|  | ||||
| @@ -885,7 +888,7 @@ fi | ||||
| #### Bootstrap Before Configure #### | ||||
| run --no-check svn2cl | ||||
| run aclocal | ||||
| run libtoolize --force | ||||
| if testtag AX_USE_LIBTOOL; then run libtoolize --force; fi | ||||
| run automake -a | ||||
| run autoconf | ||||
|  | ||||
|   | ||||
							
								
								
									
										17
									
								
								resolve-builddeps.sh~
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								resolve-builddeps.sh~
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,17 @@ | ||||
| #! /bin/bash -ex | ||||
|  | ||||
| ## @id $Id$ | ||||
|  | ||||
| ## Resolve Debian Build Dependencies | ||||
| ## Installs all the required packages | ||||
| ## Call: ./resolve-builddeps 'name of build schroot' | ||||
| ## e.g. call: ./resolve-builddeps trusty_amd64 | ||||
|  | ||||
| ##       1         2         3         4         5         6         7         8 | ||||
| ## 45678901234567890123456789012345678901234567890123456789012345678901234567890 | ||||
|  | ||||
| SUDO="$*" | ||||
|  | ||||
| ./bootstrap -c | ||||
|  | ||||
| for p in $( | ||||
							
								
								
									
										44
									
								
								resolve-debbuilddeps.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										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-builddeps 'name of build schroot' | ||||
| ## e.g. call: ./resolve-builddeps 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" | ||||
		Reference in New Issue
	
	Block a user