summaryrefslogtreecommitdiff
path: root/PKGBUILD
blob: 920391d6b1e6d761328a588d2cf01a1db5a818b6 (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
# Maintainer: jc_gargma <jc_gargma@iserlohn-fortress.net>
# Maintainer (AUR): Dimitris Kiziridis <ragouel at outlook dot com>
# Contributor (AUR): Christian Krause ("wookietreiber") <christian.krause@mailbox.org>

# # I maintain this because:
# AUR version lacks additional optimization and hardening flags

pkgname=freeorion
pkgver=0.4.9
pkgrel=3
pkgdesc='Turn-based space empire and galactic conquest (4X) computer game'
url='https://www.freeorion.org/'
arch=('i686' 'x86_64')
license=('GPL2')
depends=('boost-libs' 'python2' 'sdl2' 'libvorbis' 'glew' 'openal' 'hicolor-icon-theme' 'freetype2')
makedepends=('boost' 'cmake')
provides=('freeorion')
conflicts=('freeorion-git')
source=(${pkgname}-${pkgver}.tar.gz::https://github.com/${pkgname}/${pkgname}/archive/v${pkgver}.tar.gz)
b2sums=('49a8cacbcaef5c42fab1bd994ab975c4bf4702f07c4affc97315abf04bac77be4eedc8ae9be4453765d76937aba44ecfc9d019efc2038c756355364230bb940d')

build() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  mkdir -p build
  cd "${srcdir}/${pkgname}-${pkgver}"/build

  # PIE breaks compiling
  export CFLAGS="$CFLAGS -O3 -fstack-protector-all -flto=4"
  export CXXFLAGS="$CXXFLAGS -O3 -fstack-protector-all -flto=4"

  cmake \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_INSTALL_LIBDIR=lib \
    ..
  make
}

package() {
  cd "${srcdir}/${pkgname}-${pkgver}"/build

  make DESTDIR="${pkgdir}" install
}