mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-16 07:52:35 +03:00
Away with all the funambol ugly tweaks
This commit is contained in:
parent
c234945f75
commit
a0e7409148
2 changed files with 1 additions and 85 deletions
|
@ -1590,85 +1590,6 @@ def prepare_source(vcs, app, build, build_dir, srclib_dir, extlib_dir, sdk_path,
|
|||
}
|
||||
""")
|
||||
|
||||
# Special case init functions for funambol...
|
||||
if build.get('initfun', 'no') == "yes":
|
||||
|
||||
if subprocess.call(['sed','-i','s@' +
|
||||
'<taskdef resource="net/sf/antcontrib/antcontrib.properties" />' +
|
||||
'@' +
|
||||
'<taskdef resource="net/sf/antcontrib/antcontrib.properties">' +
|
||||
'<classpath>' +
|
||||
'<pathelement location="/usr/share/java/ant-contrib.jar"/>' +
|
||||
'</classpath>' +
|
||||
'</taskdef>' +
|
||||
'@g',
|
||||
'build.xml'], cwd=root_dir) !=0:
|
||||
raise BuildException("Failed to amend build.xml")
|
||||
|
||||
if subprocess.call(['sed','-i','s@' +
|
||||
'\${user.home}/funambol/build/android/build.properties' +
|
||||
'@' +
|
||||
'build.properties' +
|
||||
'@g',
|
||||
'build.xml'], cwd=root_dir) !=0:
|
||||
raise BuildException("Failed to amend build.xml")
|
||||
|
||||
buildxml = os.path.join(root_dir, 'build.xml')
|
||||
f = open(buildxml, 'r')
|
||||
xml = f.read()
|
||||
f.close()
|
||||
xmlout = ""
|
||||
mode = 0
|
||||
for line in xml.splitlines():
|
||||
if mode == 0:
|
||||
if line.find("jarsigner") != -1:
|
||||
mode = 1
|
||||
else:
|
||||
xmlout += line + "\n"
|
||||
else:
|
||||
if line.find("/exec") != -1:
|
||||
mode += 1
|
||||
if mode == 3:
|
||||
mode =0
|
||||
f = open(buildxml, 'w')
|
||||
f.write(xmlout)
|
||||
f.close()
|
||||
|
||||
if subprocess.call(['sed','-i','s@' +
|
||||
'platforms/android-2.0' +
|
||||
'@' +
|
||||
'platforms/android-8' +
|
||||
'@g',
|
||||
'build.xml'], cwd=root_dir) !=0:
|
||||
raise BuildException("Failed to amend build.xml")
|
||||
|
||||
shutil.copyfile(
|
||||
os.path.join(root_dir, "build.properties.example"),
|
||||
os.path.join(root_dir, "build.properties"))
|
||||
|
||||
if subprocess.call(['sed','-i','s@' +
|
||||
'javacchome=.*'+
|
||||
'@' +
|
||||
'javacchome=' + javacc_path +
|
||||
'@g',
|
||||
'build.properties'], cwd=root_dir) !=0:
|
||||
raise BuildException("Failed to amend build.properties")
|
||||
|
||||
if subprocess.call(['sed','-i','s@' +
|
||||
'sdk-folder=.*'+
|
||||
'@' +
|
||||
'sdk-folder=' + sdk_path +
|
||||
'@g',
|
||||
'build.properties'], cwd=root_dir) !=0:
|
||||
raise BuildException("Failed to amend build.properties")
|
||||
|
||||
if subprocess.call(['sed','-i','s@' +
|
||||
'android.sdk.version.*'+
|
||||
'@' +
|
||||
'android.sdk.version=2.0' +
|
||||
'@g',
|
||||
'build.properties'], cwd=root_dir) !=0:
|
||||
raise BuildException("Failed to amend build.properties")
|
||||
|
||||
return (root_dir, srclibpaths)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue