summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Fontenelle2018-02-02 14:03:22 -0200
committerRafael Fontenelle2018-02-02 14:03:24 -0200
commitba735b63d826f5c21255f6771500e5f243cf4d25 (patch)
tree09f6ad521a8780f87cd82b4ea561a0f7b23d495c
parent07d8eb60f3475b0260f820a345759c668793a8e3 (diff)
downloadaur-ba735b63d826f5c21255f6771500e5f243cf4d25.tar.gz
Make maps available for the client
In spite of having maps installed, the client wouldn't find them because they were not localed at /usr/share/ddnet/data/maps/ (sub-directories doesn't count). Therefore, the client would download each map in runtime to ~/.teeworlds/downloadedmaps/. Now a symlink was created pointing the actual map file, so the client will not downloaded maps anymore, unless a map was changed or you don't have it at all - it means you should update this -git package).
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD16
2 files changed, 14 insertions, 4 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 307187b4d7e9..a7e987c0aa5a 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = ddnet-maps-git
pkgdesc = All released maps with configs for a DDraceNetwork server
- pkgver = r995.g2213cc6
+ pkgver = r998.g35459d0
pkgrel = 1
url = https://ddnet.tw
arch = any
diff --git a/PKGBUILD b/PKGBUILD
index 20398b826beb..8d0174a216d6 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
_name=ddnet-maps
pkgname=$_name-git
-pkgver=r995.g2213cc6
+pkgver=r998.g35459d0
pkgrel=1
pkgdesc="All released maps with configs for a DDraceNetwork server"
arch=(any)
@@ -33,14 +33,14 @@ package() {
cd $_name
_datadir="$pkgdir/usr/share/ddnet/data"
- install -d -m755 "$_datadir/types/"
+ 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"
+ 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/
@@ -52,4 +52,14 @@ package() {
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"
+ rm "$_datadir/maps/Kobra 4.map"
}