SOURCES: rpm.macros - add X.org helper macros (needs review)

arekm arekm at pld-linux.org
Thu Sep 6 18:00:52 CEST 2007


Author: arekm                        Date: Thu Sep  6 16:00:52 2007 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- add X.org helper macros (needs review)

---- Files affected:
SOURCES:
   rpm.macros (1.388 -> 1.389) 

---- Diffs:

================================================================
Index: SOURCES/rpm.macros
diff -u SOURCES/rpm.macros:1.388 SOURCES/rpm.macros:1.389
--- SOURCES/rpm.macros:1.388	Sun Aug  5 14:24:47 2007
+++ SOURCES/rpm.macros	Thu Sep  6 18:00:47 2007
@@ -639,6 +639,25 @@
 fi \
 %{nil}
 
+
+# X.org helper macros
+%__xorg_abi_requires(v:) Requires: xorg-xserver-server%{-v*}(%{expand:%1}-abi) = %{expand:%{%{!?2:%{1}}%{?2}}}
+#
+%xorg_xserver_ansic_abi		%(awk '/#define ABI_ANSIC_VERSION/ { split($0,A,/[(,)]/); printf("%d.%d",A[2], A[3]); }' %{_includedir}/xorg/xf86Module.h)
+%xorg_xserver_extension_abi	%(awk '/#define ABI_EXTENSION_VERSION/ { split($0,A,/[(,)]/); printf("%d.%d",A[2], A[3]); }' %{_includedir}/xorg/xf86Module.h)
+%xorg_xserver_font_abi		%(awk '/#define ABI_FONT_VERSION/ { split($0,A,/[(,)]/); printf("%d.%d",A[2], A[3]); }' %{_includedir}/xorg/xf86Module.h)
+%xorg_xserver_videodrv_abi	%(awk '/#define ABI_VIDEODRV_VERSION/ { split($0,A,/[(,)]/); printf("%d.%d",A[2], A[3]); }' %{_includedir}/xorg/xf86Module.h)
+%xorg_xserver_xinput_abi		%(awk '/#define ABI_XINPUT_VERSION/ { split($0,A,/[(,)]/); printf("%d.%d",A[2], A[3]); }' %{_includedir}/xorg/xf86Module.h)
+
+%requires_xorg_xserver_extension %{__xorg_abi_requires ansic xorg_xserver_ansic_abi} \
+%{__xorg_abi_requires extension xorg_xserver_extension_abi}
+%requires_xorg_xserver_xinput %{__xorg_abi_requires ansic xorg_xserver_ansic_abi} \
+%{__xorg_abi_requires xinput xorg_xserver_xinput_abi}
+%requires_xorg_xserver_font %{__xorg_abi_requires ansic xorg_xserver_ansic_abi} \
+%{__xorg_abi_requires font xorg_xserver_font_abi}
+%requires_xorg_xserver_videodrv %{__xorg_abi_requires ansic xorg_xserver_ansic_abi} \
+%{__xorg_abi_requires videodrv xorg_xserver_videodrv_abi}
+
 # Python specific macro definitions.
 # python main version
 %py_ver			%(python -c "import sys; print sys.version[:3]")
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/rpm.macros?r1=1.388&r2=1.389&f=u



More information about the pld-cvs-commit mailing list