- tmp change create-package-initial.
authorronan <ronan@fridu.net>
Fri, 15 Feb 2013 12:21:06 +0000 (13:21 +0100)
committerronan <ronan@fridu.net>
Fri, 15 Feb 2013 12:21:06 +0000 (13:21 +0100)
Tizen_TZ_package/create-package-initial.py

index 25cbb24..95fbb42 100755 (executable)
@@ -498,86 +498,84 @@ def createRecipes(package_name,
                for p in packagesDico.keys():
                        ProvidesList.extend(packagesDico[p])
 
-               f.write("\n" )
-                               
                f.write( "%s:::: %s \n" % (package_name," ".join(ProvidesList) ))
 
-       with open(os.path.join(packageRecipesDir,baseFile),"w" ) as f:
-               f.write("DESCRIPTION = \"%s\"\n" % DESCRIPTION)
-               f.write("HOMEPAGE = \"%s\"\n" % HOMEPAGE)
-               f.write("SECTION = \"%s\"\n" % SECTION)
-               f.write("PRIORITY = \"%s\"\n" % PRIORITY)
-               f.write("LICENSE = \"%s\"\n" % LICENSE)
-               f.write("\n" )
-               
-               f.write("PROVIDES = \"\"\n" )
-               for kp in providesDico.keys():
-                       if len(providesDico[kp]) > 0:
-                               f.write("#PROVIDES by %s \n" % kp)
-                       for p in providesDico[kp]:
-                               if len(p)==1:
-                                       f.write("PROVIDES += \"%s\"\n" % (p[0]))
-                                       f.write("RPROVIDES_%s += \"%s\"\n" % (kp,p[0]))
-                               else:
-                                       f.write("# the PROVIDES rules is ignore \"%s %s %s\"\n" % (p[0],p[1],p[2]))
-                                       f.write("PROVIDES += \"%s\"\n" % (p[0]))
-                                       f.write("RPROVIDES_%s += \"%s\"\n" % (kp,p[0]))
-                       if len(providesDico[kp]) > 0:
-                               f.write("\n")
-               f.write("\n" )
+#      with open(os.path.join(packageRecipesDir,baseFile),"w" ) as f:
+#              f.write("DESCRIPTION = \"%s\"\n" % DESCRIPTION)
+#              f.write("HOMEPAGE = \"%s\"\n" % HOMEPAGE)
+#              f.write("SECTION = \"%s\"\n" % SECTION)
+#              f.write("PRIORITY = \"%s\"\n" % PRIORITY)
+#              f.write("LICENSE = \"%s\"\n" % LICENSE)
+#              f.write("\n" )
+#              
+#              f.write("PROVIDES = \"\"\n" )
+#              for kp in providesDico.keys():
+#                      if len(providesDico[kp]) > 0:
+#                              f.write("#PROVIDES by %s \n" % kp)
+#                      for p in providesDico[kp]:
+#                              if len(p)==1:
+#                                      f.write("PROVIDES += \"%s\"\n" % (p[0]))
+#                                      f.write("RPROVIDES_%s += \"%s\"\n" % (kp,p[0]))
+#                              else:
+#                                      f.write("# the PROVIDES rules is ignore \"%s %s %s\"\n" % (p[0],p[1],p[2]))
+#                                      f.write("PROVIDES += \"%s\"\n" % (p[0]))
+#                                      f.write("RPROVIDES_%s += \"%s\"\n" % (kp,p[0]))
+#                      if len(providesDico[kp]) > 0:
+#                              f.write("\n")
+#              f.write("\n" )
                
 #              f.write("RPROVIDES = \"\"\n" )
 #              for p in rprovidesList:
 #                      f.write("RPROVIDES += \"%s\"\n" % p)
 #              f.write("\n" )
                
-               f.write("RDEPENDS = \"\"\n" )
-               for kp in rdependsDico.keys():
-                       if len(rdependsDico[kp]) > 0:
-                               f.write("#RDEPENDS of %s \n" % kp)
-                               
-                       for p in rdependsDico[kp]:
-                               if len(p)==1:
-                                       f.write("RDEPENDS_%s += \"%s\"\n" % (kp,p[0]))
-                               else:
-                                       f.write("# the RDEPENDS rules is ignore \"%s %s %s\"\n" % (p[0],p[1],p[2]))
-                                       f.write("RDEPENDS_%s += \"%s\"\n" % (kp,p[0]))
-                                       
-                       if len(rdependsDico[kp]) > 0:
-                               f.write("\n")
-               f.write("\n" )
-               
-               f.write("PACKAGES = \"\"\n" )
-               for p in packagesDico.keys():
-                       f.write("PACKAGES += \"%s\"\n" % p)
-               f.write("\n" )
-               
-               for p in packagesDico.keys():
-                       f.write("%sfiles = \"%s\"\n" % (p," ".join(packagesDico[p]) ) )
-                       f.write("\n" )
-               
-               for p in packagesDico.keys():
-                       f.write("FILES_%s = \"${%sfiles}\"\n" % (p,p) ) 
-               f.write("\n" )
-               
-               f.write("SPECFILES = \"packaging/%s\"\n" % os.path.basename( package_spec_path) )
-               f.write("\n" )
-               
-               f.write("BBCLASSEXTEND =+ \"native\"\n" )
-               f.write("\n" )
-
-               f.write("require recipes-BaseSystem/tizenBuildUtils/tizenBuildUtils.inc\n\n")
-               f.write("require "+baseDependsFile+"\n")
-               f.write("require "+exctraConfFile+"\n")
-               
-               
-       with open(os.path.join(packageRecipesDir,gitFile),"w" ) as f:
-               f.write("require %s\n" % baseFile)
-               f.write("\n" )
-               f.write("S = \"${WORKDIR}/git\"\n")
-               f.write("\n" )
-               f.write("SRC_URI = %s\n" % package_git_command)
-               
+#              f.write("RDEPENDS = \"\"\n" )
+#              for kp in rdependsDico.keys():
+#                      if len(rdependsDico[kp]) > 0:
+#                              f.write("#RDEPENDS of %s \n" % kp)
+#                              
+#                      for p in rdependsDico[kp]:
+#                              if len(p)==1:
+#                                      f.write("RDEPENDS_%s += \"%s\"\n" % (kp,p[0]))
+#                              else:
+#                                      f.write("# the RDEPENDS rules is ignore \"%s %s %s\"\n" % (p[0],p[1],p[2]))
+#                                      f.write("RDEPENDS_%s += \"%s\"\n" % (kp,p[0]))
+#                                      
+#                      if len(rdependsDico[kp]) > 0:
+#                              f.write("\n")
+#              f.write("\n" )
+#              
+#              f.write("PACKAGES = \"\"\n" )
+#              for p in packagesDico.keys():
+#                      f.write("PACKAGES += \"%s\"\n" % p)
+#              f.write("\n" )
+#              
+#              for p in packagesDico.keys():
+#                      f.write("%sfiles = \"%s\"\n" % (p," ".join(packagesDico[p]) ) )
+#                      f.write("\n" )
+#              
+#              for p in packagesDico.keys():
+#                      f.write("FILES_%s = \"${%sfiles}\"\n" % (p,p) ) 
+#              f.write("\n" )
+#              
+#              f.write("SPECFILES = \"packaging/%s\"\n" % os.path.basename( package_spec_path) )
+#              f.write("\n" )
+#              
+#              f.write("BBCLASSEXTEND =+ \"native\"\n" )
+#              f.write("\n" )
+#
+#              f.write("require recipes-BaseSystem/tizenBuildUtils/tizenBuildUtils.inc\n\n")
+#              f.write("require "+baseDependsFile+"\n")
+#              f.write("require "+exctraConfFile+"\n")
+#              
+#              
+#      with open(os.path.join(packageRecipesDir,gitFile),"w" ) as f:
+#              f.write("require %s\n" % baseFile)
+#              f.write("\n" )
+#              f.write("S = \"${WORKDIR}/git\"\n")
+#              f.write("\n" )
+#              f.write("SRC_URI = %s\n" % package_git_command)
+#              
                
 def createDepends(package_name,
                                  package_git_command,
@@ -627,7 +625,12 @@ def createDepends(package_name,
                                if res is None:
                                        print "No direct provider for package %s : %s" % (package_name,pp)
                                        res=pp
-                               f.write("DEPENDS += \"%s\"\n" % res)
+                                       
+                               if pp == "gettext":
+                                       f.write("DEPENDS += \"%s\"\n" % res)
+                               else:
+                                       f.write("#Replace \"DEPENDS\" on gettext by \"inherit gettext\"\n" )
+                                       f.write("inherit gettext\n" )
                
                
 def createPackages():
@@ -643,7 +646,7 @@ def createPackages():
                specFileDir=os.path.join(recipesSourceDir,recipeDir,"specfile-initial")
                packageConfig=os.path.join(recipesSourceDir,recipeDir,"package-config-initial")
                
-               recipesDirDest=os.path.join("/home/ronanguirec/Documents/yocto/openembedded-core-gen-tizen/meta-tizen",recipeDir)
+               recipesDirDest=os.path.join("/home/ronanguirec/Documents/yoctoTest/yoctoTizen/meta-tizen",recipeDir)
                
                packageList=listPackage(specFileDir, packageConfig)
                
@@ -666,7 +669,7 @@ def createPackagesDepends():
                specFileDir=os.path.join(recipesSourceDir,recipeDir,"specfile-initial")
                packageConfig=os.path.join(recipesSourceDir,recipeDir,"package-config-initial")
                
-               recipesDirDest=os.path.join("/home/ronanguirec/Documents/yocto/openembedded-core-gen-tizen/meta-tizen",recipeDir)
+               recipesDirDest=os.path.join("/home/ronanguirec/Documents/yoctoTest/yoctoTizen/meta-tizen",recipeDir)
                
                packageList=listPackage(specFileDir, packageConfig)