[packages/rpm-specdump] inline commonly used macros
glen
glen at pld-linux.org
Mon Nov 24 20:33:05 CET 2014
commit 0cf659b540b752ae630b87c82052f76fc2855c62
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Mon Nov 24 21:32:59 2014 +0200
inline commonly used macros
rpm-specdump.c | 10 ++++++++++
1 file changed, 10 insertions(+)
---
diff --git a/rpm-specdump.c b/rpm-specdump.c
index 9b473b5..f1a8200 100644
--- a/rpm-specdump.c
+++ b/rpm-specdump.c
@@ -285,6 +285,16 @@ struct Arguments args = { 0,0,0,-1,-1, {0,0,0}, 0 };
Spec s;
addDefine(&args, "patch %{nil}");
+
+ // instead of requiring rpm-build, we include some "builtin" macros
+ addDefine(&args, "bcond_without() %{expand:%%{!?_without_%{1}:%%global with_%{1} 1}}");
+ addDefine(&args, "bcond_with() %{expand:%%{?_with_%{1}:%%global with_%{1} 1}}");
+ addDefine(&args, "with() %{expand:%%{?with_%{1}:1}%%{!?with_%{1}:0}}");
+ addDefine(&args, "without() %{expand:%%{?with_%{1}:0}%%{!?with_%{1}:1}}");
+
+ // include macros.perl, etc
+ addDefine(&args, "include() %{nil}");
+
parseArgs(&args, argc, argv);
if ((args.chroot && chroot(args.chroot)==-1) ||
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/rpm-specdump.git/commitdiff/0cf659b540b752ae630b87c82052f76fc2855c62
More information about the pld-cvs-commit
mailing list