blob: 88329a26caf8837578c0e860f2a21e52d880ad39 (
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
65
|
# Maintainer: Jozef Riha <jose1711 at gmail dot com>
pkgname=hedgewars-hg
pkgver=r15738+.027a56b3895e+
pkgrel=1
pkgdesc="Free Worms-like turn based strategy game (development version - mercurial)"
arch=('i686' 'x86_64')
url="http://hedgewars.org"
license=('GPL' 'custom')
depends=('qt5-base' 'sdl2' 'sdl2_mixer' 'sdl2_image' 'sdl2_net' 'sdl2_ttf' 'lua51' 'ffmpeg' 'glut'
'physfs' 'ghc-libs' 'haskell-entropy' 'haskell-sha' 'haskell-random' 'haskell-regex-tdfa'
'haskell-sandi' 'haskell-hslogger' 'haskell-network2.8' 'haskell-utf8-string' 'haskell-vector')
makedepends=('fpc' 'cmake' 'qt5-tools' 'ghc' 'haskell-bytestring-show'
'haskell-zlib' 'haskell-base-prelude' 'imagemagick' 'mesa' 'mercurial')
source=("${pkgname}"::'hg+https://hg.hedgewars.org/hedgewars' \
hedgewars.desktop \
hedgewars.png)
md5sums=('SKIP'
'48c66a3204d4fa0a69e9aa46f7c31e0c'
'eeb14d50df39063549ac5eca9dbc65d1')
conflicts=('hedgewars')
pkgver() {
cd "${pkgname}"
printf "r%s.%s" "$(hg identify -n)" "$(hg identify -i)"
}
prepare() {
cd ${srcdir}/${pkgname}
sed -i 's|set(ghc_flags|set(ghc_flags -dynamic -package network-2.8.0.1 -hide-package network-bsd|' gameServer/CMakeLists.txt
sed -i '/#include <QSizePolicy>/a #include <QPainterPath>' QTfrontend/ui/page/pagegamestats.cpp
# https://bugs.freepascal.org/view.php?id=37286
sed -i 's/procedure ShiftWorld(Dir: LongInt); inline;/procedure ShiftWorld(Dir: LongInt);/' hedgewars/uWorld.pas
}
build() {
cd ${srcdir}/${pkgname}
mkdir -p $srcdir/bin
cmake \
-DCMAKE_BUILD_TYPE="Release" \
-DCMAKE_INSTALL_PREFIX=/usr \
-DDATA_INSTALL_DIR=/usr/share/hedgewars \
-DNOSERVER=0 .
make
# resize icon
for _size in 16 32 48 64 128 256; do
convert +set date:create +set date:modify misc/hedgewars.png -resize ${_size}x${_size} hedgewars_${_size}.png
done
}
package() {
cd ${srcdir}/${pkgname}
make DESTDIR=$pkgdir install
install -D -m644 Fonts_LICENSE.txt $pkgdir/usr/share/licenses/$pkgname/Fonts_LICENSE.txt
install -D -m644 $srcdir/hedgewars.desktop $pkgdir/usr/share/applications/hedgewars.desktop
# install icons
install -D -m644 misc/hedgewars.png "$pkgdir"/usr/share/icons/hicolor/512x512/apps/hedgewars.png
for _size in 16 32 48 64 128 256; do
install -D -m644 hedgewars_${_size}.png "$pkgdir"/usr/share/icons/hicolor/${_size}x${_size}/apps/hedgewars.png
done
rm -rf "$pkgdir"/usr/share/pixmaps
}
|