BUILD: Support nodebug option for gbs build
authorGeunsik Lim <geunsik.lim@samsung.com>
Tue, 2 Apr 2019 03:48:42 +0000 (12:48 +0900)
committerMyungJoo Ham <myungjoo.ham@samsung.com>
Sat, 6 Apr 2019 12:33:07 +0000 (21:33 +0900)
Fixed issue #1314.

This commit is to support optional flag to skip the generation of debug packages
to speed up a build time and to save a storage cost. In case that developers
have to do a debugging the source code with gdb, they may change the value of
the 'skipdebug' from 1 to 0.

**Changes**
V2:
 - Added "--define '_skip_debug_rpm 1'"
   : https://github.com/nnsuite/TAOS-CI/blob/master/ci/taos/plugins-base/pr-audit-build-tizen.sh#L84

V1:
 - Added optional flag to do not generate debug package

Signed-off-by: Geunsik Lim <geunsik.lim@samsung.com>
packaging/nnstreamer.spec

index 3e06e4a..6140767 100644 (file)
@@ -24,6 +24,7 @@ Source1001:   nnstreamer.manifest
 Source1002:    capi-nnstreamer.manifest
 %endif
 
+
 Requires:      gstreamer >= 1.8.0
 BuildRequires: gstreamer-devel
 BuildRequires: gst-plugins-base-devel
@@ -73,6 +74,14 @@ BuildRequires: ssat
 # For ORC (Oil Runtime Compiler)
 BuildRequires: pkgconfig(orc-0.4)
 
+# Note that debug packages generate an additional build and storage cost.
+# If you do not need debug packages, run '$ gbs build ... --define "_skip_debug_rpm 1"'.
+
+%if "%{?_skip_debug_rpm}" == "1"
+%global debug_package %{nil}
+%global __debug_install_post %{nil}
+%endif
+
 %package unittest-coverage
 Summary:       NNStreamer UnitTest Coverage Analysis Result
 %description unittest-coverage