# Maintainer: Sven-Hendrik Haase <svenstaro@gmail.com>
# Contributor: DuGi <dugi@irc.pl>

pkgname=springlobby
pkgver=0.271
pkgrel=2
pkgdesc="A free cross-platform lobby client for the Spring RTS project"
arch=('x86_64')
url="http://springlobby.info/"
license=('GPL2')
depends=('hicolor-icon-theme' 'wxgtk3' 'curl' 'libtorrent-rasterbar' 'boost-libs'
         'alure' 'libsm')
optdepends=('sdl' 'sdl_sound' 'sdl_mixer')
makedepends=('boost' 'cmake' 'git' 'ninja')
source=("git+https://github.com/springlobby/springlobby.git#tag=$pkgver"
        "git+https://github.com/spring/pr-downloader.git")
sha512sums=('SKIP'
            'SKIP')

prepare() {
  cd $pkgname

  git submodule init
  git config submodule."src/downloader/lib".url "$srcdir"/pr-downloader
  git submodule update
}

build() {
  cd $pkgname

  cmake \
    -GNinja \
    -Bbuild \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DwxWidgets_CONFIG_EXECUTABLE=/usr/bin/wx-config-gtk3
  ninja -C build
}

package() {
  cd $pkgname

  DESTDIR="$pkgdir" ninja -C build install
}

# vim: sw=2:ts=2 et:
