rpm builds improved and fixed

master
Marc Wäckerlin 8 years ago
parent 964467f0d9
commit 2d34280948
  1. 5
      ChangeLog
  2. 3
      ax_init_standard_project.m4
  3. 24
      bootstrap.sh
  4. 13
      mrw-c++.spec.in
  5. 4
      resolve-rpmbuilddeps.sh

@ -1,3 +1,8 @@
2017-05-24 11:39
* [r474] ChangeLog, mrw-c++.spec.in:
fixed rpm build
2017-05-23 13:11
* [r473] mrw-c++.spec.in:

@ -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,14 +1635,27 @@ 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
%endif
$(
if testtag AX_USE_DOXYGEN; then cat <<EOS
%if ! 0%{?centos}
BuildRequires: mscgen
%fi
%endif
EOS
fi)
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)
%description
@README@

@ -1,23 +1,32 @@
Summary: @DESCRIPTION@
Name: @PACKAGE_NAME@
Version: @VERSION@
Release: @BUILD_NUMBER@%{?dist}
Release: @BUILD_NUMBER@.@DISTRO@
License: LGPL
Group: Development/Libraries/C++
Source0: %{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires: which, pkgconfig, gnupg, expect, subversion, make, automake, autoconf, rpm-build, binutils-devel, gcc-c++, libtool, libtool-ltdl-devel, cppunit-devel, doxygen, graphviz, java-openjdk @RPM_BUILD_DEPEND@ @RPM_DEPEND_IFEXISTS@
BuildRequires: which, pkgconfig, gnupg, expect, subversion, make, automake, autoconf, rpm-build, binutils-devel, gcc-c++, cppunit-devel, doxygen, graphviz, java-openjdk @RPM_BUILD_DEPEND@ @RPM_DEPEND_IFEXISTS@
#### os dependent definitions ####
%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 ! 0%{?centos}
BuildRequires: mscgen
%endif
%if 0%{?mageia}
BuildRequires: libtool, libltdl-devel
%else
BuildRequires: libtool, libtool-ltdl-devel
%endif
%description
@README@

@ -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