diff options
author | AltoXorg | 2024-05-28 19:40:53 +0800 |
---|---|---|
committer | AltoXorg | 2024-05-28 19:41:10 +0800 |
commit | b05f0510533305b4448e71e33fde22828062eab4 (patch) | |
tree | c5d599590eb3749239cb433694a013e824aabb53 | |
download | aur-b05f0510533305b4448e71e33fde22828062eab4.tar.gz |
new package 2Ship2Harkinian (git)
-rw-r--r-- | .SRCINFO | 66 | ||||
-rw-r--r-- | 2s2h.desktop | 9 | ||||
-rw-r--r-- | 2s2h.install | 19 | ||||
-rw-r--r-- | PKGBUILD | 133 |
4 files changed, 227 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..2dd666de4908 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,66 @@ +pkgbase = 2s2h-git + pkgver = 1.0.0.r6.g01ae001de + pkgrel = 1 + url = https://github.com/HarbourMasters/2ship2harkinian + arch = x86_64 + arch = i686 + arch = armv7h + arch = aarch64 + makedepends = git + makedepends = cmake + makedepends = ninja + makedepends = python + makedepends = curl + makedepends = lsb-release + makedepends = libxrandr + makedepends = libxinerama + makedepends = libxi + makedepends = glu + makedepends = boost + makedepends = nlohmann-json + depends = sdl2 + depends = sdl2_net + depends = glew + depends = zenity + depends = libzip + depends = libpng + depends = libpng + depends = fmt + depends = spdlog + depends = tinyxml2 + source = git+https://github.com/HarbourMasters/2ship2harkinian.git + source = git+https://github.com/Kenix3/libultraship.git + source = git+https://github.com/louist103/OTRExporter.git + source = git+https://github.com/louist103/ZAPDTR.git + source = 2s2h.desktop + sha256sums = SKIP + sha256sums = SKIP + sha256sums = SKIP + sha256sums = SKIP + sha256sums = 8c8525a09a94c30106f44219c0f0239789d5c53cd6e30c7748b55f8d83cee24b + +pkgname = 2s2h-git + pkgdesc = An unofficial port of The Legend of Zelda Majora's Mask (git) + install = 2s2h.install + license = CC0-1.0 + depends = sdl2 + depends = sdl2_net + depends = glew + depends = zenity + depends = libzip + depends = libpng + depends = fmt + depends = spdlog + depends = tinyxml2 + provides = 2s2h + conflicts = 2s2h + +pkgname = 2s2h-otr-exporter-git + pkgdesc = OTR generation tools for 2S2H. Includes asset XML files needed for generation. (git) + license = MIT + depends = libpng + depends = fmt + depends = spdlog + depends = tinyxml2 + provides = 2s2h-otr-exporter + conflicts = 2s2h-otr-exporter diff --git a/2s2h.desktop b/2s2h.desktop new file mode 100644 index 000000000000..954f4c78ffb1 --- /dev/null +++ b/2s2h.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Version=1.0 +Name=2 Ship 2 Harkinian +Comment=An unofficial port of The Legend of Zelda: The Majora's Mask +Exec=2s2h +Terminal=false +Icon=2s2h +Type=Application +Categories=Game;Retro; diff --git a/2s2h.install b/2s2h.install new file mode 100644 index 000000000000..15a847ca2d11 --- /dev/null +++ b/2s2h.install @@ -0,0 +1,19 @@ +_install_info() { + cat <<'EOF' +*** This is an unofficial version of 2 Ship 2 Harkinian. +*** and is not supported by the Harbour Masters team. +*** Your save file is located at $HOME/.local/share/2ship +*** +*** Any issues for this package regarding compile errors must be +*** discussed in the AUR comments, and other ones such as game bugs +*** must go to their official Discord server for help and assistance. +EOF +} + +post_install() { + _install_info +} + +post_upgrade() { + _install_info +} diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..5cf62ae4f2fb --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,133 @@ +# Maintainer: AltoXorg <atrl101 AT yahoo DOT com> + +_reponame=2ship2harkinian +pkgbase=2s2h-git +pkgname=(2s2h-git 2s2h-otr-exporter-git) +pkgver=1.0.0.r6.g01ae001de +pkgrel=1 +arch=("x86_64" "i686" "armv7h" "aarch64") +#url="https://shipofharkinian.com/" +url="https://github.com/HarbourMasters/${_reponame}" +_depends_2s2h=("sdl2" "sdl2_net" "glew" "zenity" "libzip" "libpng") +_depends_2s2h_otr_exporter=("libpng") +_depends_lus=("fmt" "spdlog" "tinyxml2") +depends=("${_depends_2s2h[@]}" "${_depends_2s2h_otr_exporter[@]}" "${_depends_lus[@]}") +makedepends=("git" "cmake" "ninja" "python" "curl" "lsb-release" "libxrandr" "libxinerama" "libxi" "glu" "boost" "nlohmann-json") +source=("git+https://github.com/HarbourMasters/${_reponame}.git" + "git+https://github.com/Kenix3/libultraship.git" + #"git+https://github.com/HarbourMasters/OTRExporter.git" + #"git+https://github.com/HarbourMasters/ZAPDTR.git" + "git+https://github.com/louist103/OTRExporter.git" + "git+https://github.com/louist103/ZAPDTR.git" + "2s2h.desktop") +sha256sums=('SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + '8c8525a09a94c30106f44219c0f0239789d5c53cd6e30c7748b55f8d83cee24b') + +# -- Per-repo submodules +_main_submodules=( + libultraship + OTRExporter + ZAPDTR +) + +SHIP_PREFIX=/opt/2s2h + +_is_debug() { + for opt in "${OPTIONS[@]}"; do + if [ "$opt" = debug ]; then + return 0 + fi + done + + return 1 +} + +_init_submodules() { + dir="$1" + shift 1 + + for sub in "$@"; do + git submodule init "${dir}${sub}" + git config "submodule.${dir}${sub}.url" "${srcdir}/${sub}" + git -c protocol.file.allow=always submodule update "${dir}${sub}" + done +} + +pkgver() { + cd "${srcdir}/${_reponame}" + + git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g' +} + +prepare() { + cd "${srcdir}/${_reponame}" + + # Init all submodules + _init_submodules "" "${_main_submodules[@]}" +} + +build() { + cd "${srcdir}/${_reponame}" + + if _is_debug; then + BUILD_TYPE=Debug + else + BUILD_TYPE=Release + fi + + export CFLAGS="${CFLAGS/-Werror=format-security/}" + export CXXFLAGS="${CXXFLAGS/-Werror=format-security/}" + + cmake . \ + -Bbuild \ + -GNinja \ + -DCMAKE_BUILD_TYPE=$BUILD_TYPE \ + -DNON_PORTABLE=On \ + -DCMAKE_INSTALL_PREFIX=$SHIP_PREFIX \ + -DBUILD_REMOTE_CONTROL=1 + + cmake --build build --target ZAPD --config $BUILD_TYPE $NINJAFLAGS + cmake --build build --target Generate2ShipOtr --config $BUILD_TYPE $NINJAFLAGS + cmake --build build --config $BUILD_TYPE $NINJAFLAGS +} + +package_2s2h-git() { + pkgdesc="An unofficial port of The Legend of Zelda Majora's Mask (git)" + provides=("2s2h") + conflicts=("2s2h") + depends=("${_depends_2s2h[@]}" "${_depends_lus[@]}") + license=("CC0-1.0") + install=2s2h.install + + cd "${srcdir}/${_reponame}" + + DESTDIR="${pkgdir}" cmake --install build --component ship + DESTDIR="${pkgdir}" cmake --install build --component 2s2h + + install -dm755 "${pkgdir}/usr/bin/" + ln -s "${SHIP_PREFIX}/2s2h.elf" "${pkgdir}/usr/bin/2s2h" + install -Dm644 "${srcdir}/2s2h.desktop" -t "${pkgdir}/usr/share/applications" + install -Dm644 mm/linux/2s2hIcon.png "${pkgdir}/usr/share/pixmaps/2s2h.png" + install -Dm644 "LICENSE" "${pkgdir}/usr/share/licenses/2s2h-git/LICENSE" + + # Copy game documentation + install -Dm644 "README.md" "${pkgdir}/usr/share/doc/2s2h/README.md" + #cp -r docs "${pkgdir}/usr/share/doc/2s2h/docs" +} + +package_2s2h-otr-exporter-git() { + pkgdesc="OTR generation tools for 2S2H. Includes asset XML files needed for generation. (git)" + provides=("2s2h-otr-exporter") + conflicts=("2s2h-otr-exporter") + license=("MIT") + depends=("${_depends_2s2h_otr_exporter[@]}" "${_depends_lus[@]}") + + cd "${srcdir}/${_reponame}" + + DESTDIR="${pkgdir}" cmake --install build --component extractor + + install -Dm644 "OTRExporter/LICENSE" "${pkgdir}/usr/share/licenses/2s2h-otr-exporter-git/LICENSE" +} |