# Tanım: Google Android SDK için platform-araçları (adb ve fastboot)
# URL: http://developer.android.com/sdk/index.html
# Paketçi: CihanAlkan
# Gerekler: ncurses zlib
# Grup: geliştirme

isim=android-sdk-platform-tools
surum=r26.0.0
devir=1
kaynak=(https://dl-ssl.google.com/android/repository/platform-tools_$surum-linux.zip
        license.html
        source.properties)

derle() {
  install -Dm644 $SRC/license.html usr/share/licenses/$isim/license.html
  cd $PKG
  mkdir -p opt etc/profile.d
  echo 'export PATH=$PATH:/opt/android-sdk/platform-tools' > "etc/profile.d/$isim.sh"
  echo 'setenv PATH ${PATH}:/opt/android-sdk/platform-tools' > "etc/profile.d/$isim.csh"
  chmod 755 etc/profile.d/$isim.{csh,sh}
  mkdir -p opt/android-sdk
  cp -a $SRC/platform-tools $PKG/opt/android-sdk/platform-tools
  install -m644 $SRC/source.properties $PKG/opt/android-sdk/platform-tools/source.properties
  chmod +Xr -R $PKG/opt/android-sdk/platform-tools
mkdir $PKG/usr
mkdir $PKG/usr/bin
  ln -s /opt/android-sdk/platform-tools/adb $PKG/usr/bin/
  ln -s /opt/android-sdk/platform-tools/fastboot $PKG/usr/bin/
}
