rpm builds improved and fixed

master
Marc Wäckerlin 8 years ago
parent ecbaea1832
commit 530693add0
  1. 3
      scripts/ax_init_standard_project.m4
  2. 17
      scripts/bootstrap.sh
  3. 4
      scripts/resolve-rpmbuilddeps.sh

@ -225,6 +225,9 @@ AC_DEFUN([AX_INIT_STANDARD_PROJECT], [
VENDOR=$((lsb_release -is 2>/dev/null || echo unknown) | tr ' ' '_')
AX_SUBST(VENDOR)
DISTRO=$(lsb_release -sc 2>/dev/null || uname -s 2>/dev/null)
if test "${DISTRO}" = "n/a"; then
DISTRO="${VENDOR}_$(lsb_release -sr 2>/dev/null | tr ' ' '_')"
fi
AX_SUBST(DISTRO)
ARCH=$((@<:@@<:@ $(uname -sm) =~ 64 @:>@@:>@ && echo amd64) || (@<:@@<:@ $(uname -sm) =~ 'i?86' @:>@@:>@ && echo i386 || uname -sm))
AX_SUBST(ARCH)

@ -1603,7 +1603,7 @@ to --condition AX_USE_RPM_PACKAGING ${PACKAGE_NAME}.spec.in <<EOF
Summary: @DESCRIPTION@
Name: @PACKAGE_NAME@
Version: @VERSION@
Release: @BUILD_NUMBER@%{?dist}
Release: @BUILD_NUMBER@.@DISTRO@
License: LGPL
Group: $(if testtag AX_USE_LIBTOOL; then
echo Development/Libraries/C++;
@ -1617,9 +1617,6 @@ BuildRequires: which, pkgconfig, gnupg, expect, ${VCSDEPENDS_RPM}make, automake,
if testtag AX_USE_CXX; then
echo -n ", binutils-devel, gcc-c++"
fi
if testtag AX_USE_LIBTOOL; then
echo -n ", libtool, libtool-ltdl-devel"
fi
if testtag AX_USE_CPPUNIT; then
echo -n ", cppunit-devel"
fi
@ -1638,13 +1635,25 @@ BuildRequires: which, pkgconfig, gnupg, expect, ${VCSDEPENDS_RPM}make, automake,
%if 0%{?suse_version} || 0%{?sles_version}
BuildRequires: lsb-release
%else
%if 0%{?mageia}
BuildRequires: rpm-sign, lsb-release
%else
BuildRequires: rpm-sign, redhat-lsb
%endif
%endif
$(
if testtag AX_USE_DOXYGEN; then cat <<EOS
%if ! 0%{?centos}
BuildRequires: mscgen
%endif
EOS
fi
if testtag AX_USE_LIBTOOL; then cat <<EOS
%if 0%{?mageia}
BuildRequires: libtool, libltdl-devel
%else
BuildRequires: libtool, libtool-ltdl-devel
%endif
EOS
fi)

@ -14,7 +14,7 @@ INSTALL_TOOL=${INSTALL_TOOL:-$((test -x /usr/bin/zypper && echo zypper install -
SCHROOTNAME="$1"
PACKAGE_NAME=$(sed -n 's/^ *m4_define(x_package_name, \(.*\)).*/\1/p' configure.ac)
TRAP_CMD=
TRAP_CMD="sleep ${SLEEP:-0};"
DEPS=
for f in BUILD BUILDROOT RPMS SPECS SRPMS; do
if ! test -d $f; then
@ -48,7 +48,7 @@ if test -e ${PACKAGE_NAME}.spec.in -a ! -e ${PACKAGE_NAME}.spec; then
TRAP_CMD+="rm ${PACKAGE_NAME}.spec;"
trap "${TRAP_CMD}" INT TERM EXIT
sed 's,@\(\(ALL\|RPM\)_DEPEND_IFEXISTS\|\(ALL\|RPM\)_BUILD_DEPEND\|\(ALL\|RPM\)_DEPEND\)@,,g' ${PACKAGE_NAME}.spec.in | \
sed 's,@[^@]*@, dummytext,g' > ${PACKAGE_NAME}.spec
sed 's,@[^@]*@,dummytext,g' > ${PACKAGE_NAME}.spec
fi
TGZFILE=$(sed -n '/^Name: */{s///;h};/^Version: */{s///;H;x;s/\n/-/;s/$/.tar.gz/;p}' ${PACKAGE_NAME}.spec)

Loading…
Cancel
Save