summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrenton Horne2019-03-23 21:23:09 +1000
committerBrenton Horne2019-03-23 21:23:09 +1000
commitf73be348c1ae3a584e35c1cfb5ff23e4238bf85e (patch)
tree036046c14b7b5bc73513d01ddb00b8e5fa7edce5
downloadaur-f73be348c1ae3a584e35c1cfb5ff23e4238bf85e.tar.gz
Initial commit
-rw-r--r--.SRCINFO36
-rw-r--r--.gitignore5
-rwxr-xr-xPKGBUILD63
-rwxr-xr-xopenra-d219
-rwxr-xr-xopenra-d2.appdata.xml40
-rwxr-xr-xopenra-d2.changes31
-rwxr-xr-xopenra-d2.desktop11
-rwxr-xr-xopenra-d2.install19
8 files changed, 224 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..b468ee5d730
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,36 @@
+pkgbase = openra-d2-git
+ pkgdesc = A Dune II-inspired mod of OpenRA
+ pkgver = 134.git.69a4aa7
+ pkgrel = 1
+ url = https://www.openra.net
+ install = openra-d2.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-d2
+ options = !strip
+ source = git+https://github.com/OpenRA/d2.git
+ source = openra-d2
+ source = openra-d2.appdata.xml
+ source = openra-d2.desktop
+ md5sums = SKIP
+ md5sums = f883c23d492f8c930aca5ad2c3624cc2
+ md5sums = e6c82533bf669122fd26f2d60ed97a6f
+ md5sums = ad2adc9f6f5f756492371b38c996d44c
+
+pkgname = openra-d2-git
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000000..483b2dc1ebf
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,5 @@
+*.xz
+d2
+pkg
+src
+*.gz
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100755
index 00000000000..ecf2a92676a
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,63 @@
+# Maintainer: Brenton Horne <brentonhorne77 at gmail dot com>
+
+pkgname=openra-d2-git
+_pkgname=openra-d2
+pkgver=134.git.69a4aa7
+pkgrel=1
+pkgdesc="A Dune II-inspired mod of OpenRA"
+arch=('any')
+url="https://www.openra.net"
+license=('GPL3')
+install=openra-d2.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-d2')
+options=(!strip)
+source=("git+https://github.com/OpenRA/d2.git"
+"openra-d2"
+"openra-d2.appdata.xml"
+"openra-d2.desktop")
+md5sums=('SKIP'
+ 'f883c23d492f8c930aca5ad2c3624cc2'
+ 'e6c82533bf669122fd26f2d60ed97a6f'
+ 'ad2adc9f6f5f756492371b38c996d44c')
+
+pkgver() {
+ cd $srcdir/d2
+ 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/d2
+ dos2unix *.md
+ chmod +x *.sh
+ make version VERSION="Master commit ${pkgver}"
+}
+
+build() {
+ cd $srcdir/d2
+ make
+}
+
+package() {
+ cd $srcdir/d2
+ mkdir -p $pkgdir/usr/{lib/${_pkgname}/mods,bin,share/pixmaps,share/doc/packages/openra-d2,share/applications,share/appdata}
+ install -dm775 $pkgdir/var/games/openra-d2
+ 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-d2
+ cp -r mods/d2 $pkgdir/usr/lib/${_pkgname}/mods
+ cp -r engine/mods/{common,modcontent,d2k,cnc,ra} $pkgdir/usr/lib/${_pkgname}/mods
+ install -Dm755 $srcdir/openra-d2 $pkgdir/usr/bin/openra-d2
+ cp -r $srcdir/openra-d2.appdata.xml $pkgdir/usr/share/appdata/openra-d2.appdata.xml
+ cp -r README.md $pkgdir/usr/share/doc/packages/${_pkgname}/README.md
+ ln -sf /usr/lib/${_pkgname}/mods/d2/icon.png ${pkgdir}/usr/share/pixmaps/${_pkgname}.png
+ install -Dm644 $srcdir/openra-d2.desktop $pkgdir/usr/share/applications/openra-d2.desktop
+# mkdir -p $pkgdir/usr/share/icons/hicolor/{16x16,32x32,48x48,64x64,134x134,256x256}/apps
+# for size in 16 32 48 64 134 256; do
+# size="${size}x${size}"
+# cp packaging/linux/mod_${size}.png "$pkgdir/usr/share/icons/hicolor/${size}/apps/openra-d2.png"
+# done
+ rm $pkgdir/usr/lib/${_pkgname}/*.sh
+}
diff --git a/openra-d2 b/openra-d2
new file mode 100755
index 00000000000..1b6916ef5f8
--- /dev/null
+++ b/openra-d2
@@ -0,0 +1,19 @@
+#!/bin/sh
+cd "/usr/lib/openra-d2"
+
+# Run the game
+mono --debug OpenRA.Game.exe Game.Mod=d2 Engine.LaunchPath="/usr/bin/openra-d2" "Engine.ModSearchPaths=/usr/lib/openra-d2/mods" "$@"
+
+# Show a crash dialog if something went wrong
+if [ $? != 0 ] && [ $? != 1 ]; then
+ ERROR_MESSAGE="Dune II 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 "Dune II" --text "${ERROR_MESSAGE}" 2> /dev/null
+ elif command -v kdialog > /dev/null; then
+ kdialog --title "Dune II" --error "${ERROR_MESSAGE}"
+ else
+ printf "${ERROR_MESSAGE}\n"
+ fi
+ exit 1
+fi
+
diff --git a/openra-d2.appdata.xml b/openra-d2.appdata.xml
new file mode 100755
index 00000000000..3b9b75ce0c7
--- /dev/null
+++ b/openra-d2.appdata.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<component type="desktop">
+ <id>openra-d2.desktop</id>
+ <metadata_license>CC0-1.0</metadata_license>
+ <project_license>GPL-3.0</project_license>
+ <name>OpenRA - Dune II</name>
+ <summary>An open-source remake of the original Dune II game</summary>
+ <description>
+ <p>
+ OpenRA Dune II is a project that recreates and modernizes the Dune II real time strategy game, using the open-source OpenRA game engine.
+ </p>
+ <p>
+ OpenRA Dune II is free in itself, but it requires assets from the original Dune II game, which are not free.
+ </p>
+ </description>
+ <url type="homepage">https://github.com/OpenRA/d2</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-d2.changes b/openra-d2.changes
new file mode 100755
index 00000000000..506d8da82d5
--- /dev/null
+++ b/openra-d2.changes
@@ -0,0 +1,31 @@
+-------------------------------------------------------------------
+Sat Jul 21 22:06:28 UTC 2018 - brentonhorne77@gmail.com
+
+- Rm \# from version string, as it makes the rest of the comment
+ invisible.
+- Previous commit bumped to commit 113.
+
+-------------------------------------------------------------------
+Wed Jul 18 13:23:31 UTC 2018 - brentonhorne77@gmail.com
+
+- Initial commit, version 108. Largely copied from my other mods
+ packaging files.
+- Fixing build errors associated with this mod, but not others,
+ like:
+ * The fetch-geoip-db script needed to be removed from the engine
+ Makefile as it was trying to download the geoip mmdb.gz file.
+ * python dependency was required for make to run issue-free,
+ although it does not seem strictly necessary of the package to
+ build.
+ * The mods included in the engine itself needed to be included
+ for some reason, I could understand this for the d2k mod as
+ the README says this, but the ra and cnc mods are surprising.
+- %check macro exits with an error:
+ https://gist.github.com/143890eaf1ff04bd15aa49e468c71a85 so I
+ commented it out.
+- Fixing RPMLint warnings:
+ * Dropping explicit lua51-libs dependency, RPM figures that one
+ out
+ * Escaping # in make version line, as it was interpreting it as a
+ comment.
+ * fdupes needed the -s argument to fix file duplicates warning.
diff --git a/openra-d2.desktop b/openra-d2.desktop
new file mode 100755
index 00000000000..2e82067ebef
--- /dev/null
+++ b/openra-d2.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Type=Application
+Version=1.0
+Name=OpenRA - Dune 2
+GenericName=Real Time Strategy Game
+GenericName[de]=Echtzeit-Strategiespiel
+Comment=Reimagining of the Dune 2 game
+Icon=openra-d2
+Exec=openra-d2
+Terminal=false
+Categories=Game;StrategyGame;X-RTS;X-RealTimeStrategy;X-RealTimeStrategyGame;
diff --git a/openra-d2.install b/openra-d2.install
new file mode 100755
index 00000000000..e929193a34c
--- /dev/null
+++ b/openra-d2.install
@@ -0,0 +1,19 @@
+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."
+ echo "Original game assets are required in order to play this game."
+ post_upgrade
+}
+
+post_remove() {
+ echo "openra downloaded data files to ~/.openra/Content and you might want"
+ echo "to delete those."
+ post_upgrade
+}