diff --git a/ChangeLog b/ChangeLog index 383404d..c3427a0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2016-12-11 21:51 + + * [r101] build-in-docker.sh, resolve-rpmbuilddeps.sh: + fix some typos + +2016-12-11 01:39 + + * [r100] ChangeLog, ax_init_standard_project.m4, bootstrap.sh, + build-in-docker.conf, build-in-docker.sh, libxml-cxx.spec.in, + resolve-debbuilddeps.sh, resolve-rpmbuilddeps.sh: + seems to work for rpm, execpt signing problem + 2016-10-05 11:37 * [r99] debian/control.in: diff --git a/bootstrap.sh b/bootstrap.sh index 0afedc3..1a9fb58 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -302,7 +302,7 @@ VCSDEPENDS="" if test -d .svn; then VCS="svn" VCSDEPENDS_DEB="svn2cl, subversion, subversion-tools," - VCSDEPENDS_RPM="subversion, subversion-tools," + VCSDEPENDS_RPM="subversion," echo -e " \e[32msuccess\e[0m detected ${VCS}" elif test -d .git; then VCS="git" @@ -873,9 +873,9 @@ nodejsdir = \${pkgdatadir}/nodejs sysconfdefaultdir = \${sysconfdir}/default sysconfinitdir = \${sysconfdir}/init -dist_sysconf_DATA = etc/@PACKAGE_NAME@.json -dist_sysconfdefault_DATA = etc/default/@PACKAGE_NAME@ -dist_sysconfinit_DATA = etc/init/@PACKAGE_NAME@.conf +dist_sysconf_DATA = \${sysconfdir}/@PACKAGE_NAME@.json +dist_sysconfdefault_DATA = \${sysconfdir}/default/@PACKAGE_NAME@ +dist_sysconfinit_DATA = \${sysconfdir}/init/@PACKAGE_NAME@.conf all: node_modules @@ -1465,7 +1465,7 @@ if testtag AX_USE_DEBIAN_PACKAGING; then -- @PACKAGER@ @BUILD_DATE@ EOF - BUILD_DEPENDS="debhelper, fakeroot, ${VCSDEPENDS_DEB} pkg-config, automake, libtool, autotools-dev, pandoc, lsb-release, fakeroot, $(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="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)" to debian/control.in < /dev/null 2> /dev/null && dpkg --print-architecture) || echo amd64) +host= +flags=() wait=0 if test -e ./build-in-docker.conf; then # you can preconfigure the variables in file build-in-docker.conf # if you do so, add the file to EXTRA_DIST in makefile.am source ./build-in-docker.conf fi + while test $# -gt 0; do case "$1" in (-h|--help) @@ -30,10 +33,12 @@ while test $# -gt 0; do echo "OPTIONS:" echo echo " -h, --help show this help" - echo " -m, --mode mode: deb, rpm, default: ${mode}" + echo " -m, --mode mode: deb, rpm, win, default: ${mode}" echo " -i, --image use given docker image instead of ${img}" echo " -a, --arch build for given hardware architecture" echo " -t, --targets targets specify build targets, default: ${targets}" + echo " --host host for cross compiling, e.g. i686-w64-mingw32" + echo " -f, --flag add flag to ./bootstrap.sh or ./configure" echo " -r, --repo add given apt repository" echo " -k, --key add public key from url" echo " -e, --env = set environment variable in docker" @@ -44,7 +49,9 @@ while test $# -gt 0; do echo echo " The option -i must be after -m, because mode sets a new default image" echo " The option -m must be after -t, because mode may be auto detected from targets" + echo " The option -m must be after -h, because mode may set a host" echo " If target is either deb or rpm, mode is set to the same value" + echo " If target is win, host is set to i686-w64-mingw32" echo echo " The options -r -k -e -d -p -c can be repeated several times." echo @@ -79,6 +86,7 @@ while test $# -gt 0; do (rpm|zypper) img="opensuse:latest";; (yum) img="centos:latest";; (dnf) img="fedora:latest";; + (win) img="ubuntu:latest"; host="${host:---host=i686-w64-mingw32}";; (*) echo "**** ERROR: unknown mode '$1', try --help" 1>&2 exit 1 @@ -91,15 +99,22 @@ while test $# -gt 0; do (-a|--arch) shift; arch="$1" ;; - (-t|--targets) shift + (-t|--targets) shift; targets="$1" if test "$1" = "deb" -o "$1" = "rpm"; then # set mode to same value - set -- "-m" $@ + set -- "-m" "$@" continue fi ;; + (--host) shift; + host="--host=$1" + ;; + (-f|--flag) shift; + flags+=("$1") + ;; (-r|--repo) shift; + echo "OPTION: $1" repos+=("$1") ;; (-k|--key) shift; @@ -214,6 +229,7 @@ fi 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) fi +docker exec ${DOCKER_ID} chown $(id -u):$(id -g) "${HOME}" case $mode in (deb|apt) if [[ "${img}" =~ "ubuntu" ]]; then @@ -232,7 +248,7 @@ case $mode in docker exec ${DOCKER_ID} apt-get install ${OPTIONS} software-properties-common apt-transport-https dpkg-dev lsb-release || \ docker exec ${DOCKER_ID} apt-get install ${OPTIONS} python-software-properties apt-transport-https dpkg-dev lsb-release; for repo in "${repos[@]}"; do - ifthenelse "${repo}" "apt-add-repository ARG" + ifthenelse "${repo}" "apt-add-repository 'ARG'" done for key in "${keys[@]}"; do wget -O- "$key" \ @@ -270,10 +286,19 @@ EOF done 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 true)) - ifthenelse "${repo}" "${INSTALL_REPO} ARG" + ifthenelse "${repo}" "${INSTALL_REPO} 'ARG'" ((++i)) done docker exec ${DOCKER_ID} ./resolve-rpmbuilddeps.sh ;; + (win) + if [[ "${img}" =~ "ubuntu" ]]; then + docker exec ${DOCKER_ID} locale-gen ${LANG} + docker exec ${DOCKER_ID} update-locale LANG=${LANG} + fi + docker exec ${DOCKER_ID} apt-get update ${OPTIONS} + docker exec ${DOCKER_ID} apt-get install -y mingw-w64 + docker exec ${DOCKER_ID} ./resolve-debbuilddeps.sh + ;; esac -docker exec -u $(id -u):$(id -g) ${DOCKER_ID} ./bootstrap.sh -t "${targets}" +docker exec -u $(id -u):$(id -g) ${DOCKER_ID} ./bootstrap.sh -t "${targets}" ${host} ${flags[@]} diff --git a/debian/control.in b/debian/control.in index 2a4950a..45ab9f6 100644 --- a/debian/control.in +++ b/debian/control.in @@ -1,7 +1,7 @@ Source: @PACKAGE_NAME@ Priority: extra -Maintainer: @AUTHOR@ -Build-Depends: debhelper, subversion, pkg-config, automake, libtool, autotools-dev, lsb-release, default-jre-headless|default-jre, fakeroot, doxygen, graphviz, mscgen, libcppunit-dev, mrw-c++-dev +Maintainer: @PACKAGER@ +Build-Depends: debhelper, fakeroot, svn2cl, subversion, subversion-tools, pkg-config, automake, libtool, autotools-dev, pandoc, lsb-release, doxygen, graphviz, mscgen, default-jre-headless|default-jre, libcppunit-dev, mrw-c++-dev Package: @PACKAGE_NAME@ Section: libs @@ -13,6 +13,6 @@ Description: @DESCRIPTION@ Package: @PACKAGE_NAME@-dev Section: libdevel Architecture: any -Depends: @PACKAGE_NAME@ (= ${binary:Version}) +Depends: @PACKAGE_NAME@ (= ${binary:Version}), debhelper, fakeroot, svn2cl, subversion, subversion-tools, pkg-config, automake, libtool, autotools-dev, pandoc, lsb-release, doxygen, graphviz, mscgen, default-jre-headless|default-jre, libcppunit-dev, mrw-c++-dev Description: @DESCRIPTION@ - Development Package @README_DEB@