chiark / gitweb /
Add PhotoView srclib
authorDaniel Martí <mvdan@mvdan.cc>
Tue, 14 May 2013 21:06:06 +0000 (23:06 +0200)
committerDaniel Martí <mvdan@mvdan.cc>
Tue, 14 May 2013 21:06:06 +0000 (23:06 +0200)
fdroidserver/common.py

index 8791842b5faa9b618fa6c52694d288f87ad795fa..15cebd53a0ede70a38849113c4b9d50d842ac1e0 100644 (file)
@@ -1847,6 +1847,20 @@ def getsrclib(spec, extlib_dir, sdk_path, basepath=False):
             raise BuildException('Error updating Common-AskSven project')
         return sdir
 
+    if name == 'PhotoView':
+        sdir = os.path.join(extlib_dir, 'PhotoView')
+        vcs = getvcs('git',
+       'https://github.com/chrisbanes/PhotoView', sdir, sdk_path)
+        vcs.gotorevision(ref)
+        libdir = os.path.join(sdir, 'library')
+        if subprocess.call([os.path.join(sdk_path, 'tools', 'android'),
+            'update', 'project', '-p',
+            libdir]) != 0:
+            raise BuildException('Error updating Common-AskSven project')
+        if basepath:
+            return sdir
+        return libdir
+
     raise BuildException('Unknown srclib ' + name)