summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorAndrei "Akari" Alexeyev2017-07-30 16:29:24 +0300
committerAndrei "Akari" Alexeyev2017-07-30 16:39:55 +0300
commit17671a625bbbaf698de8c6ebd2c49e1d99f62832 (patch)
treec7d5ca8916ad1660568b1f628d8923f01ca1f57d /PKGBUILD
downloadaur-rexuiz-dlc-git.tar.gz
initial commit
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD63
1 files changed, 63 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..63bdef7cd6b
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,63 @@
+# Maintainer: Andrei Alexeyev <akari@alienslab.net>
+
+pkgname=('rexuiz-dlc-essential-git' 'rexuiz-dlc-extra-git')
+pkgbase='rexuiz-dlc-git'
+pkgver=r10.0ae1815
+pkgrel=1
+arch=('any')
+pkgdesc="An updated fork of Nexuiz, a fast-paced multiplayer first-person shooter (downloadable content)."
+url="http://rexuiz.top/"
+license=("GPL2")
+depends=()
+makedepends=('zip')
+optdepends=()
+conflicts=('rexuiz-dlc')
+provides=('rexuiz-dlc')
+source=("git+https://github.com/kasymovga/rexdlc")
+sha256sums=('SKIP')
+
+# Prevent compressing final package
+PKGEXT='.pkg.tar'
+
+package_rexuiz-dlc-essential-git() {
+ pkgdesc="An updated fork of Nexuiz, a fast-paced multiplayer first-person shooter (downloadable content - essential)."
+ conflicts=('rexuiz-dlc-essential')
+ provides=('rexuiz-dlc-essential')
+
+ _package_subset essential
+}
+
+package_rexuiz-dlc-extra-git() {
+ pkgdesc="An updated fork of Nexuiz, a fast-paced multiplayer first-person shooter (downloadable content - extra)."
+ conflicts=('rexuiz-dlc-extra')
+ provides=('rexuiz-dlc-extra')
+
+ _package_subset extra
+}
+
+build() {
+ cd "${srcdir}/rexdlc"
+ rm -f zzz-rexdlc_*.pk3
+
+ _build_subset essential
+ _build_subset extra
+}
+
+_build_subset() {
+ local subsetdir="${srcdir}/subset_$1"
+ rm -rf "$subsetdir"
+ mkdir "$subsetdir"
+ make "$1"
+ mv zzz-rexdlc_*.pk3 "$subsetdir"
+}
+
+_package_subset() {
+ cd "${srcdir}/subset_$1"
+ install -m755 -d "${pkgdir}/usr/share/rexuiz/data/dlcache/"
+ install -m644 zzz-rexdlc_*.pk3 "${pkgdir}/usr/share/rexuiz/data/dlcache/"
+}
+
+pkgver() {
+ cd "${srcdir}/rexdlc"
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}