aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-01-28 16:02:28 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-01-28 16:02:28 +0000
commitf137e323fd887e96cf1f657cbe5642b090e9f0b2 (patch)
tree727ac16fb917f5ab4b351a75866df191cea29ee9
parentf394f26220e7ae816f32337bbbf8b10734418e88 (diff)
downloadrpm-setup-f137e323fd887e96cf1f657cbe5642b090e9f0b2.tar
rpm-setup-f137e323fd887e96cf1f657cbe5642b090e9f0b2.tar.gz
rpm-setup-f137e323fd887e96cf1f657cbe5642b090e9f0b2.tar.bz2
rpm-setup-f137e323fd887e96cf1f657cbe5642b090e9f0b2.tar.xz
rpm-setup-f137e323fd887e96cf1f657cbe5642b090e9f0b2.zip
- remove some commented macros
- restore %check macro but a different implementation more alike the others. this %checks allows "--without check" - explain the advantage of "--without <section>" (inherited from conectiva)
-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}