summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAryan Ghasemi2024-04-18 21:31:14 +0330
committerAryan Ghasemi2024-04-18 21:31:14 +0330
commit3fb63fff3e89989e3440e20e9fd6041079a62a48 (patch)
treebcb6bf938dac5b0196dee2c1c79e45011407fdcd
parentd81d14e773de9e914d7684c1483eb6d7e75adc75 (diff)
downloadaur-3fb63fff3e89989e3440e20e9fd6041079a62a48.tar.gz
a big modified PKGBUILD
-rw-r--r--.SRCINFO15
-rw-r--r--PKGBUILD54
2 files changed, 50 insertions, 19 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 4c683a6662bf..7604f5c1dc2c 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,17 +1,18 @@
pkgbase = smw-git
pkgdesc = Super Mario War multiplayer game.
- pkgver = 2.0
- pkgrel = 2
+ pkgver = r1476.a781c755
+ pkgrel = 1
url = https://github.com/mmatyas/supermariowar
arch = i686
arch = x86_64
license = GPL
makedepends = git
makedepends = cmake
- depends = sed
- depends = sdl_image
- depends = sdl_mixer
- depends = sdl
+ depends = enet
+ depends = yaml-cpp
+ depends = sdl2_image
+ depends = sdl2_mixer
+ depends = sdl2
depends = zlib
provides = smw
provides = smw-server
@@ -19,6 +20,8 @@ pkgbase = smw-git
provides = smw-worldedit
conflicts = smw-bin
source = git+https://github.com/mmatyas/supermariowar.git
+ source = git+https://github.com/mmatyas/supermariowar-data.git
+ sha256sums = SKIP
sha256sums = SKIP
pkgname = smw-git
diff --git a/PKGBUILD b/PKGBUILD
index ebab27d29b10..b3c2ae832258 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,36 +1,64 @@
# Maintainer: Aryan Ghasemi -- <aryangh1379@gmail.com>
pkgname=smw-git
-pkgver=2.0
-pkgrel=2
+_pkgname=supermariowar
+pkgver=r1476.a781c755
+pkgrel=1
pkgdesc='Super Mario War multiplayer game.'
url='https://github.com/mmatyas/supermariowar'
arch=('i686' 'x86_64')
license=('GPL')
-depends=('sed' 'sdl_image' 'sdl_mixer' 'sdl' 'zlib')
+depends=('enet' 'yaml-cpp' 'sdl2_image' 'sdl2_mixer' 'sdl2' 'zlib')
makedepends=('git' 'cmake')
provides=('smw' 'smw-server' 'smw-leveledit' 'smw-worldedit')
conflicts=('smw-bin')
-source=('git+https://github.com/mmatyas/supermariowar.git')
+source=('git+https://github.com/mmatyas/supermariowar.git'
+'git+https://github.com/mmatyas/supermariowar-data.git')
+sha256sums=('SKIP'
+ 'SKIP')
+
+pkgver() {
+# Git, no tags available
+ cd "$_pkgname"
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
-sha256sums=('SKIP')
prepare() {
# cp $srcdir/supermariowar
- cd -- "$srcdir/supermariowar"
- git submodule update --init
- [[ -d build ]] || mkdir build
+# cd -- "$srcdir/supermariowar"
+ # init submodules and disable the ones we don't need, we want our system libraries instead
+ cd "$_pkgname"
+ echo git submodule init
+ git submodule init data
+ #echo git submodule deinit dependencies/enet
+ #git submodule deinit dependencies/enet
+ #echo git config submodule.data.url "$srcdir/${_pkgname}-data"
+ git config submodule.data.url "$srcdir/${_pkgname}-data"
+ echo git submodule update
+ git config --global protocol.file.allow always
+ git submodule update
}
build() {
- cd -- "$srcdir/supermariowar/build/"
- cmake .. -DCMAKE_INSTALL_PREFIX:path="${pkgdir}/usr/" -DSMW_BINDIR:path="${pkgdir}/usr/bin" -DSMW_DATADIR:path="${pkgdir}/var/lib/smw" -DSMW_DOCDIR:path="${pkgdir}/usr/share/doc/smw/"
- make -j # -jN = build on N thread
+# cd -- "$srcdir/supermariowar/build/"
+# cmake .. -DCMAKE_INSTALL_PREFIX:path="${pkgdir}/usr/" -DSMW_BINDIR:path="${pkgdir}/usr/bin" -DSMW_DATADIR:path="${pkgdir}/var/lib/smw" -DSMW_DOCDIR:path="${pkgdir}/usr/share/doc/smw/"
+ cmake -B build -S "$_pkgname" \
+ -DCMAKE_BUILD_TYPE='None' \
+ -DCMAKE_INSTALL_PREFIX:path="/usr/" \
+ -DSMW_BINDIR:path="bin" \
+ -DSMW_DATADIR:path="/var/lib/smw" \
+ -DSMW_DOCDIR:path="share/doc/smw/" \
+ -DBUILD_STATIC_LIBS=OFF \
+ -Wno-dev
+ cmake --build build
+ #make
}
package() {
- cd -- "$srcdir/supermariowar/build"
- make install
+ #cd -- "$srcdir/supermariowar/build"
+ #make install
+ DESTDIR="$pkgdir" cmake --install build
sed -i 's/\(--datadir[[:space:]]\)[^[:space:]]*/\1\/var\/lib\/smw/' "$pkgdir/usr/share/applications/supermariowar.desktop"
sed -i 's/\(--datadir[[:space:]]\)[^[:space:]]*/\1\/var\/lib\/smw/' "$pkgdir/usr/share/applications/supermariowar-leveleditor.desktop"
sed -i 's/\(--datadir[[:space:]]\)[^[:space:]]*/\1\/var\/lib\/smw/' "$pkgdir/usr/share/applications/supermariowar-worldeditor.desktop"