# $Id: PKGBUILD 133990 2015-05-23 02:34:39Z dwallace $
# Maintainer: Daniel Wallace <danielwallace at gtmanfred dot com>
# Contributor: K900 <k0009000@gmail.com>
pkgname=steam
pkgver=1.0.0.50
pkgrel=1
pkgdesc="Digital distribution client bootstrap package"
arch=("i686" "x86_64")
url="http://steampowered.com/"
license=('custom')
install=steam.install
source=("http://repo.steampowered.com/$pkgname/pool/$pkgname/s/$pkgname/${pkgname}_$pkgver.tar.gz"
        'alsa_sdl_audiodriver.patch')
md5sums=('2fab57a606705012a4f800a28670dc3a'
         'ac0e03d70f1101331598b2b32ed9bac3')
if [[ "$CARCH" == "x86_64" ]]; then
  #depends+=(lib32-libgl lib32-mesa-libgl lib32-gcc-libs lib32-libx11)
  optdepends=(
  'lib32-mesa-dri: for open source driver users'
  'lib32-catalyst-utils: for AMD Catalyst users'
  'lib32-nvidia-utils: for NVIDIA proprietary blob users'
  'lib32-alsa-plugins: for pulseaudio on some games'
  )
prepare() {
    patch -d "$pkgname" -Np1 -i "$srcdir/alsa_sdl_audiodriver.patch"
}
else
prepare() {
    patch -d "$pkgname" -Np1 -i "$srcdir/alsa_sdl_audiodriver.patch"
}
fi

package() {
    depends=(
      'bash' 'desktop-file-utils' 'hicolor-icon-theme' 'curl'
      'dbus' 'freetype2'  'gdk-pixbuf2' 'ttf-font' 'zenity'
      )
  if [[ "$CARCH" == x86_64 ]]; then
    depends+=(lib32-libgl lib32-gcc-libs lib32-libx11)
  fi

  # Install license
  make -C "$pkgname" DESTDIR="$pkgdir" install
  
  install -Dm644 "$pkgdir/usr/share/doc/steam/steam_install_agreement.txt" "$pkgdir/usr/share/licenses/steam/LICENSE"

  # blank steamdeps because apt-get
  ln -sf /bin/true "$pkgdir/usr/bin/steamdeps"
}
#vim: set ft=PKGBUILD sw=2 ts=2 et
