summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorRizzzi Git2023-07-10 13:20:02 +0800
committerRizzzi Git2023-07-10 13:20:02 +0800
commit4f4bf89cef05651fa054598a21afa79dfd27ac94 (patch)
treeba751316e49f14e41881b9d420aa8f093c502c2e
downloadaur-4f4bf89cef05651fa054598a21afa79dfd27ac94.tar.gz
initial commit
-rw-r--r--.SRCINFO13
-rw-r--r--.gitignore5
-rw-r--r--LICENSE21
-rw-r--r--PKGBUILD49
-rw-r--r--setup.sh32
-rw-r--r--tmodloader-familyshare.sh7
-rw-r--r--tmodloader-server.sh7
-rw-r--r--tmodloader.sh7
8 files changed, 141 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..23e3eea94e5c
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,13 @@
+pkgbase = tmodloader-bin
+ pkgdesc = An open-source, community-driven, modification and expansion of the Terraria game that makes it possible to make and play mods.
+ pkgver = 2022.09.47.57_1.4.3.6
+ pkgrel = 1
+ epoch = 0
+ url = https://www.tmodloader.net/
+ arch = x86_64
+ license = MIT
+ noextract = tml-2022.09.47.57.zip
+ source = tml-2022.09.47.57.zip::https://github.com/tModLoader/tModLoader/releases/download/v2022.09.47.57/tModLoader.zip
+ sha256sums = 640b47d9d6b23f0cb37bc258920e7443d4131137fc49bf4ca0699b6854705358
+
+pkgname = tmodloader-bin
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..f43b3d978e93
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,5 @@
+/pkg
+/src
+
+/**/*.zip
+/**.pkg.tar.zst
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 000000000000..451202e67dfb
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,21 @@
+MIT License Copyright (c) 2023 Rizzzi Git
+
+Permission is hereby granted, free of
+charge, to any person obtaining a copy of this software and associated
+documentation files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use, copy, modify, merge,
+publish, distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to the
+following conditions:
+
+The above copyright notice and this permission notice
+(including the next paragraph) shall be included in all copies or substantial
+portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
+ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO
+EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE. \ No newline at end of file
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..aaaddb14374f
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,49 @@
+# Maintainer: Rizzzi Git <rizzzigit@gmail.com>
+
+tmlver="2022.09.47.57"
+terrariaver="1.4.3.6"
+pkgrel=1
+epoch=0
+
+pkgname="tmodloader-bin"
+pkgdesc="An open-source, community-driven, modification and expansion of the Terraria game that makes it possible to make and play mods."
+pkgver="$tmlver"_"$terrariaver"
+url="https://www.tmodloader.net/"
+arch=("x86_64")
+license=("MIT")
+
+source=(
+ "tml-$tmlver.zip::https://github.com/tModLoader/tModLoader/releases/download/v$tmlver/tModLoader.zip"
+)
+
+sha256sums=(
+ "640b47d9d6b23f0cb37bc258920e7443d4131137fc49bf4ca0699b6854705358"
+)
+
+noextract=("tml-$tmlver.zip")
+
+package() {
+ rootdir="$pkgdir/opt/tModLoader"
+ bindir="$pkgdir/usr/bin"
+ packfile="$rootdir/tml.zip"
+
+ if [[ ! -e $rootdir ]]
+ then
+ mkdir -p "$rootdir"
+ fi
+
+ cp "tml-$tmlver.zip" "$packfile"
+ echo "$tmlver" > "$rootdir/ver.txt"
+
+ if [[ ! -e $bindir ]]
+ then
+ mkdir -p "$bindir"
+ fi
+
+ ln -s "/opt/tModLoader/tmodloader.sh" "$bindir/tmodloader"
+ ln -s "/opt/tModLoader/tmodloader-server.sh" "$bindir/tmodloader-server"
+ ln -s "/opt/tModLoader/tmodloader-familyshare.sh" "$bindir/tmodloader-familyshare"
+
+ cp "$startdir/"*".sh" -rp "$rootdir/"
+ chmod 755 "$rootdir/"*".sh"
+}
diff --git a/setup.sh b/setup.sh
new file mode 100644
index 000000000000..88810259aa30
--- /dev/null
+++ b/setup.sh
@@ -0,0 +1,32 @@
+#!/bin/bash
+
+root_dir="/opt/tModLoader"
+user_dir="$HOME/.local/share/tModLoader"
+
+root_version_file="$root_dir/ver.txt"
+user_version_file="$user_dir/ver.txt"
+
+install_needed=false
+
+if [[ ! -e "$user_dir" ]]
+then
+ mkdir -p "$user_dir"
+ install_needed=true
+elif [[ "$(cat "$root_version_file")" != "$(cat "$user_version_file")" ]]
+then
+ install_needed=true
+fi
+
+if [[ $install_needed == true ]]
+then
+ pack_file="$root_dir/tml.zip"
+
+ echo -n "Extracting tModLoader..."
+ unzip -X -o "$pack_file" -d "$user_dir/"
+ cp "$root_version_file" "$user_version_file"
+ echo "Done"
+
+ echo -n "Enabling scripts..."
+ chmod +x "$user_dir/start-"*".sh"
+ echo "Done"
+fi
diff --git a/tmodloader-familyshare.sh b/tmodloader-familyshare.sh
new file mode 100644
index 000000000000..2cd09a7fda1a
--- /dev/null
+++ b/tmodloader-familyshare.sh
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+/opt/tModLoader/setup.sh
+
+user_dir="$HOME/.local/share/tModLoader"
+
+"$user_dir/start-tModLoader-FamilyShare.sh" "${@:1}"
diff --git a/tmodloader-server.sh b/tmodloader-server.sh
new file mode 100644
index 000000000000..554e43d30153
--- /dev/null
+++ b/tmodloader-server.sh
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+/opt/tModLoader/setup.sh
+
+user_dir="$HOME/.local/share/tModLoader"
+
+"$user_dir/start-tModLoaderServer.sh" "${@:1}"
diff --git a/tmodloader.sh b/tmodloader.sh
new file mode 100644
index 000000000000..23d035b7bb14
--- /dev/null
+++ b/tmodloader.sh
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+/opt/tModLoader/setup.sh
+
+user_dir="$HOME/.local/share/tModLoader"
+
+"$user_dir/start-tModLoader.sh" "${@:1}"