summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorRonan Le Martret <ronan@fridu.net>2014-11-25 16:59:54 +0100
committerRonan Le Martret <ronan@fridu.net>2014-11-25 16:59:54 +0100
commit60c08405cd97c3a7989285f5e44ae0433320b05f (patch)
treea3d05c18e9eacc4757573bbb547f8622a8c1c9d6 /tools
parent4daf79cbf49feda45b41b8dbdb4dae7a67b42b1f (diff)
downloadtizen-60c08405cd97c3a7989285f5e44ae0433320b05f.tar.gz
tizen-60c08405cd97c3a7989285f5e44ae0433320b05f.tar.bz2
tizen-60c08405cd97c3a7989285f5e44ae0433320b05f.zip
update spec2yocto.pyrev_0.5
Change-Id: I22eda92af95a64db35169eabee5fbca19d86bb51 Signed-off-by: Ronan Le Martret <ronan@fridu.net>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/spec2yocto.py25
1 files changed, 13 insertions, 12 deletions
diff --git a/tools/spec2yocto.py b/tools/spec2yocto.py
index 5f52cca0b..2f8303fd7 100755
--- a/tools/spec2yocto.py
+++ b/tools/spec2yocto.py
@@ -904,7 +904,7 @@ class SpecParser:
setup_id = splited_line[i].replace( "-a", "" )
else:
setup_id = splited_line[i + 1]
- res_prep_section += "#extracte source %s \n" % setup_id
+ res_prep_section += "#extracte source %s\n" % setup_id
res_prep_section += "pushd ${S}\n"
source = os.path.basename( pattern_source_dico[setup_id] )
# not a good way to do this
@@ -912,7 +912,7 @@ class SpecParser:
res_prep_section += "cp ${S}/packaging/%s .\n" % source
else:
file_name = os.path.basename( pattern_source_dico[setup_id] )
- res_prep_section += "unp ${S}/packaging/%s \n" % file_name
+ res_prep_section += "tar -zxf ${S}/packaging/%s\n" % file_name
res_prep_section += "popd \n"
elif splited_line[i].startswith( "-b" ):
@@ -920,15 +920,15 @@ class SpecParser:
setup_id = splited_line[i].replace( "-b", "" )
else:
setup_id = splited_line[i + 1]
-
- res_prep_section += "#extracte source %s \n" % ( setup_id )
- res_prep_section += "pushd ${S}/../\n"
- source = os.path.basename( pattern_source_dico[setup_id] )
- if source.endswith( "rpmlintrc" ):
- res_prep_section += "cp ${S}/packaging/%s .\n" % source
- else:
- res_prep_section += "unp ${S}/packaging/%s \n" % source
- res_prep_section += "popd \n"
+ if setup_id != "0":
+ res_prep_section += "#extracte source %s\n" % ( setup_id )
+ res_prep_section += "pushd ${S}/../\n"
+ source = os.path.basename( pattern_source_dico[setup_id] )
+ if source.endswith( "rpmlintrc" ):
+ res_prep_section += "cp ${S}/packaging/%s .\n" % source
+ else:
+ res_prep_section += "tar -zxf ${S}/packaging/%s\n" % source
+ res_prep_section += "popd\n"
res_prep_section += "chmod -Rf a+rX,u+w,g-w,o-w ${S}\n"
@@ -1729,7 +1729,8 @@ class MetaSpec:
'''
code=code.replace("/sbin/ldconfig","[ \"x$D\" == \"x\" ] && ldconfig")
code=code.replace("${prefix}","$D${prefix}")
-
+ code=code.replace("${systemd_unitdir}","$D${systemd_unitdir}")
+ code=code.replace("${sysconfdir}","$D${sysconfdir}")
file_d.write("%s%s() {\n" % (recipe_section, package_name))
file_d.write(" #!/bin/sh -e\n\n")