# Maintainer: Eric Bélanger <eric@archlinux.org>

pkgname=freeciv
pkgver=2.6.5
pkgrel=1
pkgdesc="A multiuser clone of the famous Microprose game of Civilization"
arch=('x86_64')
url="http://www.freeciv.org/"
license=('GPL')
depends=('gtk3' 'sdl_mixer' 'lua53' 'sqlite' 'curl')
makedepends=('python')
backup=('etc/freeciv/database.lua')
source=(https://downloads.sourceforge.net/sourceforge/${pkgname}/${pkgname}-${pkgver}.tar.bz2)
sha1sums=('739a8fa5abb8a9d548572b09c20cb63c00abc88f')

build() {
  cd ${pkgname}-${pkgver}
  ./configure --prefix=/usr --sysconfdir=/etc --enable-shared --enable-sys-lua \
    --enable-client=gtk3 --enable-fcmp=gtk3 --enable-fcdb=sqlite3 --enable-aimodules
  make
}

package() {
  cd ${pkgname}-${pkgver}
  make DESTDIR="${pkgdir}" install
}
