From 13db4fcc58893c86b0147d0e603761c00bc3d33e Mon Sep 17 00:00:00 2001 From: "Ralf S. Engelschall" Date: Mon, 30 Dec 2002 15:49:25 +0000 Subject: [PATCH] macro processing is a black art -- just don't ask, you don't really want to know what this fixes --- openpkg/rpmmacros | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openpkg/rpmmacros b/openpkg/rpmmacros index 57b58203f0..7d698151c6 100644 --- a/openpkg/rpmmacros +++ b/openpkg/rpmmacros @@ -196,7 +196,7 @@ %ifndef() %if %{expand:%%{?%{1}:0}%%{!?%{1}:1}} # macros for package option handling -%option() %{expand:%%{!?%{1}:%%global %{1} %{2}}%%global _options %%{?_options:%%{_options}&}%{1}=%%{%{1}}} +%option() %{expand:%%{!?%{1}:%%global %*}%%global _options %%{?_options:%%{_options}&}%{1}=%%{%{1}}} %options(p:) %(echo "Package Options:"; opts=`echo "%{?_options:%{_options}}"`; if [ ".$opts" = . ]; then echo " (none)"; else IFS="&"; for opt in $opts; do eval `echo $opt | sed -e 's/^\\(.*\\)=\\(.*\\)$/name="\\1"; value="\\2"/'`; echo dummy | awk '{ printf(" %%%%option %%-%{?-p:%{-p*}}s %%s\\n", name, value); }' name="$name" value="$value"; done; fi) # macro-processor add-on for testing external conditions