command += " --target='%s' " % self.__cpu
# command += " --define='_target_cpu %s' " % self.__cpu
+
# command += " --define='RPM_OPT_FLAGS %s' " % "-O2 -g2 -feliminate-unused-debug-types -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=32 -Wformat -Wformat-security -fmessage-length=0 -m64 -march=corei7 -msse4.2 -mtune=corei7-avx -mfpmath=sse -fasynchronous-unwind-tables -fno-omit-frame-pointer -fipa-cp-clone"
# command += " --define='configure #configure' "
pkgName=os.path.basename(tmp_package_spec_path)[:-5]
+
if pkgName in [ "cantarell-fonts","monotype-fonts","libkate","google-droid-fonts","texinfo"]:
command += " --define='_bindir /usr/bin'"
command += " --define='%%_configure %s'" % oe_runconf2
+
+ patternUrlSourceFile = r'Source[\d]*[\s]*:[\s]*(http.*/)(.*)'
+
+ with open(tmp_package_spec_path,'r') as currentSpecFile:
+ currentSpecString=currentSpecFile.read()
+
+ resUrlSourceFile=re.findall(patternUrlSourceFile,currentSpecString)
+
+ if len(resUrlSourceFile)>0:
+ for r in resUrlSourceFile:
+ print "r",r
+ currentSpecString=currentSpecString.replace(r[0]+r[1],r[1])
+
+ with tempfile.NamedTemporaryFile(mode='w',
+ suffix='tmp',
+ prefix=os.path.basename(tmp_package_spec_path),
+ delete=False) as tmpSpecFile:
+ tmpSpecFile.write(currentSpecString)
+ tmp_package_spec_path=tmpSpecFile.name
+
+
+
+
if self.__packagePN == "dbus-initial":
with open(tmp_package_spec_path,'r') as currentSpecFile:
currentSpecString=currentSpecFile.read()
command += " --define='%s #%s' " % (p,p)
command += " --parse %s " % tmp_package_spec_path
-# print "command :",command
+ print "command :",command
if not os.path.isdir(os.path.join("/tmp","parsed_spec")):
os.mkdir(os.path.join("/tmp","parsed_spec"))