fix rpm i.e. fedora / centos build

master
Marc Wäckerlin 7 years ago
parent 64168e00bc
commit 5516fb2e1f
  1. 34
      scripts/ax_init_standard_project.m4
  2. 15
      scripts/bootstrap.sh
  3. 8
      scripts/build-in-docker.sh
  4. 11
      scripts/resolve-debbuilddeps.sh
  5. 9
      scripts/resolve-rpmbuilddeps.sh

@ -456,6 +456,12 @@ AC_DEFUN([AX_USE_NODEJS], [
[${PATH}${PATH_SEPARATOR}${ANDROID_HOME}/tools])
AC_CONFIG_FILES([nodejs/package.json])
AC_CONFIG_FILES([nodejs/makefile])
if test -z "${DEB_SECTION}"; then
AX_DEB_SECTION([web])
fi
if test -z "${RPM_GROUP}"; then
AX_RPM_GROUP([Applications/Internet])
fi
AX_ADD_MAKEFILE_TARGET_DEP([maintainer-clean-am], [maintainer-clean-nodejs-targets], [nodejs/makefile.in])
test -f nodejs/makefile.in && cat >> nodejs/makefile.in <<EOF
#### Begin: Appended by $0
@ -494,6 +500,12 @@ EOF
# use this in configure.ac to support HTML data for webservers
AC_DEFUN([AX_BUILD_HTML], [
AC_CONFIG_FILES([html/makefile])
if test -z "${DEB_SECTION}"; then
AX_DEB_SECTION([web])
fi
if test -z "${RPM_GROUP}"; then
AX_RPM_GROUP([Applications/Internet])
fi
AX_ADD_MAKEFILE_TARGET_DEP([maintainer-clean-am], [maintainer-clean-html-targets], [html/makefile.in])
test -f html/makefile.in && cat >> html/makefile.in <<EOF
#### Begin: Appended by $0
@ -521,6 +533,12 @@ AC_DEFUN([AX_USE_LIBTOOL], [
AC_SUBST(LIB_VERSION)
AC_PROG_LIBTOOL
AC_CONFIG_FILES([src/${PACKAGE_NAME}.pc])
if test -z "${DEB_SECTION}"; then
AX_DEB_SECTION([devel])
fi
if test -z "${RPM_GROUP}"; then
AX_RPM_GROUP([Development/Libraries])
fi
AX_ADD_MAKEFILE_TARGET_DEP([install-data-am], [install-data-libtool-pkg], [src/makefile.in])
AX_ADD_MAKEFILE_TARGET_DEP([uninstall-am], [uninstall-data-am], [src/makefile.in])
AX_ADD_MAKEFILE_TARGET_DEP([uninstall-data-am], [uninstall-data-libtool-pkg], [src/makefile.in])
@ -538,7 +556,11 @@ EOF
])
# use this in configure.ac to support debian packages
# - $1: optional debian package section
AC_DEFUN([AX_USE_DEBIAN_PACKAGING], [
if test -n "$1"; then
AX_DEB_SECTION([$1])
fi
if test -f README.md; then
README_DEB=$(tail -n +3 README.md | sed -e 's/^ *$/./g' -e 's/^/ /g')
else
@ -563,7 +585,11 @@ EOF
])
# use this in configure.ac to support RPM packages
# - $1: optional rpm package group
AC_DEFUN([AX_USE_RPM_PACKAGING], [
if test -n "$1"; then
AX_RPM_GROUP([$1])
fi
AC_CONFIG_FILES([${PACKAGE_NAME}.spec])
#AX_ADD_MAKEFILE_TARGET_DEP([clean-am], [clean-rpm-targets], [makefile.in])
AX_ADD_MAKEFILE_TARGET_DEP([clean-am], [clean-rpm-targets], [makefile.in])
@ -840,8 +866,8 @@ AC_DEFUN([AX_PKG_REQUIRE], [
fi
done
for f in $pkg $4; do
if (test -x /usr/bin/zypper && zypper search -x "${f}-devel" 1>&2 > /dev/n ull) || \
(test -x /usr/bin/dnf && dnf list -q "${f}-devel" 1>&2 > /dev/null) || \
if (test -x /usr/bin/zypper && zypper search -x "${f}-devel" 1>&2 > /dev/null) || \
(test -x /usr/bin/dnf && dnf list -q "${f}-devel" 1>&2 > /dev/null) || \
(test -x /usr/bin/yum && yum list -q "${f}-devel" 1>&2 > /dev/null) || \
(test -x /usr/sbin/urpmq && urpmq "${f}-devel" 1>&2 > /dev/null); then
rpm_pkg=${f}-devel
@ -911,8 +937,8 @@ AC_DEFUN([AX_PKG_CHECK], [
if test -n "$(apt-cache policy -q ${deb_pkg} 2> /dev/null)"; then
AX_DEB_BUILD_DEPEND([$deb_pkg])
fi
if (test -x /usr/bin/zypper && zypper search -x "$rpm_pkg" 1>&2 > /dev/n ull) || \
(test -x /usr/bin/dnf && dnf list -q "$rpm_pkg" 1>&2 > /dev/null) || \
if (test -x /usr/bin/zypper && zypper search -x "$rpm_pkg" 1>&2 > /dev/null) || \
(test -x /usr/bin/dnf && dnf list -q "$rpm_pkg" 1>&2 > /dev/null) || \
(test -x /usr/bin/yum && yum list -q "$rpm_pkg" 1>&2 > /dev/null) || \
(test -x /usr/sbin/urpmq && urpmq "$rpm_pkg" 1>&2 > /dev/null); then
AX_RPM_BUILD_DEPEND([$rpm_pkg])

@ -1629,15 +1629,19 @@ BuildRequires: which, pkgconfig, gnupg, expect, ${VCSDEPENDS_RPM}make, automake,
if testtag AX_USE_PERLDOC; then
echo -n ", libpod-tree-perl";
fi
if testtag AX_REQUIRE_QT || testtag AX_CHECK_QT AX_REQUIRE_QT; then
echo -n ", qt-devel, libqt5-qtbase-devel, libqt5-qttools, libQt5WebKit5-devel";
fi
) @RPM_BUILD_DEPEND@ @RPM_DEPEND_IFEXISTS@
#### os dependent definitions ####
%if 0%{?suse_version} || 0%{?sles_version}
BuildRequires: lsb-release
BuildRequires: lsb-release$(
if testtag AX_REQUIRE_QT || testtag AX_CHECK_QT; then
echo -n ", libqt5-qtbase-devel, libqt5-qttools, libQt5WebKit5-devel libqt5-qtwebengine-devel libQt5WebKitWidgets-devel";
fi)
%else
$(
if testtag AX_REQUIRE_QT || testtag AX_CHECK_QT; then
echo -n "BuildRequires: qt5-qtbase-devel, qt5-qttools-devel, qt5-qtwebkit-devel";
fi)
%if 0%{?mageia}
BuildRequires: rpm-sign, lsb-release
%else
@ -1820,6 +1824,9 @@ repos+=("ubuntu:::universe")
# Use Marc Wäckerlin's Repository, see https://dev.marc.waeckerlin.org
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")
# centos requires epel-release for some packages, such as Qt WebKit
packages+=("centos:::epel-release")
EOF
#### Cleanup If Makefile Exists ####

@ -90,7 +90,7 @@ while test $# -gt 0; do
img="mwaeckerlin/ubuntu:latest"; host="${host:---host=i686-w64-mingw32}"
targets="all install"
flags+=("--prefix=/workdir/usr")
packages1=("mingw-w64")
packages+=("mingw-w64")
;;
(*)
echo "**** ERROR: unknown mode '$1', try --help" 1>&2
@ -300,6 +300,12 @@ EOF
ifthenelse "${repo}" "${INSTALL_REPO} 'ARG'"
((++i))
done
for package in "${packages[@]}"; do
ifthenelse "${package}" "${INSTALL_TOOL} ARG"
done
for command in "${commands[@]}"; do
ifthenelse "${command}" "ARG"
done
docker exec ${DOCKER_ID} ./resolve-rpmbuilddeps.sh
;;
esac

@ -36,10 +36,7 @@ DEPS=
if test -e debian/control.in -a ! -e debian/control; then
function pkg_exists() {
test -n "$(${DO} apt-cache policy -q ${1})" \
&& ((! $(${DO} apt-cache policy ${1} 2>&1 \
| grep -q 'N: Unable to locate package')) \
&& (! ${DO} dpkg -l "${1}" 1>&2 > /dev/null))
test -n "$(${DO} apt-cache policy -q ${1})"
}
function AX_PKG_CHECK() {
local DEV_DEB_DIST_PKG=
@ -127,4 +124,10 @@ if test -n "${TO_INSTALL}" && ! install ${TO_INSTALL}; then
exit 1
fi
FILES="$(LANG= ${DO} dpkg-checkbuilddeps 2>&1 | sed -n '/Unmet build dependencies/ { s,.*Unmet build dependencies: ,,g; s, ([^)]*),,g; s, *| *,|,g; p}')"
if test -n "${FILES}"; then
echo "**** ERROR: Cannot install: " $FILES
exit 1
fi
echo "**** Success: All Dependencies Resolved"

@ -107,5 +107,14 @@ else
fi
fi
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')
else
FILES=$(LANG= rpmbuild -bb --clean --nobuild --define "_topdir ." --define "_sourcedir ." ${PACKAGE_NAME}.spec 2>&1 | sed -n 's, is needed by.*,,p')
fi
if test -n "${FILES}"; then
echo "**** ERROR: Cannot install: " $FILES
exit 1
fi
echo "**** Success: All Dependencies Resolved"

Loading…
Cancel
Save