summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrenton Horne2019-03-23 22:35:49 +1000
committerBrenton Horne2019-03-23 22:35:49 +1000
commit7d312695182f7d4cada7358dd3eb7d2bee7ca152 (patch)
tree086d34b406f956d0869cc709dbff652e4df54a1f
downloadaur-7d312695182f7d4cada7358dd3eb7d2bee7ca152.tar.gz
Initial commit
-rw-r--r--.SRCINFO36
-rw-r--r--.gitignore5
-rwxr-xr-xPKGBUILD59
-rwxr-xr-xopenra-gen19
-rwxr-xr-xopenra-gen.appdata.xml37
-rwxr-xr-xopenra-gen.desktop11
-rwxr-xr-xopenra-gen.install18
7 files changed, 185 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..8cc68ab0a173
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,36 @@
+pkgbase = openra-gen-git
+ pkgdesc = A Command & Conquer: Generals-inspired mod of OpenRA
+ pkgver = 1160.git.e448241
+ pkgrel = 1
+ url = https://github.com/MustaphaTR/Generals-Alpha
+ install = openra-gen.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-gen
+ options = !strip
+ source = git+https://github.com/MustaphaTR/Generals-Alpha.git
+ source = openra-gen
+ source = openra-gen.appdata.xml
+ source = openra-gen.desktop
+ md5sums = SKIP
+ md5sums = 8974b3935a56e8fd957ee5dc9404595c
+ md5sums = d3c7476b79a6b07522e597f05eaa8ae7
+ md5sums = 40267bdbbcde926b3524e99cce966592
+
+pkgname = openra-gen-git
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..d452e2f873b6
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,5 @@
+*.xz
+Generals-Alpha
+pkg
+src
+*.gz
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100755
index 000000000000..a41c099693d4
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,59 @@
+pkgname=openra-gen-git
+_pkgname=openra-gen
+pkgver=1160.git.e448241
+pkgrel=1
+pkgdesc="A Command & Conquer: Generals-inspired mod of OpenRA"
+arch=('any')
+url="https://github.com/MustaphaTR/Generals-Alpha"
+license=('GPL3')
+install=${_pkgname}.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=("${_pkgname}")
+options=(!strip)
+source=("git+$url.git"
+"${_pkgname}"
+"${_pkgname}.appdata.xml"
+"${_pkgname}.desktop")
+md5sums=('SKIP'
+ '8974b3935a56e8fd957ee5dc9404595c'
+ 'd3c7476b79a6b07522e597f05eaa8ae7'
+ '40267bdbbcde926b3524e99cce966592')
+
+pkgver() {
+ cd $srcdir/Generals-Alpha
+ 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/Generals-Alpha
+ dos2unix *.md
+ make version VERSION="Master commit #${pkgver}"
+}
+
+build() {
+ cd $srcdir/Generals-Alpha
+ make
+}
+
+package() {
+ cd $srcdir/Generals-Alpha
+ 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 generals-alpha-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/${_pkgname}
+ cp -r mods/gen $pkgdir/usr/lib/${_pkgname}/mods
+ cp -r generals-alpha-engine/mods/{common,modcontent} $pkgdir/usr/lib/${_pkgname}/mods
+ 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 mods/gen/icon.png $pkgdir/usr/share/pixmaps/${_pkgname}.png
+ for i in 16x16 32x32 48x48 64x64 128x128 256x256
+ do
+ install -Dm644 packaging/linux/mod_$i.png ${pkgdir}/usr/share/icons/hicolor/$i/apps/${_pkgname}.png
+ done
+ install -Dm644 $srcdir/${_pkgname}.desktop $pkgdir/usr/share/applications/${_pkgname}.desktop
+ rm $pkgdir/usr/lib/${_pkgname}/*.sh
+}
diff --git a/openra-gen b/openra-gen
new file mode 100755
index 000000000000..133ee71abf79
--- /dev/null
+++ b/openra-gen
@@ -0,0 +1,19 @@
+#!/bin/sh
+cd "/usr/lib/openra-gen"
+
+# Run the game
+mono --debug OpenRA.Game.exe Game.Mod=gen Engine.LaunchPath="/usr/bin/openra-gen" "Engine.ModSearchPaths=/usr/lib/openra-gen/mods" "$@"
+
+# Show a crash dialog if something went wrong
+if [ $? != 0 ] && [ $? != 1 ]; then
+ ERROR_MESSAGE="Generals Alpha 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 "Generals Alpha" --text "${ERROR_MESSAGE}" 2> /dev/null
+ elif command -v kdialog > /dev/null; then
+ kdialog --title "Generals Alpha" --error "${ERROR_MESSAGE}"
+ else
+ printf "${ERROR_MESSAGE}\n"
+ fi
+ exit 1
+fi
+
diff --git a/openra-gen.appdata.xml b/openra-gen.appdata.xml
new file mode 100755
index 000000000000..1ec92142e644
--- /dev/null
+++ b/openra-gen.appdata.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<component type="desktop">
+ <id>openra-gen.desktop</id>
+ <metadata_license>CC0-1.0</metadata_license>
+ <project_license>GPL-3.0</project_license>
+ <name>OpenRA - Generals Alpha</name>
+ <summary>An open-source remake of the original Command &amp; Conquer: Generals game</summary>
+ <description>
+ <p>
+ OpenRA Dark Reign is a project that recreates and modernizes the classic Command &amp; Conquer: Generals real time strategy game.
+ </p>
+ </description>
+ <url type="homepage">https://github.com/MustaphaTR/Generals-Alpha</url>
+ <update_contact>mustafaoyunda37@gmail.com</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-gen.desktop b/openra-gen.desktop
new file mode 100755
index 000000000000..6b22865263e0
--- /dev/null
+++ b/openra-gen.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Type=Application
+Version=1.0
+Name=OpenRA - Generals Alpha
+GenericName=Real Time Strategy Game
+GenericName[de]=Echtzeit-Strategiespiel
+Comment=Reimagining of the Command & Conquer: Generals game
+Icon=openra-gen
+Exec=openra-gen
+Terminal=false
+Categories=Game;StrategyGame;X-RTS;X-RealTimeStrategy;X-RealTimeStrategyGame;
diff --git a/openra-gen.install b/openra-gen.install
new file mode 100755
index 000000000000..a00383965830
--- /dev/null
+++ b/openra-gen.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
+}