summaryrefslogtreecommitdiff
path: root/android-studio/PKGBUILD
blob: 3413e8c9c371445c0c01514b12cac7aaa16f8a83 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# Contributor:  danyf90 <daniele.formichelli@gmail.com>
# 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>
# Contributor: Tad Fisher <tadfisher at gmail dot com>
# Contributor: Philippe Hürlimann <p@hurlimann.org>
# Contributor: Julian Raufelder <aur@raufelder.com>
# Contributor: Dhina17 <dhinalogu@gmail.com>
# Contributor: Kordian Bruck <k@bruck.me>
# Maintainer: Erich Eckner <arch at eckner dot net>

pkgname=android-studio
pkgver=2021.1.1.21
pkgrel=36
pkgdesc="The official Android IDE (Stable branch)"
arch=('i686' 'pentium4' 'x86_64')
url="https://developer.android.com/"
license=('APACHE')
_pinned_dependencies_i686=(
  'libnet=1:1.1.6'
)
_pinned_dependencies_pentium4=(
  'libnet=1:1.1.6'
)
_pinned_dependencies=(
  'gcc-libs=12.2.1'
  'glibc>=2.35'
  'libasound.so=2'
  'libbz2.so=1.0'
  'libcrypto.so=3'
  'libcrypt.so=2'
  'libffi.so=8'
  'libfreetype.so=6'
  'libgdbm_compat.so=4'
  'libgdbm.so=6'
  'libgio-2.0.so=0'
  'libglib-2.0.so=0'
  'libgobject-2.0.so=0'
  'libreadline.so=8'
  'libsqlite3.so=0'
  'libx11=1.8.3'
  'libxext=1.3.5'
  'libxi=1.8'
  'libxml2.so=2'
  'libxrender=0.9.11'
  'libxtst=1.2.4'
  'ncurses=6.4'
  'zlib=1:1.2.13'
)
depends=('alsa-lib' 'which' "${_pinned_dependencies[@]}")
depends_i686=("${_pinned_dependencies_i686[@]}")
depends_pentium4=("${_pinned_dependencies_pentium4[@]}")
optdepends=('gtk2: GTK+ look and feel'
            'libgl: emulator support'
            'ncurses5-compat-libs: native debugger support')
options=('!strip')
source=("https://dl.google.com/dl/android/studio/ide-zips/$pkgver/android-studio-$pkgver-linux.tar.gz"
        "$pkgname.desktop"
        "license.html")
sha256sums=('3de3092082df6ae9d3969478115efaa909539590dc5a829eb3ad6a7bd5bda2a4'
            '73cd2dde1d0f99aaba5baad1e2b91c834edd5db3c817f6fb78868d102360d3c4'
            '9a7563f7fb88c9a83df6cee9731660dc73a039ab594747e9e774916275b2e23e')

if [ "$CARCH" = "i686" ] || [ "$CARCH" = 'pentium4' ]; then
    depends+=('java-environment')
fi

package() {
  cd $srcdir/$pkgname

  # Install the application
  install -d $pkgdir/{opt/$pkgname,usr/bin}
  cp -a bin lib jre plugins license LICENSE.txt build.txt product-info.json brokenPlugins.db icons.db $pkgdir/opt/$pkgname
  ln -s /opt/android-studio/bin/studio.sh $pkgdir/usr/bin/$pkgname

  # Copy licenses
  install -Dm644 LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt"
  install -Dm644 $srcdir/license.html "${pkgdir}/usr/share/licenses/${pkgname}/license.html"

  # Add the icon and desktop file
  install -Dm644 bin/studio.png $pkgdir/usr/share/pixmaps/$pkgname.png
  install -Dm644 $srcdir/$pkgname.desktop $pkgdir/usr/share/applications/$pkgname.desktop

  chmod -R ugo+rX $pkgdir/opt
}