SPECS: adapter.awk - handle python egg-infos in filelists
glen
glen at pld-linux.org
Thu Oct 16 10:31:23 CEST 2008
Author: glen Date: Thu Oct 16 08:31:23 2008 GMT
Module: SPECS Tag: HEAD
---- Log message:
- handle python egg-infos in filelists
---- Files affected:
SPECS:
adapter.awk (1.403 -> 1.404)
---- Diffs:
================================================================
Index: SPECS/adapter.awk
diff -u SPECS/adapter.awk:1.403 SPECS/adapter.awk:1.404
--- SPECS/adapter.awk:1.403 Mon Oct 6 08:21:23 2008
+++ SPECS/adapter.awk Thu Oct 16 10:31:18 2008
@@ -95,6 +95,7 @@
"rpm --eval %py_sitescriptdir 2>/dev/null" | getline py_sitescriptdir
"rpm --eval %py_sitedir 2>/dev/null" | getline py_sitedir
"rpm --eval %py_scriptdir 2>/dev/null" | getline py_scriptdir
+ "rpm --eval %py_ver 2>/dev/null" | getline py_ver
"rpm --eval %ruby_archdir" | getline ruby_archdir
"rpm --eval %ruby_ridir" | getline ruby_ridir
@@ -1365,7 +1366,7 @@
}
-function use_files_macros( i, n, t, a)
+function use_files_macros( i, n, t, a, l)
{
use_macros()
@@ -1489,6 +1490,22 @@
# locale dir and no %lang -> bad
if (/%{_datadir}\/locale\/.*\// && !/%(dir|lang)/) {
$(NF + 1) = "# FIXME consider using %find_lang"
+ }
+
+ # python egg-infos
+ if (match($0, "^%{py_sitedir}/.*-[0-9.]+-py"py_ver".egg-info$")) {
+ l = length("%{py_sitedir}/");
+ s = substr($0, l + 1, RLENGTH - l - length("-py"py_ver".egg-info"));
+ if (match(s, "[0-9.]+$")) {
+ s = substr(s, 0, RSTART - 2);
+ print "%if \"%{py_ver}\" > \"2.4\""
+ gsub("%{py_sitedir}/.*.egg-info", "%{py_sitedir}/" s "-*.egg-info");
+ print
+ print "%endif"
+ # yeah, sorry, just can't append to preable anymore
+ print "BuildRequires:\tpython-devel >= 1:2.4"
+ next
+ }
}
# atrpms
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SPECS/adapter.awk?r1=1.403&r2=1.404&f=u
More information about the pld-cvs-commit
mailing list