added resolve-rpmbuilddeps.sh
This commit is contained in:
		| @@ -162,7 +162,7 @@ qrc_%.cxx: %.qrc | ||||
| %.qm: %.ts | ||||
| 	${LRELEASE} $< -qm [$][@] | ||||
|  | ||||
| #%.ts: ${LANGUAGE_FILES} | ||||
| #%.ts: ${LANGUAGE_FILES:%=%} | ||||
| #	${LUPDATE} -no-obsolete \ | ||||
| #	           -target-language ${@:${LANGUAGE_FILE_BASE}_%.ts=%} \ | ||||
| #	           -ts [$][@] $< | ||||
|   | ||||
| @@ -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 | ||||
|   | ||||
							
								
								
									
										29
									
								
								bootstrap.sh
									
									
									
									
									
								
							
							
						
						
									
										29
									
								
								bootstrap.sh
									
									
									
									
									
								
							| @@ -104,6 +104,8 @@ GENERATED FILES | ||||
|     * 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 | ||||
|     * 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 | ||||
|     * AUTHORS - replace your name in AUTHORS before first run | ||||
|     * NEWS - empty file add your project's news | ||||
| @@ -169,13 +171,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_REQUIRE_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 | ||||
|     * ${DEFAULT_PROJECT_NAME}.spec.in depends on AX_USE_RPM_PACKAGING, | ||||
|       AX_USE_LIBTOOL, AX_CHECK_QT, AX_REQUIRE_QT, AX_CXX_QT, AX_USE_CPPUNIT | ||||
|  | ||||
| FILES | ||||
|  | ||||
| @@ -208,7 +210,7 @@ FILES | ||||
|       * Enable C++ examples, i.e. for libraries: AX_BUILD_EXAMPLES | ||||
|       * Check for C++11 support: AX_CXX_COMPILE_STDCXX_11 (see ax_cxx_compile_stdcxx_11.m4) | ||||
|       * Require a QT module: AX_REQUIRE_QT (see ax_check_qt.m4) | ||||
|       * Optionally use a QT module: AX_CHECK_QT (see ax_check_qt.m4) | ||||
|       * Optionally use a QT module: AX_CHECK_QT  (see ax_check_qt.m4) | ||||
|       * Require a module: AX_PKG_REQUIRE (see ax_init_standard_project.m4) | ||||
|       * Check for an optional module: AX_PKG_CHECK (see ax_init_standard_project.m4) | ||||
|  | ||||
| @@ -280,7 +282,8 @@ run() { | ||||
| } | ||||
|  | ||||
| testtag() { | ||||
|     egrep -q '^ *'"$1" configure.ac | ||||
|     local IFS="|" | ||||
|     egrep -q '^ *'"($*)" configure.ac | ||||
| } | ||||
|  | ||||
| contains() { | ||||
| @@ -386,6 +389,8 @@ copy ax_init_standard_project.m4 | ||||
| copy ax_cxx_compile_stdcxx_11.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 | ||||
| AUTHOR=$(gpg -K  | sed -n 's,uid *,,p' | sort | head -1) | ||||
| if test -z "${AUTHOR}"; then | ||||
| @@ -425,6 +430,7 @@ AX_INIT_STANDARD_PROJECT | ||||
|  | ||||
| # qt features, uncomment, what you need: | ||||
| #AX_CHECK_QT([QT], [QtCore QtGui QtNetwork], [QtWidgets]) | ||||
| #AX_REQUIRE_QT([QT], [QtCore QtGui QtNetwork], [QtWidgets]) | ||||
| #AX_QT_NO_KEYWORDS | ||||
|  | ||||
| # create output | ||||
| @@ -696,7 +702,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 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@ | ||||
| Section: $(if testtag AX_USE_LIBTOOL; then echo  "libs"; fi) | ||||
| @@ -765,9 +771,9 @@ BuildRequires: pkgconfig, redhat-lsb$( | ||||
|     fi) | ||||
| %if ! ( 0%{?centos} || 0%{?centos_ver} || 0%{?centos_version} ) | ||||
| $(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 | ||||
| $(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 | ||||
| %else%if 0%{?suse_version} || 0%{?sles_version} | ||||
| BuildRequires: pkg-config, lsb-release$( | ||||
| @@ -775,9 +781,9 @@ BuildRequires: pkg-config, lsb-release$( | ||||
|       echo -n ", libcppunit-devel"; | ||||
|     fi) | ||||
| %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 | ||||
| $(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 | ||||
|  | ||||
| @@ -792,6 +798,7 @@ fi) | ||||
| %prep | ||||
| %setup -q | ||||
| ./configure --prefix=/usr \\ | ||||
|             --sysconfdir=/etc \\ | ||||
|             --docdir=/usr/share/doc/packages/@PACKAGE_NAME@ \\ | ||||
|             --libdir=/usr/%_lib | ||||
|  | ||||
| @@ -887,7 +894,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 | ||||
|  | ||||
|   | ||||
							
								
								
									
										31
									
								
								build-resource-file.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										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} | ||||
							
								
								
									
										4
									
								
								debian/control.in
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								debian/control.in
									
									
									
									
										vendored
									
									
								
							| @@ -1,13 +1,13 @@ | ||||
| Source: @PACKAGE_NAME@ | ||||
| Priority: extra | ||||
| Maintainer: @AUTHOR@ | ||||
| Build-Depends: debhelper (>= 7), pkg-config, autotools-dev, doxygen, graphviz, lsb-release, libssl-dev, libpkcs11-helper1-dev | libp11-kit-dev | libgnutls-dev, libpcsclite-dev, mrw-c++-dev, libproxy-dev, qt5-default | qt4-default | qt5-qmake | qt4-qmake, qtbase5-dev | libqt4-dev, qtbase5-dev-tools | qt4-dev-tools | ||||
| Build-Depends: debhelper (>= 7), pkg-config, autotools-dev, doxygen, graphviz, lsb-release, libssl-dev, libpkcs11-helper1-dev | libp11-kit-dev | libgnutls-dev, libpcsclite-dev, mrw-c++-dev, libproxy-dev, qt5-default | qt4-default | qt5-qmake | qt4-qmake, qtbase5-dev | libqt4-dev, qtbase5-dev-tools | qt4-dev-tools, qttools5-dev-tools | qt4-dev-tools | ||||
| Standards-Version: 3.8.1 | ||||
| Section: libs | ||||
| Homepage: https://dev.marc.waeckerlin.org/projects/libpcscxx | ||||
|  | ||||
| Package: @PACKAGE_NAME@-dev | ||||
| Section: libdevel | ||||
| Section: devel | ||||
| Architecture: any | ||||
| Depends: @PACKAGE_NAME@ (= ${binary:Version}), libssl-dev, libpkcs11-helper1-dev, libpcsclite-dev, mrw-c++-dev | ||||
| Description: @DESCRIPTION@ - Development Package | ||||
|   | ||||
							
								
								
									
										1
									
								
								debian/libpcscxx-dev.install
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								debian/libpcscxx-dev.install
									
									
									
									
										vendored
									
									
								
							| @@ -3,3 +3,4 @@ usr/lib/lib*.a | ||||
| usr/lib/lib*.so | ||||
| usr/lib/pkgconfig/* | ||||
| usr/lib/*.la | ||||
| usr/share/doc | ||||
| @@ -4,8 +4,8 @@ | ||||
|  | ||||
| ## Resolve Debian Build Dependencies | ||||
| ## Installs all the required packages | ||||
| ## Call: ./resolve-builddeps 'name of build schroot' | ||||
| ## e.g. call: ./resolve-builddeps trusty_amd64 | ||||
| ## Call: ./resolve-debbuilddeps 'name of build schroot' | ||||
| ## e.g. call: ./resolve-debbuilddeps trusty_amd64 | ||||
|  | ||||
| ##       1         2         3         4         5         6         7         8 | ||||
| ## 45678901234567890123456789012345678901234567890123456789012345678901234567890 | ||||
|   | ||||
							
								
								
									
										34
									
								
								resolve-rpmbuilddeps.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										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) | ||||
|  | ||||
| if test -n "${SCHROOTNAME}"; then | ||||
|     schroot -c ${SCHROOTNAME} -- ./bootstrap.sh -t dist | ||||
|     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 | ||||
|         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 | ||||
|     ./bootstrap.sh -t dist | ||||
|     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 | ||||
|         yum install -y ${FILES} || \ | ||||
|             zypper install -y ${FILES} || \ | ||||
|             dnf install -y ${FILES} | ||||
|     fi | ||||
| fi | ||||
|  | ||||
| echo "**** Success: All Dependencies Resolved" | ||||
		Reference in New Issue
	
	Block a user