summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD39
1 files changed, 39 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..9d3795ffb8d
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,39 @@
+# Maintainer: Marc Plano-Lesay <kernald@enoent.fr>
+# Contributor: Muflone
+
+_apilevel=28
+_arch=x86
+pkgname=android-google-apis-${_arch/_/-}-system-image-${_apilevel}
+pkgver=r12
+pkgrel=1
+pkgdesc="Android with Google APIs ${_arch} Atom System Image, API-${_apilevel}"
+arch=('any')
+url='https://software.intel.com/en-us/android/tools'
+license=('custom')
+provides=("${pkgname}")
+conflicts=("${pkgname}")
+options=('!strip')
+source=("https://dl-ssl.google.com/android/repository/sys-img/google_apis/${_arch}-${_apilevel}_${pkgver}.zip"
+ "package.xml")
+sha256sums=('5c5473ca8f214425106fa957e6648068ad949e7cadce3cc0e16549721bfdad3b'
+ 'd237c1b3d87ea2919eac23c897043c0fa907cb5cc5881364eb775188a9f87248')
+
+prepare() {
+ # Fix permissions
+ cd "${_arch}"
+ find . -type f -print0 | xargs --null chmod -R u=rw,go=r
+ find . -type d -print0 | xargs --null chmod -R u=rwx,go=rx
+}
+
+package() {
+ # Run dependencies
+ depends=("android-platform-${_apilevel}")
+ optdepends=('qemu' 'libvirt')
+ # Install files
+ install -d -m 755 "${pkgdir}/opt/android-sdk/system-images/android-${_apilevel}/google_apis"
+ cp -r "${_arch}" "${pkgdir}/opt/android-sdk/system-images/android-${_apilevel}/google_apis/"
+ # Install license
+ install -D -m 644 "package.xml" "${pkgdir}/usr/share/licenses/${pkgname}/package.xml"
+ ln -s "/usr/share/licenses/${pkgname}/package.xml" \
+ "${pkgdir}/opt/android-sdk/system-images/android-${_apilevel}/google_apis/${_arch}/"
+}