tested on mageia 5 :)

master
Marc Wäckerlin 8 years ago
parent fc92d9e8ac
commit 8080633f5d
  1. 4
      build-in-docker.sh
  2. 9
      mrw-c++.spec.in
  3. 6
      resolve-rpmbuilddeps.sh

@ -255,8 +255,8 @@ enabled=1
gpgcheck=0
EOF
fi
INSTALL_TOOL=$((docker exec ${DOCKER_ID} test -x /usr/bin/zypper && echo zypper) || (docker exec ${DOCKER_ID} test -x /usr/bin/dnf && echo dnf) || (docker exec ${DOCKER_ID} test -x /usr/bin/yum && echo yum))
docker exec ${DOCKER_ID} ${INSTALL_TOOL} install -y rpm-build automake libtool subversion gcc-c++ pkgconfig
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))
docker exec ${DOCKER_ID} ${INSTALL_TOOL} rpm-build automake libtool subversion gcc-c++ pkgconfig
docker exec -u $(id -u):$(id -g) ${DOCKER_ID} ./bootstrap.sh -c
TGZFILE=$(grep PACKAGE_STRING= configure | sed "s, ,-,g;s,PACKAGE_STRING=',,g;s,',.tar.gz,g")
touch $TGZFILE

@ -10,8 +10,13 @@ BuildRequires: rpm-build, subversion, automake, autoconf, doxygen, java-openjdk,
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, libtool-ltdl-devel
%if 0%{?fedora} || 0%{?rhel} || 0%{?rhl} || 0%{?centos} || 0%{?centos_ver} || 0%{?centos_version} || 0%{?mageia}
BuildRequires: which, pkgconfig, cppunit-devel
%if 0%{?mageia}
BuildRequires: lsb-release, libltdl-devel
%else
BuildRequires: redhat-lsb, libtool-ltdl-devel
%endif
%if ! ( 0%{?centos} || 0%{?centos_ver} || 0%{?centos_version} )
BuildRequires: mscgen
%endif

@ -10,19 +10,19 @@
## 1 2 3 4 5 6 7 8
## 45678901234567890123456789012345678901234567890123456789012345678901234567890
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))}
INSTALL_TOOL=${INSTALL_TOOL:-$((test -x /usr/bin/zypper && echo zypper install -y) || (test -x /usr/bin/dnf && echo dnf install -y) || (test -x /usr/bin/yum && echo yum install -y) || (test -x /usr/sbin/urpmi && echo urpmi --auto))}
SCHROOTNAME="$1"
PACKAGE_NAME=$(sed -n 's/^ *m4_define(x_package_name, \(.*\)).*/\1/p' configure.ac)
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')
if test -n "${FILES}"; then
schroot -c ${SCHROOTNAME} -u root -- ${INSTALL_TOOL} install -y ${FILES}
schroot -c ${SCHROOTNAME} -u root -- ${INSTALL_TOOL} ${FILES}
fi
else
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}
${INSTALL_TOOL} ${FILES}
fi
fi

Loading…
Cancel
Save