blob: 3301c6692d94521bbdaa6e8661a0014f81bc6f52 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
# Maintainer: skwerlman <skw@tetrarch.co>
# Contributor: Ethan Rakoff <ethan@ethanrakoff.com>
# Contributor: Scott Linder <scott.linder18@gmail.com>
# Contributor: Jorge Araya Navarro <elcorreo@deshackra.com>
# Contributor: Mikhail Burakov <mikhail.burakov@gmail.com>
# shellcheck shell=bash
# shellcheck disable=SC2034
_pkgbase=cockatrice
pkgname=("cockatrice-client-git" "cockatrice-server-git")
pkgver=2.9.1.beta.2.r21.gb7042165
pkgrel=2
pkgdesc='Open-source multiplatform supported program for playing tabletop card games over a network.'
arch=('i686' 'x86_64')
url='https://cockatrice.github.io/'
license=('GPL2')
makedepends=('cmake' 'git' 'zlib' 'xz' 'mariadb-libs' 'protobuf' 'qt6-svg' 'qt6-tools' 'qt6-multimedia' 'qt6-websockets')
checkdepends=('gtest' 'valgrind')
source=("git+https://github.com/cockatrice/cockatrice")
sha256sums=('SKIP')
pkgver() {
cd "${_pkgbase}" || exit 1
git describe --long --tags | cut -d- -f5- | sed -r 's/([^-]*-g)/r\1/;s/-/./g'
}
prepare() {
mkdir -p "${_pkgbase}/build"
}
build() {
# Normally, CMake PKGBUILDS should override to set -O2 manually
# However, trice sets -O2 for Release builds, so we don't need to do this
# See the following:
# https://wiki.archlinux.org/title/CMake_package_guidelines#CMake_can_automatically_override_the_default_compiler_optimization_flag
# https://github.com/Cockatrice/Cockatrice/blob/master/CMakeLists.txt#L119
cmake -B "${_pkgbase}/build" -S "${_pkgbase}" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=/usr -DWITH_ORACLE=1 -DWITH_CLIENT=1 -DWITH_DBCONVERTER=1 -DWITH_SERVER=1 -DTEST=1
make -C "${_pkgbase}/build"
}
check() {
make -C "${_pkgbase}/build" test
}
package_cockatrice-client-git() {
provides=('cockatrice-client')
conflicts=('cockatrice-client')
depends=('protobuf' 'qt6-multimedia' 'qt6-websockets' 'hicolor-icon-theme')
optdepends=('zlib: Support compressed MTGJSON in Oracle' 'xz: Support compressed MTGJSON in Oracle')
cmake -B "${_pkgbase}/build" -S "${_pkgbase}" -DCMAKE_INSTALL_PREFIX:PATH=/usr -DWITH_ORACLE=1 -DWITH_CLIENT=1 -DWITH_DBCONVERTER=1 -DWITH_SERVER=0 -DTEST=0
make -C "${_pkgbase}/build" DESTDIR="${pkgdir}/" install
}
package_cockatrice-server-git() {
provides=('cockatrice-server')
conflicts=('cockatrice-server')
depends=('protobuf' 'qt6-websockets' 'hicolor-icon-theme')
optdepends=('mariadb: database support')
cmake -B "${_pkgbase}/build" -S "${_pkgbase}" -DCMAKE_INSTALL_PREFIX:PATH=/usr -DWITH_ORACLE=0 -DWITH_CLIENT=0 -DWITH_DBCONVERTER=0 -DWITH_SERVER=1 -DTEST=0
make -C "${_pkgbase}/build" DESTDIR="${pkgdir}/" install
}
|