Build Version:1.09.03,10903,45,subdir=Timeriffic,oldsdkloc=yes
-==Use Built==
-
-Set this to "Yes" to use built versions of the application for the repository.
-Currently, this just triggers update.py to copy the relevant apks and tarballs
-from the 'built' directory before updating the repo index.
-
==AntiFeatures==
This is optional - if present, it contains a comma-separated list of any of
# -*- coding: utf-8 -*-
#
# build.py - part of the FDroid server tools
-# Copyright (C) 2010, Ciaran Gultnieks, ciaran@ciarang.com
+# Copyright (C) 2010-11, Ciaran Gultnieks, ciaran@ciarang.com
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
help="Spew out even more information than normal")
parser.add_option("-p", "--package", default=None,
help="Build only the specified package")
-parser.add_option("-c", "--clean", action="store_true", default=False,
- help="Clean mode - build everything from scratch")
(options, args) = parser.parse_args()
# Get all apps...
apps = common.read_metadata(options.verbose)
-#Clear and/or create the 'built' directory, depending on mode:
-built_dir = 'built'
-if options.clean:
- if os.path.exists(built_dir):
- shutil.rmtree(built_dir)
-if not os.path.exists(built_dir):
- os.mkdir(built_dir)
+output_dir = "repo"
+tmp_dir = "tmp"
+if not os.path.isdir('tmp'):
+ os.makedirs('tmp')
if not os.path.isdir('build'):
os.makedirs('build')
for thisbuild in app['builds']:
- dest = os.path.join(built_dir, app['id'] + '_' +
+ dest = os.path.join(output_dir, app['id'] + '_' +
thisbuild['vercode'] + '.apk')
- dest_unsigned = dest + "_unsigned"
+ dest_unsigned = os.path.join(tmp_dir, app['id'] + '_' +
+ thisbuild['vercode'] + '_unsigned.apk')
if os.path.exists(dest):
print "..version " + thisbuild['version'] + " already exists"
# Build the source tarball right before we build the release...
tarname = app['id'] + '_' + thisbuild['vercode'] + '_src'
- tarball = tarfile.open(os.path.join(built_dir,
+ tarball = tarfile.open(os.path.join(output_dir,
tarname + '.tar.gz'), "w:gz")
tarball.add(build_dir, tarname)
tarball.close()
print "Unexpected version/version code in output"
sys.exit(1)
- # Copy the unsigned apk to our 'built' directory for further
+ # Copy the unsigned apk to our temp directory for further
# processing...
shutil.copyfile(src, dest_unsigned)
thisinfo['repotype'] = ''
thisinfo['repo'] = ''
thisinfo['builds'] = []
- thisinfo['usebuilt'] = False
thisinfo['requiresroot'] = False
mode = 0
buildline = []
thisinfo['donate'] = value
elif field == 'Disabled':
thisinfo['disabled'] = value
+ elif field == 'Use Built':
+ pass #Ignoring this - will be removed
elif field == 'AntiFeatures':
parts = value.split(",")
for part in parts:
buildline = [value[:-1]]
else:
thisinfo['builds'].append(parse_buildline(value))
- elif field == "Use Built":
- if value == "Yes":
- thisinfo['usebuilt'] = True
elif field == "Requires Root":
if value == "Yes":
thisinfo['requiresroot'] = True
# Get all apps...
apps = common.read_metadata(verbose=options.verbose)
-# Copy apks and source tarballs for stuff we've built from source that
-# is flagged to be included in the repo...
-for app in apps:
- if app['usebuilt']:
- if not options.quiet:
- print "Copying built files for " + app['id']
- src = os.path.join('built', app['id'] + "_*")
- for file in glob.glob(src):
- shutil.copy(file, 'repo/')
-
# Gather information about all the apk files in the repo directory...
apks = []
for apkfile in glob.glob(os.path.join('repo','*.apk')):
# Output a message of harassment if we don't have the market version:
if not gotmarketver and app['marketvercode'] != '0':
- if app['usebuilt']:
- addr = app['source']
- else:
- addr = app['web']
+ addr = app['source']
print "WARNING: Don't have market version (" + app['marketversion'] + ") of " + app['name']
print " (" + app['id'] + ") " + addr
warnings += 1