aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Thauvin <nanardon@mandriva.org>2005-06-08 03:14:38 +0000
committerOlivier Thauvin <nanardon@mandriva.org>2005-06-08 03:14:38 +0000
commit62a5e488d458906ef269d21ab816fc90a1e28080 (patch)
tree9a94c0595664507530016950d1d427e92fa53d31
parent9c3ef1bdbb7be1e5aca002af63ae73a8f7a0ee65 (diff)
downloadrpm-setup-62a5e488d458906ef269d21ab816fc90a1e28080.tar
rpm-setup-62a5e488d458906ef269d21ab816fc90a1e28080.tar.gz
rpm-setup-62a5e488d458906ef269d21ab816fc90a1e28080.tar.bz2
rpm-setup-62a5e488d458906ef269d21ab816fc90a1e28080.tar.xz
rpm-setup-62a5e488d458906ef269d21ab816fc90a1e28080.zip
- rpmbuild --without section
- fix %with() %without()
-rw-r--r--macros.in29
1 files changed, 29 insertions, 0 deletions
diff --git a/macros.in b/macros.in
index 6af84d8..8aa6c2c 100644
--- a/macros.in
+++ b/macros.in
@@ -491,3 +491,32 @@
%rename() \
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}:0}}
+%without() %{expand:%%{?_without_%{1}:1}%%{!?_without_%{1}:0}}
+