diff options
author | Thomas Haller <thaller@redhat.com> | 2017-05-23 20:14:12 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2017-05-23 22:35:54 +0200 |
commit | 22ad5422cfadb9290054594ed0b08eb2a06374c8 (patch) | |
tree | ef3f803992136022c17cbbd48455376920335520 /contrib/fedora | |
parent | 07036d731ace134f7764f60c7aa42dafa64d5709 (diff) | |
download | NetworkManager-22ad5422cfadb9290054594ed0b08eb2a06374c8.tar.gz |
contrib/rpm: allow building devel RPMs without debug enabled
Since commit 1afbf948a0825300ce395adc5706e1ffdca94d24,
"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.
Diffstat (limited to 'contrib/fedora')
-rw-r--r-- | contrib/fedora/rpm/NetworkManager.spec | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/contrib/fedora/rpm/NetworkManager.spec b/contrib/fedora/rpm/NetworkManager.spec index 752bb32a6b..44287da5d5 100644 --- a/contrib/fedora/rpm/NetworkManager.spec +++ b/contrib/fedora/rpm/NetworkManager.spec @@ -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 \ |