diff options
author | Brenton Horne | 2019-03-23 21:26:52 +1000 |
---|---|---|
committer | Brenton Horne | 2019-03-23 21:26:52 +1000 |
commit | 89c4d3e9044c1a4eefa45d4921d0c4345d141fb7 (patch) | |
tree | e1b24347c2179dfec0eb794caecd97f10d4d5160 | |
download | aur-89c4d3e9044c1a4eefa45d4921d0c4345d141fb7.tar.gz |
Initial commit
-rw-r--r-- | .SRCINFO | 36 | ||||
-rw-r--r-- | .gitignore | 5 | ||||
-rwxr-xr-x | PKGBUILD | 63 | ||||
-rwxr-xr-x | openra-ra2 | 19 | ||||
-rwxr-xr-x | openra-ra2.appdata.xml | 46 | ||||
-rwxr-xr-x | openra-ra2.changes | 8 | ||||
-rwxr-xr-x | openra-ra2.desktop | 11 | ||||
-rwxr-xr-x | openra-ra2.install | 13 |
8 files changed, 201 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..8caa2c77701e --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,36 @@ +pkgbase = openra-ra2-git + pkgdesc = A Red Alert 2-inspired mod of OpenRA + pkgver = 898.git.4c966a9 + pkgrel = 1 + url = https://www.openra.net + install = openra-ra2.install + arch = any + license = GPL3 + makedepends = dos2unix + makedepends = git + makedepends = unzip + depends = mono + depends = ttf-dejavu + depends = openal + depends = libgl + depends = freetype2 + depends = sdl2 + depends = lua51 + depends = hicolor-icon-theme + depends = gtk-update-icon-cache + depends = desktop-file-utils + depends = xdg-utils + depends = zenity + provides = openra-ra2 + options = !strip + source = git+https://github.com/OpenRA/ra2.git + source = openra-ra2 + source = openra-ra2.appdata.xml + source = openra-ra2.desktop + md5sums = SKIP + md5sums = 868ef09a2ba5fd6907164fb740576c7e + md5sums = 267b503ba80690ca939db776186da260 + md5sums = 882b9d629dde1ecbcd2098a2e0b96b1b + +pkgname = openra-ra2-git + diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..32efaf713e3e --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +*.xz +ra2 +pkg +src +*.gz diff --git a/PKGBUILD b/PKGBUILD new file mode 100755 index 000000000000..fa352a2d228e --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,63 @@ +# Maintainer: Brenton Horne <brentonhorne77 at gmail dot com> + +pkgname=openra-ra2-git +_pkgname=openra-ra2 +pkgver=898.git.4c966a9 +pkgrel=1 +pkgdesc="A Red Alert 2-inspired mod of OpenRA" +arch=('any') +url="https://www.openra.net" +license=('GPL3') +install=openra-ra2.install +depends=('mono' 'ttf-dejavu' 'openal' 'libgl' 'freetype2' 'sdl2' 'lua51' 'hicolor-icon-theme' 'gtk-update-icon-cache' + 'desktop-file-utils' 'xdg-utils' 'zenity') +makedepends=('dos2unix' 'git' 'unzip') +provides=('openra-ra2') +options=(!strip) +source=("git+https://github.com/OpenRA/ra2.git" +"openra-ra2" +"openra-ra2.appdata.xml" +"openra-ra2.desktop") +md5sums=('SKIP' + '868ef09a2ba5fd6907164fb740576c7e' + '267b503ba80690ca939db776186da260' + '882b9d629dde1ecbcd2098a2e0b96b1b') + +pkgver() { + cd $srcdir/ra2 + 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/ra2 + dos2unix *.md + chmod +x *.sh + make version VERSION="Master commit ${pkgver}" +} + +build() { + cd $srcdir/ra2 + make +} + +package() { + cd $srcdir/ra2 + mkdir -p $pkgdir/usr/{lib/${_pkgname}/mods,bin,share/pixmaps,share/doc/packages/openra-ra2,share/applications,share/appdata} + install -dm775 $pkgdir/var/games/openra-ra2 + cp -r engine/{glsl,lua,AUTHORS,COPYING,Eluant.dll*,FuzzyLogicLibrary.dll,GeoLite2-Country.mmdb.gz,'global mix database.dat',ICSharpCode.SharpZipLib.dll,launch-dedicated.sh,launch-game.sh,MaxMind.Db.dll,OpenAL-CS.dll,OpenAL-CS.dll.config,Open.Nat.dll,OpenRA.Game.exe,OpenRA.Platforms.Default.dll,OpenRA.Server.exe,OpenRA.Utility.exe,rix0rrr.BeaconLib.dll,SDL2-CS.dll,SDL2-CS.dll.config,SharpFont.dll,SharpFont.dll.config,VERSION} $pkgdir/usr/lib/openra-ra2 + cp -r mods/ra2 $pkgdir/usr/lib/${_pkgname}/mods + cp -r engine/mods/{common,modcontent} $pkgdir/usr/lib/${_pkgname}/mods + install -Dm755 $srcdir/openra-ra2 $pkgdir/usr/bin/openra-ra2 + cp -r $srcdir/openra-ra2.appdata.xml $pkgdir/usr/share/appdata/openra-ra2.appdata.xml + cp -r README.md $pkgdir/usr/share/doc/packages/${_pkgname}/README.md + ln -sf /usr/lib/${_pkgname}/mods/ra2/icon.png ${pkgdir}/usr/share/pixmaps/${_pkgname}.png + install -Dm644 $srcdir/openra-ra2.desktop $pkgdir/usr/share/applications/openra-ra2.desktop + mkdir -p $pkgdir/usr/share/icons/hicolor/{16x16,32x32,48x48,64x64,128x128,256x256}/apps + for size in 16 32 48 64 128 256; do + size="${size}x${size}" + cp packaging/linux/mod_${size}.png "$pkgdir/usr/share/icons/hicolor/${size}/apps/${pkgname}.png" + done + rm $pkgdir/usr/lib/${_pkgname}/*.sh +} diff --git a/openra-ra2 b/openra-ra2 new file mode 100755 index 000000000000..163ca5fd6131 --- /dev/null +++ b/openra-ra2 @@ -0,0 +1,19 @@ +#!/bin/sh +cd "/usr/lib/openra-ra2" + +# Run the game +mono --debug OpenRA.Game.exe Game.Mod=ra2 Engine.LaunchPath="/usr/bin/openra-ra2" "Engine.ModSearchPaths=/usr/lib/openra-ra2/mods" "$@" + +# Show a crash dialog if something went wrong +if [ $? != 0 ] && [ $? != 1 ]; then + ERROR_MESSAGE="OpenRA Red Alert 2 has encountered a fatal error.\nPlease refer to the crash logs and FAQ for more information.\n\nLog files are located in ~/.openra/Logs\nThe FAQ is available at http://wiki.openra.net/FAQ" + if command -v zenity > /dev/null; then + zenity --no-wrap --error --title "OpenRA Red Alert 2" --text "${ERROR_MESSAGE}" 2> /dev/null + elif command -v kdialog > /dev/null; then + kdialog --title "OpenRA Red Alert 2" --error "${ERROR_MESSAGE}" + else + printf "${ERROR_MESSAGE}\n" + fi + exit 1 +fi + diff --git a/openra-ra2.appdata.xml b/openra-ra2.appdata.xml new file mode 100755 index 000000000000..bab35edafff7 --- /dev/null +++ b/openra-ra2.appdata.xml @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="UTF-8"?> +<component type="desktop"> + <id>openra-ra2.desktop</id> + <metadata_license>CC0-1.0</metadata_license> + <project_license>GPL-3.0</project_license> + <name>OpenRA - Red Alert 2</name> + <summary>An open-source remake of the original Red Alert 2 game</summary> + <description> + <p> + OpenRA Red Alert 2 is a project that recreates and modernizes the Red Alert 2 real time strategy game, using the open-source OpenRA game engine. + </p> + <p> + OpenRA Red Alert 2 is free in itself, but it requires assets from the original Red Alert 2 game, which are not free. + </p> + </description> + <screenshots> + <screenshot> + <image>https://fusion809.github.io/images/Games/OpenRA-RA2-20180514-commit-796.png</image> + <caption>Red Alert 2 Mod</caption> + </screenshot> + </screenshots> + <url type="homepage">https://github.com/OpenRA/ra2</url> + <update_contact>paul_at_chote.net</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-ra2.changes b/openra-ra2.changes new file mode 100755 index 000000000000..02abed9a40de --- /dev/null +++ b/openra-ra2.changes @@ -0,0 +1,8 @@ +------------------------------------------------------------------- +Sun Aug 26 08:50:28 UTC 2018 - brentonhorne77@gmail.com + +- Minor macro substitutions, attempts to make it compatible with + CentOS and Fedora too. Local builds seem to confirm it works, + although for CentOS I needed to wipebinaries for Mono and thereby + trigger a rebuild due to conflicts between the old mono-web + (4.2.1) and the newer (4.6.x) mono-core. diff --git a/openra-ra2.desktop b/openra-ra2.desktop new file mode 100755 index 000000000000..2186094eb68e --- /dev/null +++ b/openra-ra2.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Type=Application +Version=1.0 +Name=OpenRA - Red Alert 2 +GenericName=Real Time Strategy Game +GenericName[de]=Echtzeit-Strategiespiel +Comment=Reimagining of the Red Alert 2 game +Icon=openra-ra2 +Exec=openra-ra2 +Terminal=false +Categories=Game;StrategyGame;X-RTS;X-RealTimeStrategy;X-RealTimeStrategyGame; diff --git a/openra-ra2.install b/openra-ra2.install new file mode 100755 index 000000000000..7e527147da6b --- /dev/null +++ b/openra-ra2.install @@ -0,0 +1,13 @@ +post_upgrade() { + update-desktop-database -q + gtk-update-icon-cache -q -t -f usr/share/icons/hicolor +} + +post_install() { + echo "You will need the original game assets to play this game, see https://github.com/OpenRA/ra2/wiki for details\n" + post_upgrade +} + +post_remove() { + post_upgrade +} |