mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-11-04 14:30:11 +01:00
Away with all the funambol ugly tweaks
This commit is contained in:
parent
c234945f75
commit
a0e7409148
@ -554,12 +554,7 @@ def build_local(app, thisbuild, vcs, build_dir, output_dir, srclib_dir, extlib_d
|
||||
bindir = os.path.join(root_dir, 'target')
|
||||
else:
|
||||
bindir = os.path.join(root_dir, 'bin')
|
||||
if thisbuild.get('initfun', 'no') == "yes":
|
||||
# Special case (again!) for funambol...
|
||||
src = ("funambol-android-sync-client-" +
|
||||
thisbuild['version'] + "-unsigned.apk")
|
||||
src = os.path.join(bindir, src)
|
||||
elif 'maven' in thisbuild:
|
||||
if 'maven' in thisbuild:
|
||||
m = re.match(r".*^\[INFO\] .*apkbuilder.*/([^/]*)\.apk",
|
||||
p.stdout_apk, re.S|re.M)
|
||||
if not m:
|
||||
|
@ -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…
Reference in New Issue
Block a user