From ca2d7033cf2bae9ca528889190d8507e09367be9 Mon Sep 17 00:00:00 2001 From: Julian Ospald Date: Sat, 14 Oct 2017 16:41:56 +0200 Subject: [PATCH] games-strategy/openra: bump to 20171014 --- .../openra/openra-20171014.exheres-0 | 54 ++++++++++++++++ .../games-strategy/openra/openra-build.exlib | 62 ++++++++++++------- 2 files changed, 95 insertions(+), 21 deletions(-) create mode 100644 packages/games-strategy/openra/openra-20171014.exheres-0 diff --git a/packages/games-strategy/openra/openra-20171014.exheres-0 b/packages/games-strategy/openra/openra-20171014.exheres-0 new file mode 100644 index 00000000..7962eb07 --- /dev/null +++ b/packages/games-strategy/openra/openra-20171014.exheres-0 @@ -0,0 +1,54 @@ +# Copyright 2015-2017 Julian Ospald +# Distributed under the terms of the GNU General Public License v2 + +require lua [ whitelist="5.1" multibuild=false ] +require github [ user=OpenRA project=OpenRA tag=release-${PV} ] +require openra-build + +## this is a massive amount of 3rd party deps that would otherwise +## be fetched during build time +NG_SRC="https://nuget.org/api/v2/package" +# 3rd party deps +StyleCopPlus_MSBuild="${NG_SRC}/StyleCopPlus.MSBuild/4.7.49.5 -> StyleCopPlus_MSBuild-4.7.49.5.zip" +StyleCop_MSBuild="${NG_SRC}/StyleCop.MSBuild/4.7.49.0 -> StyleCop_MSBuild-4.7.49.0.zip" +SharpZipLib="${NG_SRC}/SharpZipLib/0.86.0 -> SharpZipLib-0.86.0.zip" +MaxMind_Db="${NG_SRC}/MaxMind.Db/2.0.0 -> MaxMind_Db-2.0.0.zip" +RestSharp="${NG_SRC}/RestSharp/105.2.3 -> RestSharp-105.2.3.zip" +SharpFont="${NG_SRC}/SharpFont/4.0.1 -> SharpFont-4.0.1.zip" +NUnit="${NG_SRC}/NUnit/3.0.1 -> NUnit-3.0.1.zip" +NUnit_Console="${NG_SRC}/NUnit.Console/3.0.1 -> NUnit_Console-3.0.1.zip" +Open_Nat="${NG_SRC}/Open.NAT/2.1.0 -> Open_Nat-2.1.0.zip" +FuzzyLogicLibrary="${NG_SRC}/FuzzyLogicLibrary/1.2.0 -> FuzzyLogicLibrary-1.2.0.zip" +SDL2CS="https://github.com/OpenRA/SDL2-CS/releases/download/20161223/SDL2-CS.dll -> SDL2-CS.dll.20161223" +Eluant="https://github.com/OpenRA/Eluant/releases/download/20140425/Eluant.dll -> Eluant.dll.20140425" +SmartIrc4net="${NG_SRC}/SmartIrc4net/0.4.5.1 -> SmartIrc4net-0.4.5.1.zip" +# unfortunately, this may randomly change +GEO_IP_DB="http://geolite.maxmind.com/download/geoip/database/GeoLite2-Country.mmdb.gz -> GeoLite2-Country-2015-10-18.mmdb.gz" +OpenAL_CS="https://github.com/OpenRA/OpenAL-CS/releases/download/20151227/OpenAL-CS.dll -> OpenAL-CS-20151227.dll" +OpenAL_CS_config="https://github.com/OpenRA/OpenAL-CS/releases/download/20151227/OpenAL-CS.dll.config -> OpenAL-CS-20151227.dll.config" +rix0rrr_BeaconLib="${NG_SRC}/rix0rrr.BeaconLib/1.0.1 -> rix0rrr_BeaconLib-1.0.1.zip" + + +DOWNLOADS="${DOWNLOADS} +${StyleCopPlus_MSBuild} +${StyleCop_MSBuild} +${SharpZipLib} +${MaxMind_Db} +${RestSharp} +${SharpFont} +${NUnit} +${NUnit_Console} +${Open_Nat} +${FuzzyLogicLibrary} +${SDL2CS} +${Eluant} +${SmartIrc4net} +${GEO_IP_DB} +${OpenAL_CS} +${OpenAL_CS_config} +${rix0rrr_BeaconLib} +" + +SLOT="release" +PLATFORMS="~amd64 ~x86" + diff --git a/packages/games-strategy/openra/openra-build.exlib b/packages/games-strategy/openra/openra-build.exlib index 04c9eb0d..caf1253a 100644 --- a/packages/games-strategy/openra/openra-build.exlib +++ b/packages/games-strategy/openra/openra-build.exlib @@ -40,15 +40,30 @@ DEPENDENCIES=" WORK=${WORKBASE}/OpenRA-${SLOT}-${PV} MV_FILES=( - /usr/share/applications/openra.desktop - /usr/share/applications/openra-replays.desktop - /usr/share/applications/openra-join-servers.desktop - /usr/share/icons/hicolor/128x128/apps/openra.png - /usr/share/icons/hicolor/16x16/apps/openra.png - /usr/share/icons/hicolor/32x32/apps/openra.png - /usr/share/icons/hicolor/48x48/apps/openra.png - /usr/share/icons/hicolor/64x64/apps/openra.png - /usr/share/icons/hicolor/scalable/apps/openra.svg + /usr/share/applications/openra-cnc.desktop + /usr/share/applications/openra-ra.desktop + /usr/share/applications/openra-d2k.desktop + /usr/share/applications/openra-cnc-join-servers.desktop + /usr/share/applications/openra-ra-join-servers.desktop + /usr/share/applications/openra-d2k-join-servers.desktop + + /usr/share/icons/hicolor/128x128/apps/openra-cnc.png + /usr/share/icons/hicolor/16x16/apps/openra-cnc.png + /usr/share/icons/hicolor/32x32/apps/openra-cnc.png + /usr/share/icons/hicolor/48x48/apps/openra-cnc.png + /usr/share/icons/hicolor/64x64/apps/openra-cnc.png + /usr/share/icons/hicolor/scalable/apps/openra-cnc.svg + + /usr/share/icons/hicolor/16x16/apps/openra-ra.png + /usr/share/icons/hicolor/32x32/apps/openra-ra.png + /usr/share/icons/hicolor/48x48/apps/openra-ra.png + /usr/share/icons/hicolor/64x64/apps/openra-ra.png + /usr/share/icons/hicolor/scalable/apps/openra-ra.svg + + /usr/share/icons/hicolor/16x16/apps/openra-d2k.png + /usr/share/icons/hicolor/32x32/apps/openra-d2k.png + /usr/share/icons/hicolor/48x48/apps/openra-d2k.png + /usr/share/icons/hicolor/64x64/apps/openra-d2k.png ) openra-build_src_unpack() { @@ -97,7 +112,7 @@ openra-build_src_prepare() { } openra-build_src_compile() { - emake VERSION="${SLOT}-${PV}" core tools + emake VERSION="${SLOT}-${PV}" core } openra-build_src_install() { @@ -108,7 +123,7 @@ openra-build_src_install() { gameinstalldir="/usr/$(exhost --target)/libexec/${PN}-${SLOT}" \ VERSION="${SLOT}-${PV}" \ DESTDIR="${IMAGE}" \ - install-all install-linux-scripts install-linux-mime \ + install install-linux-scripts install-linux-mime \ install-linux-icons install-linux-desktop install-linux-appdata exeinto /usr/$(exhost --target)/libexec/${PN}-${SLOT} @@ -116,17 +131,17 @@ openra-build_src_install() { # fix desktop files edo sed -i \ - -e "s#^Name=.*#Name=OpenRA (${SLOT})#" \ - -e "/^Exec=/s#openra#openra-${SLOT}#" \ - -e "s#^Icon=.*#Icon=openra-${SLOT}#" \ + -e "/^Name=/s#\$# (${SLOT})#" \ + -e "/^Exec=/s#\$#-${SLOT}#" \ + -e "/^Icon=/s#\$#-${SLOT}#" \ "${IMAGE%/}"/usr/share/applications/*.desktop # make sure slots don't have file collisions local i - for i in /usr/$(exhost --target)/bin/openra \ - /usr/$(exhost --target)/bin/openra-server \ + for i in /usr/$(exhost --target)/bin/openra-{ra,cnc,d2k} \ + /usr/$(exhost --target)/bin/openra-{ra,cnc,d2k}-server \ /usr/share/mime/packages/openra.xml \ - /usr/share/appdata/openra.appdata.xml + /usr/share/appdata/openra-{ra,cnc,d2k}.appdata.xml do edo mv "${IMAGE%/}"${i} "${IMAGE%/}"${i}-${SLOT} done @@ -138,11 +153,16 @@ openra-build_src_install() { # set up alternatives alternatives_for _openra ${SLOT} ${PV} \ - /usr/$(exhost --target)/bin/openra{,-${SLOT}} \ - /usr/$(exhost --target)/bin/openra-server{,-${SLOT}} \ - /usr/share/appdata/openra.appdata.xml{,-${SLOT}} \ + /usr/$(exhost --target)/bin/openra-cnc{,-${SLOT}} \ + /usr/$(exhost --target)/bin/openra-cnc-server{,-${SLOT}} \ + /usr/$(exhost --target)/bin/openra-ra{,-${SLOT}} \ + /usr/$(exhost --target)/bin/openra-ra-server{,-${SLOT}} \ + /usr/$(exhost --target)/bin/openra-d2k{,-${SLOT}} \ + /usr/$(exhost --target)/bin/openra-d2k-server{,-${SLOT}} \ + /usr/share/appdata/openra-cnc.appdata.xml{,-${SLOT}} \ + /usr/share/appdata/openra-ra.appdata.xml{,-${SLOT}} \ + /usr/share/appdata/openra-d2k.appdata.xml{,-${SLOT}} \ /usr/share/mime/packages/openra.xml{,-${SLOT}} - } openra-build_pkg_postinst() {