upgpkg: wordpress 6.2.1-1
[ArchLinux/community.git] / hedgewars / trunk / PKGBUILD
blobc67ca6efdef25bc1b6a02122e4c25cb48a70dc26
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
2 # Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>
3 # Contributor: Tinxy <arch at tinx dot eu>
5 pkgname=hedgewars
6 pkgver=1.0.2
7 pkgrel=23
8 pkgdesc="Turn-based strategy artillery game similiar to Worms"
9 arch=('x86_64')
10 url="https://hedgewars.org"
11 license=('GPL' 'custom')
12 depends=('qt5-base' 'sdl2' 'sdl2_mixer' 'sdl2_image' 'sdl2_net' 'sdl2_ttf' 'lua51' 'ffmpeg4.4' 'glut'
13          'physfs' 'ghc-libs' 'haskell-entropy' 'haskell-sha' 'haskell-random' 'haskell-regex-tdfa'
14          'haskell-sandi' 'haskell-hslogger' 'haskell-network' 'haskell-network-bsd'
15          'haskell-utf8-string' 'haskell-vector')
16 makedepends=('fpc' 'cmake' 'qt5-tools' 'ghc' 'haskell-bytestring-show' 'haskell-zlib'
17              'haskell-base-prelude' 'imagemagick' 'mesa')
18 source=("https://www.hedgewars.org/download/releases/hedgewars-src-$pkgver.tar.bz2")
19 sha512sums=('dc79cc48eee305d8dd2b64fcbfe598d48f8aec918d9065a6af4aef9be4e4940ad858836fc6bda46e02128b80dbba8c443a4f8a702a16b0ac969f8d0a0e080502')
21 prepare() {
22   cd hedgewars-src-$pkgver
23   sed -i 's|set(ghc_flags|set(ghc_flags -dynamic|' gameServer/CMakeLists.txt
26 build() {
27   cd hedgewars-src-$pkgver
28   export PKG_CONFIG_PATH='/usr/lib/ffmpeg4.4/pkgconfig'
29   cmake \
30     -Bbuild \
31     -DCMAKE_BUILD_TYPE="Release" \
32     -DCMAKE_INSTALL_PREFIX=/usr \
33     -DDATA_INSTALL_DIR=/usr/share/hedgewars \
34     -DNOSERVER=0
35   make -C build
37   # resize icon
38   for _size in 16 32 48 64 128 256; do
39     convert +set date:create +set date:modify misc/hedgewars.png -resize ${_size}x${_size} hedgewars_${_size}.png
40   done
43 package() {
44   cd hedgewars-src-$pkgver
45   DESTDIR="$pkgdir" make -C build install
46   install -D -m644 Fonts_LICENSE.txt "$pkgdir"/usr/share/licenses/${pkgname}/Fonts_LICENSE.txt
48   # install icons
49   install -D -m644 misc/hedgewars.png "$pkgdir"/usr/share/icons/hicolor/512x512/apps/hedgewars.png
50   for _size in 16 32 48 64 128 256; do
51     install -D -m644 hedgewars_${_size}.png "$pkgdir"/usr/share/icons/hicolor/${_size}x${_size}/apps/hedgewars.png
52   done
53   rm -rf "$pkgdir"/usr/share/pixmaps
55   install -D -m644 share/hedgewars/Data/misc/hedgewars.desktop "$pkgdir"/usr/share/applications/hedgewars.desktop