summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Fontenelle2017-09-01 14:46:18 -0300
committerRafael Fontenelle2017-09-01 14:46:18 -0300
commitc8abe6e52850be17100ed7529b52cc0583d6cf42 (patch)
tree045f9c7acacea108429a40c06a588a1f804eb9dd
downloadaur-c8abe6e52850be17100ed7529b52cc0583d6cf42.tar.gz
Initial commit
Renaming "teewords-ddnet-maps-git" to "ddnet-maps-git"
-rw-r--r--.SRCINFO18
-rw-r--r--PKGBUILD51
-rw-r--r--ddnet-maps-git.install4
-rwxr-xr-xgetsizes.sh19
4 files changed, 92 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..800c0d369c5
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,18 @@
+# Generated by mksrcinfo v8
+# Fri Sep 1 17:45:40 UTC 2017
+pkgbase = ddnet-maps-git
+ pkgdesc = All released maps with server configs of DDraceNetwork
+ pkgver = r956.gd89fa33
+ pkgrel = 1
+ url = https://ddnet.tw
+ arch = any
+ license = custom
+ makedepends = git
+ backup = usr/share/ddnet/data/autoexec_server.cfg
+ backup = usr/share/ddnet/data/reset.cfg
+ backup = usr/share/ddnet/data/storage.cfg
+ source = git+https://github.com/ddnet/ddnet-maps.git
+ md5sums = SKIP
+
+pkgname = ddnet-maps-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..093bae13760
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,51 @@
+# Maintainer: Rafael Fontenelle <rafaelff@gnome.org>
+
+_name=ddnet-maps
+pkgname=$_name-git
+pkgver=r956.gd89fa33
+pkgrel=1
+pkgdesc="All released maps with server configs of DDraceNetwork"
+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)
+
+pkgver() {
+ cd $_name
+ printf "r%s.g%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+prepare() {
+ cd $_name
+ msg2 "Removing exec premission 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/novice $_datadir/types/
+ cp -a types/moderate $_datadir/types/
+ cp -a types/brutal $_datadir/types/
+ cp -a types/dummy $_datadir/types/
+ cp -a types/ddmax $_datadir/types/
+ cp -a types/oldschool $_datadir/types/
+ cp -a types/solo $_datadir/types/
+ cp -a types/race $_datadir/types/
+}
diff --git a/ddnet-maps-git.install b/ddnet-maps-git.install
new file mode 100644
index 00000000000..17746c99816
--- /dev/null
+++ b/ddnet-maps-git.install
@@ -0,0 +1,4 @@
+post_upgrade() {
+ echo "WARNING: DDNet data directory changed from
+ /usr/share/teeworlds/ to /usr/share/ddnet/"
+}
diff --git a/getsizes.sh b/getsizes.sh
new file mode 100755
index 00000000000..fa4e4e77e92
--- /dev/null
+++ b/getsizes.sh
@@ -0,0 +1,19 @@
+#!/bin/bash
+# Get sizes of ddnet-maps-git package file, and repository and types dirs
+# This should be ran only after a successful build
+
+test -f PKGBUILD || exit 1
+test -d src || exit 1
+
+source PKGBUILD
+
+echo "Sizes as of $pkgver :"
+echo ""
+du -shD $pkgname-$pkgver-$pkgrel-$arch.pkg.tar.xz
+du -sh src/$_name | cut -d' ' -f1
+echo ""
+cd pkg/$pkgname
+for type in $(ls usr/share/ddnet/data/types/); do
+ du -sh usr/share/ddnet/data/types/$type
+done
+