build improved for fedora, centos, opensuse

master
Marc Wäckerlin 8 years ago
parent 9e29ffddb4
commit 6cd6875e49
  1. 15
      bootstrap.sh
  2. 24
      build-in-docker.sh
  3. 4
      configure.ac
  4. 4
      mrw-c++.spec.in
  5. 9
      resolve-rpmbuilddeps.sh

@ -1539,10 +1539,10 @@ BuildRequires: gnupg, ${VCSDEPENDS} make, automake, autoconf, rpm-build$(
echo -n ", binutils-devel, gcc-c++"
fi
if testtag AX_USE_LIBTOOL; then
echo -n ", libtool, libtool-ltdl-devel";
echo -n ", libtool";
fi
if testtag AX_USE_DOXYGEN; then
echo -n ", doxygen, default-jre-headless";
echo -n ", doxygen, java-openjdk";
fi
if testtag AX_USE_PERLDOC; then
echo -n ", libpod-tree-perl";
@ -1552,10 +1552,11 @@ BuildRequires: gnupg, ${VCSDEPENDS} make, automake, autoconf, rpm-build$(
$(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}
BuildRequires: which, pkgconfig, redhat-lsb$(
if testtag AX_USE_CPPUNIT; then
echo -n ", cppunit-devel";
fi)
BuildRequires: which, svn2cl, pkgconfig, redhat-lsb$(
if testtag AX_USE_LIBTOOL; then
echo -n ", libtool-ltdl";
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 AX_REQUIRE_QT; then echo -n "BuildRequires: qt5-qtbase-devel, qt5-qttools, qt5-qtwebkit-devel"; fi)
@ -1674,7 +1675,7 @@ for d in src test scripts doc examples html; do
done
to --mode "u=rwx,g=rwx,o=rx" autogen.sh <<EOF
#!/bin/bash -e
if test -n "$VCS" -a -d .$VCS -a -e -x $(which ${VCS}2cl); then
if test -n "$VCS" -a -d ".$VCS" -a -e -x "\$(which ${VCS}2cl)"; then
$(case "$VCS" in
(svn) echo " ${VCS}2cl";;
(git) echo " ${VCS}2cl > ChangeLog";;

@ -207,11 +207,11 @@ if ! [[ $arch =~ $myarch ]]; then
docker cp "/usr/bin/qemu-${arch}-static" "${DOCKER_ID}:/usr/bin/qemu-${arch}-static"
fi
docker start "${DOCKER_ID}"
if docker exec ${DOCKER_ID} getent passwd > /dev/null 2>&1; then
docker exec ${DOCKER_ID} groupadd -g $(id -g) build
docker exec ${DOCKER_ID} useradd -g $(id -g) -u $(id -u) build
else
docker exec ${DOCKER_ID} useradd -m -u $(id -u) -g $(id -u) -d"${HOME}" build
if ! docker exec ${DOCKER_ID} getent group $(id -g) > /dev/null 2>&1; then
docker exec ${DOCKER_ID} groupadd -g $(id -g) $(id -gn)
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 -u) -d"${HOME}" $(id -un)
fi
case $mode in
(deb|apt)
@ -243,7 +243,19 @@ case $mode in
docker exec ${DOCKER_ID} ./resolve-debbuilddeps.sh
;;
(rpm|yum|dnf|zypper)
docker exec ${DOCKER_ID} ./resolve-rpmbuilddeps.sh || true
if [[ "$img" =~ "centos" ]]; then
docker exec ${DOCKER_ID} yum install -y redhat-lsb
docker exec -i ${DOCKER_ID} bash -c 'cat > /etc/yum.repos.d/wandisco-svn.repo' <<EOF
[WandiscoSVN]
name=Wandisco SVN Repo
EOF
docker exec -i ${DOCKER_ID} bash -c 'echo "baseurl=http://opensource.wandisco.com/centos/$(lsb_release -sr | sed '"'"'s,[^0-9].*,,'"'"')/svn-'$(svn --version | head -1 | sed 's,[^0-9]*\([0-9]\+\.[0-9]\+\).*,\1,')'/RPMS/$(uname -i)/" >> /etc/yum.repos.d/wandisco-svn.repo'
docker exec -i ${DOCKER_ID} bash -c 'cat >> /etc/yum.repos.d/wandisco-svn.repo' <<EOF
enabled=1
gpgcheck=0
EOF
fi
docker exec ${DOCKER_ID} ./resolve-rpmbuilddeps.sh
;;
esac
docker exec -u $(id -u):$(id -g) ${DOCKER_ID} ./bootstrap.sh -t "${targets}"

@ -107,7 +107,7 @@ if test "$have_stacktrace" = "yes"; then
yours])])
AC_SEARCH_LIBS(cplus_demangle, [demangle iberty_pic iberty],
[AC_MSG_RESULT([OK, found cplus_demangle])],
[AC_MSG_ERROR([Function cplus_demangle not found!
[AC_MSG_WARN([Function cplus_demangle not found!
- I looked in libdemangle and libiberty
- Try "find /usr/lib -name 'libdemangle*' -o -name 'libiberty*'"
- is one of them installed?
@ -116,7 +116,7 @@ if test "$have_stacktrace" = "yes"; then
- on Ubuntu (trusty) install libiberty-dev
- Try to compile with option --disable-stacktrace
If you are not a developer, you perhaps don't need it...?])])
if test "$have_dynamicstack" != "yes"; then
if test "$have_dynamicstack" != "yes" -a "$have_cplus_demangle" = "yes"; then
AC_DEFINE([NO_LTDL])
AC_SEARCH_LIBS(compress, z,
[AC_MSG_RESULT([OK, found libz])],

@ -5,13 +5,13 @@ Release: @BUILD_NUMBER@%{?dist}
License: LGPL
Group: Development/Libraries/C++
Source0: %{name}-%{version}.tar.gz
BuildRequires: rpm-build subversion, automake, autoconf, doxygen, libtool, libtool-ltdl-devel, binutils-devel, gcc-c++
BuildRequires: rpm-build, subversion, automake, autoconf, doxygen, java-openjdk, libtool, binutils-devel, gcc-c++
%if 0%{?fedora} != 20
BuildRequires: graphviz
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
%if 0%{?fedora} || 0%{?rhel} || 0%{?rhl} || 0%{?centos} || 0%{?centos_ver} || 0%{?centos_version}
BuildRequires: which, pkgconfig, cppunit-devel, redhat-lsb
BuildRequires: which, pkgconfig, cppunit-devel, redhat-lsb, libtool-ltdl
%if ! ( 0%{?centos} || 0%{?centos_ver} || 0%{?centos_version} )
BuildRequires: mscgen
%endif

@ -10,21 +10,20 @@
## 1 2 3 4 5 6 7 8
## 45678901234567890123456789012345678901234567890123456789012345678901234567890
INSTALL_TOOL=${INSTALL_TOOL:-$((est -x /usr/bin/zypper && echo zypper) || (test -x /usr/bin/dnf && echo dnf) || (test -x /usr/bin/yum && echo yum))}
INSTALL_TOOL=${INSTALL_TOOL:-$((test -x /usr/bin/zypper && echo zypper) || (test -x /usr/bin/dnf && echo dnf) || (test -x /usr/bin/yum && echo yum))}
SCHROOTNAME="$1"
PACKAGE_NAME=$(sed -n 's/^ *m4_define(x_package_name, \(.*\)).*/\1/p' configure.ac)
if test -n "${SCHROOTNAME}"; then
schroot -c ${SCHROOTNAME} -u root -- ${INSTALL_TOOL} install -y rpm-build automake
autoconf
schroot -c ${SCHROOTNAME} -u root -- ${INSTALL_TOOL} install -y rpm-build automake libtool subversion gcc-c++ pkgconfig
schroot -c ${SCHROOTNAME} -u root -- ./bootstrap.sh -c
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 -- ${INSTALL_TOOL} install -y ${FILES}
fi
else
${INSTALL_TOOL} install -y rpm-build automake
autoconf
${INSTALL_TOOL} install -y rpm-build automake libtool subversion gcc-c++ pkgconfig
./bootstrap.sh -c
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
${INSTALL_TOOL} install -y ${FILES}

Loading…
Cancel
Save