]> git.pld-linux.org Git - packages/rpm.git/blobdiff - rpm.macros
- fixed
[packages/rpm.git] / rpm.macros
index a247fc6fe1b620ed6d617063b5686d27c7d9e03a..bc79622056ff1e59b3f3e7f6e65d34ca691b6fb3 100644 (file)
 %ifdef()       %if %{expand:%%{?%{1}:1}%%{!?%{1}:0}}
 %ifndef()      %if %{expand:%%{?%{1}:0}%%{!?%{1}:1}}
 
+# Shorthand for %{defined with_...}
+%with()                %{expand:%%{?with_%{1}:1}%%{!?with_%{1}:0}}
+%without()     %{expand:%%{?with_%{1}:0}%%{!?with_%{1}:1}}
+
+# Shorthand for %if %{with ...}
+%ifwith()      %if %{expand:%%{?with_%{1}:1}%%{!?with_%{1}:0}}
+%ifwithout()   %if %{expand:%%{?with_%{1}:0}%%{!?with_%{1}:1}}
+
 # Handle conditional builds. %bcond_with is for case when feature is
 # default off and needs to be activated with --with ... command line 
 # switch. %bcond_without is for the dual case.
@@ -406,3 +414,16 @@ fi \
 # unchanged
 %pyrequires_eq() Requires:       %1 >= %py_ver %1 < %(echo `python -c "import sys; import string; ver=sys.version[:3].split('.'); ver[1]=str(int(ver[1])+1); print string.join(ver, '.')"`)
 
+# depmod macro
+%depmod() { \
+if [ -e /boot/System.map-%1 ]; then \
+        /sbin/depmod -a -F /boot/System.map-%1 %1; \
+else \
+        if [ -e /boot/System.map ]; then \
+                /sbin/depmod -a -F /boot/System.map %1; \
+        else \
+                /sbin/depmod -a %1; \
+        fi \
+fi; \
+}
+
This page took 0.031435 seconds and 4 git commands to generate.