contrib/rpm: allow building devel RPMs without debug enabled

Since commit 1afbf948a0,
"build: use different defaults for snapshot builds",
configure would enable debugging options if the version
number is odd.

Hence, on the master branch it was no longer possible to
build an RPM without debugging enabled. Especially,

  ./contrib/fedora/rpm/build_clean.sh -g -W debug

would not work as one would expect.
This commit is contained in:
Thomas Haller 2017-05-23 20:14:12 +02:00
parent 07036d731a
commit 22ad5422cf

View file

@ -39,6 +39,8 @@
%global snap %{?snapshot_dot}%{?git_sha_dot}
%global is_devel_build %(printf '%s' '%{real_version}' | sed -n 's/^1\\.\\([0-9]*[13579]\\)\\..*/1/p')
###############################################################################
%bcond_without adsl
@ -49,7 +51,11 @@
%bcond_without ppp
%bcond_without nmtui
%bcond_without regen_docs
%if 0%{is_devel_build}
%bcond_without debug
%else
%bcond_with debug
%endif
%bcond_without test
%bcond_with sanitizer
@ -374,8 +380,11 @@ intltoolize --automake --copy --force
--disable-undefined-sanitizer \
%endif
%if %{with debug}
--with-more-logging \
--enable-more-logging \
--with-more-asserts=10000 \
%else
--disable-more-logging \
--without-more-asserts \
%endif
--enable-ld-gc \
--with-libaudit=yes-disabled-by-default \