fixed rpm build
This commit is contained in:
@@ -1290,6 +1290,9 @@ ${HEADER}AM_CPPFLAGS = -I\${top_srcdir}/src -I\${top_builddir}/src
|
||||
AM_LDFLAGS = -L\${abs_top_builddir}/src/.libs
|
||||
LDADD = -l${PACKAGE_NAME#lib}
|
||||
|
||||
exampledir = ${docdir}/examples
|
||||
example_DATA =
|
||||
|
||||
MAINTAINERCLEANFILES = makefile.in
|
||||
EOF
|
||||
to --condition AX_BUILD_HTML_NPM html/package.json.in <<EOF
|
||||
@@ -1812,13 +1815,10 @@ Requires: @PKG_REQUIREMENTS@
|
||||
EOF
|
||||
to build-in-docker.conf <<EOF
|
||||
${HEADER}# Use Ubuntu Universe Repository
|
||||
repos+=("Ubuntu:::universe")
|
||||
repos+=("ubuntu:::universe")
|
||||
|
||||
# Use Marc Wäckerlin's Repository, see https://dev.marc.waeckerlin.org
|
||||
repos+=("Debian|Ubuntu:::https://dev.marc.waeckerlin.org/repository")
|
||||
repos+=("openSUSE:::https://dev.marc.waeckerlin.org/repository/opensuse/marc-waeckerlin.repo")
|
||||
repos+=("Fedora:::https://dev.marc.waeckerlin.org/repository/fedora/marc-waeckerlin.repo")
|
||||
repos+=("CentOS:::https://dev.marc.waeckerlin.org/repository/centos/marc-waeckerlin.repo")
|
||||
repos+=("debian|ubuntu:::https://dev.marc.waeckerlin.org/repository:::https://dev.marc.waeckerlin.org/repository/@DISTRIBUTOR@/marc-waeckerlin.repo")
|
||||
keys+=("https://dev.marc.waeckerlin.org/repository/PublicKey")
|
||||
EOF
|
||||
|
||||
|
@@ -195,21 +195,27 @@ function ifthenelse() {
|
||||
arg="$1"
|
||||
shift
|
||||
cmd="$*"
|
||||
DISTRIBUTOR=$(docker exec ${DOCKER_ID} lsb_release -si | sed 's, .*,,' | tr [:upper:] [:lower:])
|
||||
CODENAME=$(docker exec ${DOCKER_ID} lsb_release -cs)
|
||||
ARCH=$((docker exec ${DOCKER_ID} which dpkg > /dev/null 2> /dev/null && docker exec ${DOCKER_ID} dpkg --print-architecture) || echo amd64)
|
||||
if test "${arg/:::/}" = "${arg}"; then
|
||||
docker exec ${DOCKER_ID} bash -c "${cmd//ARG/${arg}}"
|
||||
docker exec ${DOCKER_ID} bash -c "${cmd//ARG/${arg//@DISTRIBUTOR@/${DISTRIBUTOR}}}"
|
||||
else
|
||||
os="${arg%%:::*}"
|
||||
thenpart="${arg#*:::}"
|
||||
if test "${thenpart/:::/}" = "${thenpart}"; then
|
||||
docker exec ${DOCKER_ID} bash -c 'os="'$os'"; if [[ "$(lsb_release -is)-$(lsb_release -cs)-$((which dpkg > /dev/null 2> /dev/null && dpkg --print-architecture) || echo amd64)" =~ ${os} ]]; then '"${cmd//ARG/${thenpart}}"'; fi'
|
||||
else
|
||||
elsepart=
|
||||
if test "${thenpart/:::/}" != "${thenpart}"; then
|
||||
elsepart="${thenpart##*:::}"
|
||||
thenpart="${thenpart%:::*}"
|
||||
thenpart="${thenpart%%:::*}"
|
||||
fi
|
||||
if [[ "${DISTRIBUTOR}-${CODENAME}-${ARCH}" =~ ${os} ]]; then
|
||||
if test -n "${thenpart}"; then
|
||||
docker exec ${DOCKER_ID} bash -c 'os="'$os'"; if [[ "$(lsb_release -is)-$(lsb_release -cs)-$((which dpkg > /dev/null 2> /dev/null && dpkg --print-architecture) || echo amd64)" =~ ${os} ]]; then '"${cmd//ARG/${thenpart}}"'; else '"${cmd//ARG/${elsepart}}"'; fi'
|
||||
else
|
||||
docker exec ${DOCKER_ID} bash -c 'os="'$os'"; if [[ "$(lsb_release -is)-$(lsb_release -cs)-$((which dpkg > /dev/null 2> /dev/null && dpkg --print-architecture) || echo amd64)" =~ ${os} ]]; then true; else '"${cmd//ARG/${elsepart}}"'; fi'
|
||||
fi
|
||||
docker exec ${DOCKER_ID} bash -c "${cmd//ARG/${thenpart//@DISTRIBUTOR@/${DISTRIBUTOR}}}"
|
||||
fi
|
||||
else
|
||||
if test -n "${elsepart}"; then
|
||||
docker exec ${DOCKER_ID} bash -c "${cmd//ARG/${elsepart//@DISTRIBUTOR@/${DISTRIBUTOR}}}"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
}
|
||||
@@ -290,7 +296,7 @@ EOF
|
||||
rm rpm-key
|
||||
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))
|
||||
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 false))
|
||||
ifthenelse "${repo}" "${INSTALL_REPO} 'ARG'"
|
||||
((++i))
|
||||
done
|
||||
|
Reference in New Issue
Block a user