summaryrefslogtreecommitdiff
path: root/pcr-testing/android-sdk-meta/PKGBUILD
blob: 1aa05d79c57f3f4e9cd3261c6d20dc0620aa4e95 (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
# Maintainer: David P. <megver83@parabola.nu>

pkgbase=android-sdk-meta
pkgname=(android-sdk android-sdk-build-tools android-sdk-platform-tools)
_debver=25.0.0
pkgver=$_debver
_debrel=8
pkgrel=1
arch=(any)
url="https://developer.android.com/studio/releases/sdk-tools.html"
license=('APACHE')
source=("https://debian.simnet.is/debian/pool/main/a/${pkgbase}/${pkgbase}_${_debver}+${_debrel}.tar.xz")
sha512sums=('fecab0a24f9903c350d169dea5b8ffd03ea27c9ea254e9076d063a720dbd89f79458bb8186a4aacdb76e7f425432aaa2be08cb30df5201418ecabae1135958a5')

package_android-sdk(){
  pkgdesc="Software development kit for Android platform"
  depends=(proguard android-sdk-build-tools android-sdk-platform-tools)

  cd "${pkgbase}-${_debver}+${_debrel}"

  local bins="e2fsck
              fsck.ext4
              mkfs.ext4
              resize2fs
              tune2fs"

  mkdir -p $pkgdir/usr/lib/android-sdk/{tools/proguard/{bin,lib},tools/bin,platform-tools,build-tools,licenses}
  for f in $bins; do
    ln -s /usr/bin/$f $pkgdir/usr/lib/$pkgname/tools/bin/$f
  done
  ln -s /usr/bin/proguard $pkgdir/usr/lib/$pkgname/tools/proguard/bin/proguard
  ln -s /usr/bin/proguardgui $pkgdir/usr/lib/$pkgname/tools/proguard/bin/proguardgui
  ln -s /usr/share/proguard/proguard.jar $pkgdir/usr/lib/$pkgname/tools/proguard/lib/proguard.jar
  ln -s /usr/share/proguard/proguardgui.jar $pkgdir/usr/lib/$pkgname/tools/proguard/lib/proguardgui.jar
  ln -s /usr/share/proguard/retrace.jar $pkgdir/usr/lib/$pkgname/tools/proguard/lib/retrace.jar

  cp -r tools $pkgdir/usr/lib/$pkgname
  cp licenses/apache-2.0 $pkgdir/usr/lib/$pkgname/licenses/apache-2.0

  mkdir -p $pkgdir/usr/share/licenses/$pkgname
  cp debian/copyright $pkgdir/usr/share/licenses/$pkgname/COPYRIGHT
}

package_android-sdk-build-tools(){
  pkgver=24.0.0
  pkgdesc="Tools for building Android applications"

  cd "${pkgbase}-${_debver}+${_debrel}"
  mkdir -p $pkgdir/usr/lib/android-sdk/build-tools
  cp -r build-tools $pkgdir/usr/lib/android-sdk/build-tools/$pkgver

  mkdir -p $pkgdir/usr/share/licenses/$pkgname
  cp debian/copyright $pkgdir/usr/share/licenses/$pkgname/COPYRIGHT
}

package_android-sdk-platform-tools(){
  pkgver=24.0.0
  pkgdesc="Tools for interacting with an Android platform"
  depends=(sqlite3 android-tools android-sdk-platform-tools android-udev)

  cd "${pkgbase}-${_debver}+${_debrel}"
  mkdir -p $pkgdir/usr/lib/android-sdk
  cp -r platform-tools $pkgdir/usr/lib/android-sdk
  ln -s /usr/bin/sqlite3 $pkgdir/usr/lib/android-sdk/platform-tools/sqlite3

  mkdir -p $pkgdir/usr/share/licenses/$pkgname
  cp debian/copyright $pkgdir/usr/share/licenses/$pkgname/COPYRIGHT
}