diff options
author | Brenton Horne | 2023-01-10 23:06:06 +1000 |
---|---|---|
committer | Brenton Horne | 2023-01-10 23:06:06 +1000 |
commit | 72f697e15af59c0756a47aecb4d1e2874d565d0e (patch) | |
tree | 08dbd96c228be885e72c3b23c68b52809b4380cf | |
download | aur-72f697e15af59c0756a47aecb4d1e2874d565d0e.tar.gz |
Initial commit
-rw-r--r-- | .SRCINFO | 37 | ||||
-rw-r--r-- | .gitignore | 7 | ||||
-rwxr-xr-x | PKGBUILD | 70 | ||||
-rwxr-xr-x | openra-sa | 52 | ||||
-rwxr-xr-x | openra-sa.appdata.xml | 40 | ||||
-rwxr-xr-x | openra-sa.desktop | 11 | ||||
-rwxr-xr-x | openra-sa.install | 18 |
7 files changed, 235 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..5a8c17bb92bd --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,37 @@ +pkgbase = openra-sa-git + pkgdesc = A mod of OpenRA that reimagines the 1999 Swarm Assault game + pkgver = 1083.git.63830ec + pkgrel = 1 + url = https://github.com/Dzierzan/OpenSA + install = openra-sa.install + arch = x86_64 + license = GPL3 + makedepends = dos2unix + makedepends = git + makedepends = unzip + makedepends = msbuild + depends = mono + depends = ttf-dejavu + depends = openal + depends = libgl + depends = gtk-update-icon-cache + depends = libaccounts-glib + depends = libibus + depends = libblockdev + depends = libgexiv2 + depends = desktop-file-utils + depends = xdg-utils + depends = zenity + depends = python-gobject + provides = openra-sa + options = !strip + source = git+https://github.com/Dzierzan/OpenSA.git + source = openra-sa + source = openra-sa.appdata.xml + source = openra-sa.desktop + md5sums = SKIP + md5sums = f13888474aeeb31acbe019d10d3d644c + md5sums = 842adc4e572c5902400de97eb8a61b8c + md5sums = a7eee25f52a1f9ab362fee6e6e669842 + +pkgname = openra-sa-git diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..44ab3886e9e4 --- /dev/null +++ b/.gitignore @@ -0,0 +1,7 @@ +*.xz +pkg +OpenSA +src +*.gz +*.log* +*.zst diff --git a/PKGBUILD b/PKGBUILD new file mode 100755 index 000000000000..e7b2a92abb28 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,70 @@ +# Maintainer: Brenton Horne <brentonhorne77 at gmail dot com> + +pkgname=openra-sa-git +_pkgname=${pkgname/-git} +pkgver=1083.git.63830ec +pkgrel=1 +pkgdesc="A mod of OpenRA that reimagines the 1999 Swarm Assault game" +arch=(x86_64) +url="https://github.com/Dzierzan/OpenSA" +license=('GPL3') +install=openra-sa.install +depends=('mono' 'ttf-dejavu' 'openal' 'libgl' 'gtk-update-icon-cache' + 'libaccounts-glib' 'libibus' 'libblockdev' 'libgexiv2' + 'desktop-file-utils' 'xdg-utils' 'zenity' 'python-gobject') +makedepends=('dos2unix' 'git' 'unzip' 'msbuild') +provides=('openra-sa') +options=(!strip) +source=("git+${url}.git" +"openra-sa" +"openra-sa.appdata.xml" +"openra-sa.desktop") +md5sums=('SKIP' + 'f13888474aeeb31acbe019d10d3d644c' + '842adc4e572c5902400de97eb8a61b8c' + 'a7eee25f52a1f9ab362fee6e6e669842') + +pkgver() { + cd $srcdir/OpenSA + no=$(git rev-list --count HEAD) + hash=$(git log | head -n 1 | cut -d ' ' -f 2 | head -c 7) + printf "${no}.git.${hash}" +} + +prepare() { + cd $srcdir/OpenSA + dos2unix *.md + printf "Success in converting docs...\n" +} + +build() { + cd $srcdir/OpenSA + make + make version VERSION="${pkgver}" + printf "Success in setting version\n" +} + +package() { + cd $srcdir/OpenSA + mkdir -p $pkgdir/usr/{lib/${_pkgname}/mods,bin,share/pixmaps,share/doc/packages/${_pkgname},share/applications,share/appdata} + install -dm775 $pkgdir/var/games/${_pkgname} + cp -r engine/* $pkgdir/usr/lib/${_pkgname} + cp -r mods/{sa,sacontent} $pkgdir/usr/lib/${_pkgname}/mods + cp -r mod.config $pkgdir/usr/lib/${_pkgname} + sed -i -e "s|./engine\"|/usr/lib/${_pkgname}\"|g" $pkgdir/usr/lib/${_pkgname}/mod.config + cp -r engine/mods/{common,modcontent} $pkgdir/usr/lib/${_pkgname}/mods + cp -r engine/bin/{*.dll*,*.so} $pkgdir/usr/lib/${_pkgname} + cp -r engine/{glsl,lua,AUTHORS,COPYING,'global mix database.dat',VERSION} $pkgdir/usr/lib/${_pkgname} + install -Dm755 $srcdir/${_pkgname} $pkgdir/usr/bin/${_pkgname} + cp -r $srcdir/../${_pkgname}.appdata.xml $pkgdir/usr/share/appdata/${_pkgname}.appdata.xml + cp -r README.md $pkgdir/usr/share/doc/packages/${_pkgname}/README.md + install -Dm644 $srcdir/${_pkgname}.desktop $pkgdir/usr/share/applications/${_pkgname}.desktop + mkdir -p $pkgdir/usr/share/icons/hicolor/{16x16,32x32,48x48,64x64,128x128,256x256,512x512}/apps + for length in 16 32 48 64 128 256 512; do + size="${length}x${length}" + cp packaging/artwork/icon_${size}.png "$pkgdir/usr/share/icons/hicolor/${size}/apps/${pkgname}.png" + done + install -Dm644 packaging/artwork/icon_512x512.png ${pkgdir}/usr/share/pixmaps/${pkgname}.png + rm -rf $pkgdir/usr/lib/${_pkgname}/*{.txt,nunit,.yml,.xslt,.cmd,.md,Mono,Makefile,.sh,sln.*,Test,.mdb,.pdb,.ps1,.AS,packaging,thirdparty,engines,OpenRA.Mods}* + rm -rf $pkgdir/usr/lib/${_pkgname}/{mods/{all,ra,cnc,d2k,ts},OpenRA.Mods.*,OpenRA.Platforms.Default,OpenRA.Server,OpenRA.Game,OpenRA.Utility,Settings.StyleCop} +} diff --git a/openra-sa b/openra-sa new file mode 100755 index 000000000000..b7e79307d7ef --- /dev/null +++ b/openra-sa @@ -0,0 +1,52 @@ +#!/bin/sh + +set -e +command -v mono >/dev/null 2>&1 || { echo >&2 "The OpenRA mod SDK requires mono."; exit 1; } +if command -v python3 >/dev/null 2>&1; then + PYTHON="python3" +else + command -v python >/dev/null 2>&1 || { echo >&2 "The OpenRA mod SDK requires python."; exit 1; } + PYTHON="python" +fi + +require_variables() { + missing="" + for i in "$@"; do + eval check="\$$i" + [ -z "${check}" ] && missing="${missing} ${i}\n" + done + if [ ! -z "${missing}" ]; then + echo "Required mod.config variables are missing:\n${missing}Repair your mod.config (or user.config) and try again." + exit 1 + fi +} + +TEMPLATE_LAUNCHER=$(${PYTHON} -c "import os; print(os.path.realpath('$0'))") +PRELIM_MOD_ID=$(echo $TEMPLATE_LAUNCHER | cut -d '/' -f 4) +TEMPLATE_ROOT=/usr/lib/$PRELIM_MOD_ID +MOD_SEARCH_PATHS="${TEMPLATE_ROOT}/mods,./mods" + +# shellcheck source=mod.config +. "${TEMPLATE_ROOT}/mod.config" + +if [ -f "${TEMPLATE_ROOT}/user.config" ]; then + # shellcheck source=user.config + . "${TEMPLATE_ROOT}/user.config" +fi + +require_variables "MOD_ID" "ENGINE_VERSION" "ENGINE_DIRECTORY" +cd "${TEMPLATE_ROOT}" +if [ ! -f "${ENGINE_DIRECTORY}/bin/OpenRA.dll" ] || [ "$(cat "${ENGINE_DIRECTORY}/VERSION")" != "${ENGINE_VERSION}" ]; then + echo "Required engine files not found." + echo "Run \`make\` in the mod directory to fetch and build the required files, then try again."; + exit 1 +fi + +if command -v mono >/dev/null 2>&1 && [ "$(grep -c .NETCoreApp,Version= ${ENGINE_DIRECTORY}/bin/OpenRA.dll)" = "0" ]; then + RUNTIME_LAUNCHER="mono --debug" +else + RUNTIME_LAUNCHER="dotnet" +fi + +cd "${ENGINE_DIRECTORY}" +${RUNTIME_LAUNCHER} bin/OpenRA.dll Engine.EngineDir=".." Engine.LaunchPath="${TEMPLATE_LAUNCHER}" "Engine.ModSearchPaths=${MOD_SEARCH_PATHS}" Game.Mod="${MOD_ID}" "$@" diff --git a/openra-sa.appdata.xml b/openra-sa.appdata.xml new file mode 100755 index 000000000000..08d70a747b73 --- /dev/null +++ b/openra-sa.appdata.xml @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="UTF-8"?> +<component type="desktop"> + <id>openra-ca.desktop</id> + <metadata_license>CC0-1.0</metadata_license> + <project_license>GPL-3.0</project_license> + <name>OpenRA - Swarm Assault</name> + <summary>An open-source Swarm Assault remake using the OpenRA game engine.</summary> + <description> + <p> + OpenRA Swarm Assault is a project that attempts to remake the original Swarm Assault game from 1999 using the OpenRA engine. + </p> + <p> + This game requires additional game assets, with the essential ones being freely downloadable, but they are still subject to copyright. + </p> + </description> + <url type="homepage">https://github.com/Dzierzan/OpenSA</url> + <update_contact>https://github.com/Dzierzan</update_contact> + <content_rating type="oars-1.0"> + <content_attribute id="violence-cartoon">none</content_attribute> + <content_attribute id="violence-fantasy">none</content_attribute> + <content_attribute id="violence-realistic">moderate</content_attribute> + <content_attribute id="violence-bloodshed">moderate</content_attribute> + <content_attribute id="violence-sexual">none</content_attribute> + <content_attribute id="drugs-alcohol">none</content_attribute> + content_attribute id="drugs-narcotics">none</content_attribute> + <content_attribute id="drugs-tobacco">none</content_attribute> + <content_attribute id="sex-nudity">none</content_attribute> + <content_attribute id="sex-themes">none</content_attribute> + <content_attribute id="language-profanity">mild</content_attribute> + <content_attribute id="language-humor">mild</content_attribute> + <content_attribute id="language-discrimination">none</content_attribute> + <content_attribute id="social-chat">intense</content_attribute> + <content_attribute id="social-info">none</content_attribute> + <content_attribute id="social-audio">none</content_attribute> + <content_attribute id="social-location">none</content_attribute> + <content_attribute id="social-contacts">none</content_attribute> + <content_attribute id="money-purchasing">none</content_attribute> + <content_attribute id="money-gambling">none</content_attribute> + </content_rating> +</component> diff --git a/openra-sa.desktop b/openra-sa.desktop new file mode 100755 index 000000000000..63653900b2ab --- /dev/null +++ b/openra-sa.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Type=Application +Version=1.0 +Name=OpenRA - Swarm Assault +GenericName=Real Time Strategy Game +GenericName[de]=Echtzeit-Strategiespiel +Comment=Mod of OpenRA that reimagines the 1999 Swarm Assault game +Icon=openra-ca +Exec=openra-ca +Terminal=false +Categories=Game;StrategyGame;X-RTS;X-RealTimeStrategy;X-RealTimeStrategyGame; diff --git a/openra-sa.install b/openra-sa.install new file mode 100755 index 000000000000..a00383965830 --- /dev/null +++ b/openra-sa.install @@ -0,0 +1,18 @@ +post_upgrade() { + update-desktop-database -q + gtk-update-icon-cache -q -t -f usr/share/icons/hicolor +} + +post_install() { + echo "If the game doesn't run, try using the Cg renderer ~/.openra/settings.yaml like so:" + echo "Graphics:" + echo " Renderer: Cg" + echo "Be careful to only use one indenting tab with 8 shift width." + post_upgrade +} + +post_remove() { + echo "openra downloaded data files to ~/.openra/Content and you might want" + echo "to delete those." + post_upgrade +} |