PKGBUILD 1.96 KB
Newer Older
1 2
# Maintainer: Daniele Cocca <daniele.cocca@gmail.com>

3
pkgname=pokerth
4
_realname=PokerTH
Adrián Chaves (Gallaecio)'s avatar
Adrián Chaves (Gallaecio) committed
5
pkgver=1.1.1
6
pkgrel=10
7
pkgdesc="PokerTH is a Texas Holdem poker game written in C++/Qt."
8
arch=('x86_64')
9
license=('AGPL3' 'custom:Variety of FOSS licenses for data files')
10
depends=('boost-libs' 'curl' 'gnutls' 'libgsasl' 'libircclient' 'qt' 'sdl_mixer' 'tinyxml' 'protobuf')
11
makedepends=('boost')
12
url="http://www.pokerth.net/"
Fabian Kosmale's avatar
Fabian Kosmale committed
13 14 15

source=("http://downloads.sourceforge.net/sourceforge/pokerth/$_realname-$pkgver-src.tar.bz2"
        '0001-Qt-5.5.0-patch-for-qtsingleapplication.patch'
16 17 18
        'pokerth-1.1.1-Qualify-std-ifstream-and-std-ofstream.patch'
        'pokerth-gcc6.patch'
        'pokerth-c++11.patch')
Fabian Kosmale's avatar
Fabian Kosmale committed
19 20
md5sums=('a7f76f95782099f966e5f2b6809f502a'
         'f4ecab0a6435f1b3b0654145b75d6e7c'
21 22 23
         '26b02c7e5c50484485570ace9b63be5b'
         '39070e7d656ae654e54ec9e25f9eea83'
         'ee027e6bd85d245f6f3ae74c68ed91cb')
Fabian Kosmale's avatar
Fabian Kosmale committed
24 25 26 27 28 29 30 31 32

prepare() {
  cd "$srcdir/$_realname-$pkgver-src"

  # https://github.com/pokerth/pokerth/commit/731f5f05f540
  patch -Np1 -i ../0001-Qt-5.5.0-patch-for-qtsingleapplication.patch

  # https://github.com/pokerth/pokerth/commit/69f820bb3
  patch -p1 -i ../pokerth-1.1.1-Qualify-std-ifstream-and-std-ofstream.patch
33 34 35 36
  
  # Fix build with GCC 6
  patch -p1 -i ../pokerth-gcc6.patch
  patch -p1 -i ../pokerth-c++11.patch
Fabian Kosmale's avatar
Fabian Kosmale committed
37
}
38 39

build() {
40 41 42 43
  cd "${srcdir}/${_realname}-${pkgver}-src"

  qmake "${pkgname}.pro"
  make
44 45 46
}

package() {
47 48
  cd "${srcdir}/${_realname}-${pkgver}-src"

Francesco Marinucci's avatar
Francesco Marinucci committed
49
  make INSTALL_ROOT="$pkgdir" install
50

Francesco Marinucci's avatar
Francesco Marinucci committed
51 52
#  install -Dm755 "$pkgname" "$pkgdir/usr/bin/$pkgname"
  install -Dm644 docs/pokerth.1 "$pkgdir/usr/share/man/man1/pokerth.1"
53

Francesco Marinucci's avatar
Francesco Marinucci committed
54 55
  install -Dm644 data/data-copyright.txt "$pkgdir/usr/share/licenses/pokerth/data-copyright.txt"
#  rm -f "$pkgdir/usr/share/pokerth/data/data-copyright.txt"
56 57

  # install server
Francesco Marinucci's avatar
Francesco Marinucci committed
58 59
#  install -Dm755 bin/$pkgname_server "$pkgdir/usr/bin/${pkgname}_server"
  install -Dm644 docs/server_setup_howto.txt "$pkgdir/usr/share/doc/${pkgname}/server_setup_howto.txt"
60
}