blob: 2546192e91369856a8b8ecf257d28e5f172b92b4 (
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
66
67
|
# Maintainer: Rafael Fontenelle <rafaelff@gnome.org>
_name=ddnet-maps
pkgname=$_name-git
pkgver=r1289.gc3ac2521
pkgrel=1
pkgdesc="All released maps with configs for DDraceNetwork server"
arch=(any)
url="https://ddnet.tw"
license=('custom')
makedepends=('git')
backup=('usr/share/ddnet/data/autoexec_server.cfg'
'usr/share/ddnet/data/reset.cfg'
'usr/share/ddnet/data/storage.cfg')
source=("git+https://github.com/ddnet/$_name.git")
md5sums=('SKIP')
# Override compression, because default xz takes too much time to compress
PKGEXT='.pkg.tar'
pkgver() {
cd $_name
printf "r%s.g%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
prepare() {
cd $_name
msg2 "Removing exec permission from files"
find types/ -type f -exec chmod 644 {} \;
}
package() {
cd $_name
_datadir="$pkgdir/usr/share/ddnet/data"
install -d -m755 $_datadir/types/
install -m644 autoexec_server.cfg $_datadir
install -m644 reset.cfg $_datadir
install -m644 storage.cfg $_datadir
# Disable test flag
sed '/sv_test_cmds/s/1/0/' -i $_datadir/autoexec_server.cfg
# Append a '#' to line of the map type you DO NOT want to be installed
cp -a types/brutal $_datadir/types/
cp -a types/ddmax $_datadir/types/
cp -a types/dummy $_datadir/types/
cp -a types/insane $_datadir/types/
cp -a types/moderate $_datadir/types/
cp -a types/novice $_datadir/types/
cp -a types/oldschool $_datadir/types/
cp -a types/race $_datadir/types/
cp -a types/solo $_datadir/types/
# Also make the maps available for the client
install -d -m755 $_datadir/maps/
cd $_datadir/maps/
for type in $(ls $_datadir/types/); do
ln -rs $_datadir/types/$type/maps/* .
done
# Avoid file conflicts as they are already provided in DDNet package
rm "$_datadir/maps/Goo!.map" \
"$_datadir/maps/Kobra 4.map" \
"$_datadir/maps/Gold Mine.map"
}
|