diff options
author | Kevin MacMartin | 2015-06-10 00:37:46 -0400 |
---|---|---|
committer | Kevin MacMartin | 2015-06-10 00:37:46 -0400 |
commit | dee294633f71e14c0e718f3f826eb3f667b02150 (patch) | |
tree | 63b0f792a47640272f0a0f1214ff4d796dbedadf | |
download | aur-dee294633f71e14c0e718f3f826eb3f667b02150.tar.gz |
Initial import into AUR 4
-rw-r--r-- | .SRCINFO | 22 | ||||
-rw-r--r-- | PKGBUILD | 64 |
2 files changed, 86 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..ae4b9b87b00e --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,22 @@ +pkgbase = archon + pkgdesc = Execute Android APKs + pkgver = 1.2 + pkgrel = 8 + url = https://bitbucket.org/vladikoff/archon + arch = i686 + arch = x86_64 + arch = armv7h + license = Apache + license = custom + makedepends = git + makedepends = openssl + depends = chromium + optdepends = archon-exec: wrapper script for launching android apk files + optdepends = chromeos-apk: extract and convert android apks into archon apks + optdepends = google-chrome: run the archon extension the same as chromium + options = !strip + source = git+https://bitbucket.org/vladikoff/archon.git#tag=v1.2- + sha512sums = SKIP + +pkgname = archon + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..abe0dfc0896d --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,64 @@ +# Maintainer: Kevin MacMartin <prurigro at gmail dot com> +# Contributor: PedroHCL (https://github.com/PedroHLC) + +pkgname=archon +pkgver=1.2 +pkgrel=8 +pkgdesc="Execute Android APKs" +arch=('i686' 'x86_64' 'armv7h') +url="https://bitbucket.org/vladikoff/archon" +license=('Apache' 'custom') +options=('!strip') +depends=('chromium') +makedepends=('git' 'openssl') +optdepends=('archon-exec: wrapper script for launching android apk files' + 'chromeos-apk: extract and convert android apks into archon apks' + 'google-chrome: run the archon extension the same as chromium') + +_installpath="/opt/$pkgname" +_extension_paths=('/usr/share/chromium/extensions' '/usr/share/google-chrome/extensions') +case $CARCH in + i686) _tag="x86_32" ;; + armv7h) _tag="ARM" ;; + x86_64) _tag="$CARCH" + pkgver=2.1.0 ;; +esac +_tag="v${pkgver}-${_tag}" + +source=("git+${url}.git#tag=${_tag}") +sha512sums=('SKIP') + +prepare() { + # Increase the application font size by 1.2 times (the default is a bit too small) + sed -i 's|window\.devicePixelRatio|1\.2\*window\.devicePixelRatio|' $pkgname/gen_{index,main}.min.js +} + +build() { + # Generate the extension + chromium --pack-extension=$pkgname + + # Write the plugin metadata file + echo '{"external_crx": "'"$_installpath/$pkgname"'.crx", "external_version": "'"$(egrep '^\s*"version"' $pkgname/manifest.json | sed 's|^\s*"version": "||;s|",$||')"'"}' \ + > pluginid.json +} + +package() { + # Install the ARChon license files + install -Dm644 $pkgname/NOTICE.{html,txt} -t "$pkgdir"/usr/share/licenses/$pkgname + + # Install the ARChon extension + install -Dm755 ${pkgname}.crx "$pkgdir$_installpath"/${pkgname}.crx + + # Install the ARChon app files + cp -r --no-preserve=ownership $pkgname/* "$pkgdir$_installpath"/ + + # Generate the filename for the plugin metadata file using its extension id + _extension_file="$(openssl rsa -pubout -outform DER < ${pkgname}.pem \ + | sha256sum \ + | head -c32 \ + | tr 0-9a-f a-p).json" + # Install the plugin metadata file to each extension folder + for _path in ${_extension_paths[@]}; do + install -Dm644 pluginid.json "$pkgdir$_path"/$_extension_file + done +} |