Skip to content

Instantly share code, notes, and snippets.

@FrozenCow
Created May 1, 2015 13:03
Show Gist options
  • Save FrozenCow/9f8455accfc6b83ea743 to your computer and use it in GitHub Desktop.
Save FrozenCow/9f8455accfc6b83ea743 to your computer and use it in GitHub Desktop.
PKGBUILD for Android Studio 1.2.0.12
# Maintainer: danyf90 <[email protected]>
# Contributor: Philipp 'TamCore' B. <philipp [at] tamcore [dot] eu>
# Contributor: Jakub Schmidtke <sjakub-at-gmail-dot-com>
# Contributor: Christoph Brill <egore911-at-gmail-dot-com>
# Contributor: Lubomir 'Kuci' Kucera <kuci24-at-gmail-dot-com>
pkgname=android-studio
pkgver=1.2.0.12
pkgrel=1
_build=141.1890965
pkgdesc="A new Android development environment based on IntelliJ IDEA."
arch=('i686' 'x86_64')
url="http://developer.android.com/sdk/installing/studio.html"
license=('APACHE')
depends=('java-environment' 'python' 'ttf-font')
makedepends=('unzip')
optdepends=('android-sdk' 'android-sdk-platform-tools' 'android-sdk-build-tools')
conflicts=('android-studio-beta' 'android-studio-dev' 'android-studio-canary')
options=('!strip')
install=$pkgname.install
source=("https://dl.google.com/dl/android/studio/ide-zips/$pkgver/android-studio-ide-$_build-linux.zip"
"$pkgname.desktop")
sha512sums=('bed422287003072ea4d65c05724fce22d3e847d5d292d2fa53cf799e344c2638d721e1e0c1c2b1444e1a52931e96f83499c5f9c6fb64e79aacbbf03dd1c10b61'
'fa3567f328af45d265c4fabf3e41b55d8e8cccfa9675e745f07dd6ae41950dd53a2ef41ef1caee86643f5c2ddf7a7681ee17155e208a7b6fdae6c0537dfc0c94')
if [[ $CARCH == "x86_64" ]]; then
depends+=('lib32-fontconfig' 'lib32-libxrender' 'lib32-mesa')
else
depends+=('fontconfig' 'libxrender' 'mesa')
fi
prepare() {
cd $srcdir/$pkgname
# extract the application icon
unzip -qo lib/resources.jar artwork/icon_AS_128.png
# enable anti aliasing
echo "-Dswing.aatext=true" >> studio.vmoptions
echo "-Dswing.aatext=true" >> studio64.vmoptions
}
package() {
cd $srcdir/$pkgname
# application stuff
install -d $pkgdir/{opt/$pkgname,usr/bin}
cp -a bin lib plugins $pkgdir/opt/$pkgname
ln -s /opt/android-studio/bin/studio.sh $pkgdir/usr/bin/android-studio
# starter stuff
install -Dm644 artwork/icon_AS_128.png $pkgdir/usr/share/pixmaps/$pkgname.png
install -Dm644 $srcdir/$pkgname.desktop $pkgdir/usr/share/applications/$pkgname.desktop
chmod -R ugo+rX $pkgdir/opt
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment