summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--games-simulation/kerbal-space-program/Manifest1
-rw-r--r--games-simulation/kerbal-space-program/kerbal-space-program-2.13.0.16.ebuild73
2 files changed, 74 insertions, 0 deletions
diff --git a/games-simulation/kerbal-space-program/Manifest b/games-simulation/kerbal-space-program/Manifest
new file mode 100644
index 0000000..299bf4d
--- /dev/null
+++ b/games-simulation/kerbal-space-program/Manifest
@@ -0,0 +1 @@
+DIST gog_kerbal_space_program_2.13.0.16.sh 753707390 SHA256 02e6af35feaa103f3e3c38e6cb44a6e7e293bc4f599c6fee7f63cc8a17e05518 SHA512 0b49207ad0e0159aee350c8bbc0dffa3b511789f3a5c808b6e5dfb8a7ac228edcc9eced907513eceb245f3d6eb0632a2ead653d91ad1810eaedc2e7233047d51 WHIRLPOOL 3c5f1935488b279665265508f6591b69fad83b5deaebd32dc41d38ff9c953acba82f556ac48e8eb58ac0880c7367211f4a6463cc6cb53f7913cb898f2f7fd41a
diff --git a/games-simulation/kerbal-space-program/kerbal-space-program-2.13.0.16.ebuild b/games-simulation/kerbal-space-program/kerbal-space-program-2.13.0.16.ebuild
new file mode 100644
index 0000000..fada004
--- /dev/null
+++ b/games-simulation/kerbal-space-program/kerbal-space-program-2.13.0.16.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils
+
+DESCRIPTION="A combination of platformer and role playing game"
+HOMEPAGE="http://www.unepicgame.com/"
+SRC_URI="gog_${P//-/_}.sh"
+
+RESTRICT="fetch strip"
+LICENSE="EULA"
+
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+DEPEND="app-arch/unzip"
+RDEPEND="
+"
+QA_DIR="usr/share/${PF}"
+QA_PREBUILT="${QA_DIR}/Launcher.x86 ${QA_DIR}/KSP.x86 ${QA_DIR}/Launcher_Data/Mono/x86/libmono.so ${QA_DIR}/KSP_Data/Mono/x86/libmono.so"
+
+pkg_nofetch() {
+ einfo ""
+ einfo "Please buy and download \"${A}\" from corresponding shop (HumbleBundle or GOG)"
+ einfo "and move/link it to \"${DISTDIR}\""
+ einfo "You can get more info on ${HOMEPAGE}"
+ einfo ""
+}
+
+src_unpack() {
+ einfo "\nUnpacking files. This can take several minutes.\n"
+
+ mkdir "${WORKDIR}/tmp" || die "mkdir 'tmp' failed"
+ cd "${WORKDIR}/tmp" || die "cd 'tmp' failed"
+
+ unzip -q "${DISTDIR}/${A}"
+
+ local gpath="data/noarch/game"
+
+ mv "${gpath}" "${S}"
+
+ cd "${S}" && rm -r "${WORKDIR}/tmp"
+}
+
+src_install() {
+ local arch="${ARCH//amd/x86_}"
+ local dir="/usr/share/${PF}"
+ insinto "${dir}"
+ exeinto "${dir}"
+
+ doins -r .
+ doexe {KSP,Launcher}.x86{,_64} || die "Failed to install executables"
+
+ newicon "Launcher_Data/Resources/UnityPlayer.png" "${PN}.png"
+ make_wrapper "${PN}" "./KSP.${arch}" "${dir}"
+ make_wrapper "${PN}-launcher" "./Launcher.${arch}" "${dir}"
+ make_desktop_entry "${PN}" "Kerbal Space Program" "${PN}" || die "make_desktop_entry failed"
+ make_desktop_entry "${PN}-launcher" "Kerbal Space Program: Launcher" "${PN}" || die "make_desktop_entry failed"
+}
+
+pkg_postinst() {
+ einfo "Just in case: neither of these DRM-free versions sees Steam's savegames."
+ einfo "In case, if you played in Steam and moved to DRM-free version,"
+ einfo "consider copying files from:"
+ einfo "~/.local/share/Steam/userdata/[your_user_id]/233980/remote/save"
+ einfo "to:"
+ einfo "~/.local/share/Unepic/unepic/save"
+ einfo "and vice versa if you want to import DRM-free saves to Steam."
+ einfo "Although, it can cause sudden game freezes..."
+}