aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--macros.in34
1 files changed, 9 insertions, 25 deletions
diff --git a/macros.in b/macros.in
index 78eb083..59866ba 100644
--- a/macros.in
+++ b/macros.in
@@ -573,29 +573,6 @@ export CFLAGS="%optflags"; export CXXFLAGS="%optflags"; export RPM_OPT_FLAGS="%o
Obsoletes: %{1} < %{version}-%{release} \
Provides: %{1} = %{version}-%{release}
-#--------------------------------------------------------------------------------
-# --without section
-
-#%prep %{?_without_prep:%define __spec_prep_cmd /bin/true\
-#%%prep\
-#%{warn:Skipping %%prep stage\
-#}}%{?!_without_prep:%%prep}
-#
-#%build %{?_without_build:%define __spec_build_cmd /bin/true\
-#%%build\
-#%{warn:Skipping %%build stage\
-#}}%{?!_without_build:%%build}
-#
-#%install %{?_without_install:%define __spec_install_cmd /bin/true\
-#%%install\
-#%{warn:Skipping %%install stage\
-#}}%{?!_without_install:%%install}
-#
-#%check %{?_without_check:%define __spec_check_cmd /bin/true\
-#%%check\
-#%{warn:Skipping %%check stage\
-#}}%{?!_without_check:%%check}
-
# Shorthand for %{defined with_...}
# macros provided by rpm 4.4, but buggy :(
%_with() %{expand: %%{?_with_%1:1} %%{!?_with_%1: %%{?_without_%1:0} %%{!?_without_%1: %%{?with_%1:%%{with_%1}} %%{!?with_%1: %%{?without_%1:!%%{without_%1}} %%{!?without_%1: %%{?2:%%2} %%{!?2:1} } } } } }
@@ -656,8 +633,11 @@ Requires: python >= %minver, python < %maxver
%ocaml_sitelib %(if [ -x /usr/bin/ocamlc ]; then ocamlc -where;fi)/site-lib
#------------------------------------------------------------------------------
-# Redefine RPM sections to allow jumping over them
-#
+# Redefine RPM sections to allow jumping over them using "--without <section>".
+# This an interesting alternative to --short-circuit.
+# The following are mostly equivalent:
+# % rpmbuild -bi --short-circuit foo.spec && rpmbuild -bb --short-circuit foo.spec
+# % rpmbuild -bb --without build foo.spec
%prep %%prep \
[ %{_with prep} -eq 1 ] || exit 0 \
@@ -674,3 +654,7 @@ Requires: python >= %minver, python < %maxver
%%install\
[ %{_with install} -eq 1 ] || exit 0 \
%{nil}
+
+%check %%check \
+[ %{_with check} -eq 1 ] || exit 0 \
+%{nil}