]> git.pld-linux.org Git - packages/rpm.git/blobdiff - rpm.macros
- don't do package names in autorequires
[packages/rpm.git] / rpm.macros
index dcf1f4b15c96fdbc813f863c938cc48e05fb1f23..f1e5395cdfc054e36bc625b730b4714d40ed975c 100644 (file)
 LANG=C\
 export LANG\
 unset DISPLAY ||:\
+unset LINGUAS ||:\
 %{nil}
 
 %build %%build\
 LANG=C\
 export LANG\
 unset DISPLAY ||:\
+unset LINGUAS ||:\
 %{nil}
 
 %install %{?_enable_debug_packages:%{?buildsubdir:%{debug_package}}}\
@@ -125,6 +127,7 @@ unset DISPLAY ||:\
 LANG=C\
 export LANG\
 unset DISPLAY ||:\
+unset LINGUAS ||:\
 %{nil}
 
 # ------------------------------------------------------------------------
@@ -427,7 +430,28 @@ echo "Compress kernel modules if any."; \
 %py_ocomp       python -O -c "import compileall; import sys; compileall.compile_dir(sys.argv[1], ddir=sys.argv[1][len('$RPM_BUILD_ROOT'):])"
 
 # Software written in Python language require Python with main version
-%pyrequires_eq() Requires:     python(bytecode) = %py_ver %1
+%pyrequires_eq() Requires:     python(abi) = %py_ver %1
+
+
+# Hardlink binary identical .pyc and .pyo files
+# (idea by glen <at> pld-linux <dot> org)
+%__spec_install_post_py_hardlink {\
+%{!?no_install_post_py_hardlink: \
+[ ! -d "$RPM_BUILD_ROOT" ] || find "$RPM_BUILD_ROOT" -name '*.pyc' | while read a; do \
+       b="$(echo $a|sed -e 's/.pyc$/.pyo/')"; \
+       if cmp -s "$a" "$b"; then \
+               ln -f "$a" "$b"; \
+       fi; \
+done \
+} }
+
+# remove python sources, so that check-files won't complain                                                                
+# (idea by glen <at> pld-linux <dot> org)
+%py_postclean() \
+for d in %{py_sitescriptdir} %{py_sitedir}; do \
+ [ ! -d "$RPM_BUILD_ROOT$d" ] || find "$RPM_BUILD_ROOT$d" -name '*.py' -exec rm {} \; ;\
+done \
+%{nil}
 
 # depmod macro
 %depmod() { \
This page took 0.034592 seconds and 4 git commands to generate.