summaryrefslogtreecommitdiff
path: root/games-strategy/outerspace
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /games-strategy/outerspace
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'games-strategy/outerspace')
-rw-r--r--games-strategy/outerspace/Manifest6
-rw-r--r--games-strategy/outerspace/files/outerspace9
-rw-r--r--games-strategy/outerspace/files/outerspace-0.5.68-setup.patch83
-rw-r--r--games-strategy/outerspace/metadata.xml20
-rw-r--r--games-strategy/outerspace/outerspace-0.5.68-r1.ebuild72
5 files changed, 190 insertions, 0 deletions
diff --git a/games-strategy/outerspace/Manifest b/games-strategy/outerspace/Manifest
new file mode 100644
index 000000000000..feafc91522f6
--- /dev/null
+++ b/games-strategy/outerspace/Manifest
@@ -0,0 +1,6 @@
+AUX outerspace 169 BLAKE2B 432402aa2fa9b80c2a5d22f22e5858dd6d618145d37abe54736d7a23fbfcc20dbe6e8c8e2427a4e561960b338def2bd0c28f37f5fdcfcbfc1983b740f3f2a1f3 SHA512 fd20d9de084fef162eec391d68dc973df566b62fd2254fe8ad92c91b073341ca17f96844e0cae28592a7a4d05cc6e3744d66cd37dce9b70319678b91db8d8a1b
+AUX outerspace-0.5.68-setup.patch 1652 BLAKE2B 60d940c6c6c8c95452288abc13873aceff6d8cd6dd1216a61ca02de5bd1e834365fd2bbc0d6dd38500b1e2b764ccd1d629831871b40d2d45c708460939d23120 SHA512 b3d7f604724e6990436808dc62214a55325278cc04006fbe8438a213e772615a46b2969f88b03364332154af3cf996c7bdce05cc40dd5d24938bf6b537f9884b
+DIST outerspace-0.5.68.tar.gz 2249703 BLAKE2B 16b8c2d6c4e0516867d9a07a2762112da39f9a1074dffad9a9a3c343dd75662cba74d50f2a028b530013f320ffd7481317d061a3ebb449e9acf2f41bf56312a3 SHA512 dc2cbebf16fefabcc3356efb496766b90a5eabbf218f085fdc83cf956ca9503e99ef3154e0905c2432a3bf7caabd1f2af585a43397ba368581cd66546fcddc6b
+DIST outerspace_0.5.68-0ubuntu1_all.deb 2634188 BLAKE2B fd1667ae130e9a0ed603c369e9751d0b83414f20dd06c2f7e9941e2c465bdad0ff050ca41a928906bc5cc755eb05c0a5dfa18a8c35c868650c3fec6cf2e4f1f8 SHA512 9520cf1207a59497d6253b42bc34d580f9b805cf4ae55a5c921082e965892aa67921c4624ea94a5145c911dc2b24a1cca2806c06770ef8d1ded10855fb42666c
+EBUILD outerspace-0.5.68-r1.ebuild 1607 BLAKE2B 0f40261cf16d047c90c3bc49591b5e510c282eb2267e591ad027f80a537f33bc1f579bac8c2f179a230b7d9d2bcecdb31ccc9873f0c40b705b21d988a3a78666 SHA512 778a9c0879b0c03ff527f6918f0e8bf8ebaec479aa02d5a43fe791e6c73d8daa912dc37cd19f35d2e36191b7fb2f5155fcdbc03a432dd5b8969d92f177247ae7
+MISC metadata.xml 831 BLAKE2B 2eb39d75eca89288ab8dcb4ff274891d62e4c9a9540ceb2a2f887e2743c28c4d04b8692a093e24c0226b88d2dbe938b268ef17de4974e5c127422ed387bac6a7 SHA512 d607343f2cc56162b694e28523cf256339a306b03bcca9c0148c59700491249a9acc6cfc193467cbdd04d8ea9bb564816747276143b3e4e1bf3dc7deab480d1e
diff --git a/games-strategy/outerspace/files/outerspace b/games-strategy/outerspace/files/outerspace
new file mode 100644
index 000000000000..2a6bbe26dafb
--- /dev/null
+++ b/games-strategy/outerspace/files/outerspace
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+mkdir -p ~/.outerspace
+cd ~/.outerspace || exit 1
+
+ln -sf "@GENTOO_LIBDIR@"/{osc.py,lib,libsrvr} .
+ln -sf "@GENTOO_DATADIR@"/res .
+
+exec python osc.py "$@"
diff --git a/games-strategy/outerspace/files/outerspace-0.5.68-setup.patch b/games-strategy/outerspace/files/outerspace-0.5.68-setup.patch
new file mode 100644
index 000000000000..c95852dca3dc
--- /dev/null
+++ b/games-strategy/outerspace/files/outerspace-0.5.68-setup.patch
@@ -0,0 +1,83 @@
+--- a/setup.py
++++ b/setup.py
+@@ -42,12 +42,7 @@
+
+ # collect data files
+ data_files = []
+-data_files.append(
+- (
+- ".",
+- ["../ChangeLog.txt", "../COPYING", "../README", "../README_CZ"]
+- )
+-)
++
+
+ # resources
+ for root, dirs, files in os.walk('res'):
+@@ -57,16 +52,6 @@
+ pass
+ if files:
+ data_files.append((root, [os.path.join(root, file) for file in files]))
+-
+-data_files.append(
+- (
+- "res/techspec",
+- [
+- "../server/lib/ige/ospace/Rules/techs.spf",
+- "../server/lib/ige/ospace/Rules/Tech.spf",
+- ]
+- )
+-)
+
+ if havePy2Exe:
+ data_files.append((".", ["../updater/update.exe"]))
+@@ -114,10 +99,3 @@
+ **extraArgs
+ )
+
+-# cleanup
+-def onerror(func, path, err):
+- if func is os.remove:
+- os.chmod(path, stat.S_IWRITE)
+- os.remove(path)
+-
+-shutil.rmtree("libsrvr", onerror = onerror)
+--- a/osc.py
++++ b/osc.py
+@@ -23,12 +23,36 @@
+ # tweak PYTHONPATH
+ import sys
+ import os
++import errno
+ sys.path.insert(0, "lib")
+
+ for item in ("libsrvr", "../server/lib"):
+ if os.path.exists(item):
+ sys.path.insert(0, item)
+ break
++
++userdir=os.path.expanduser("~/.outerspace")
++resdir=os.path.join(userdir, "res")
++rootresdir="@GENTOO_DATADIR@/res"
++
++if not (os.path.isdir(userdir)):
++ try:
++ os.makedirs(userdir)
++ except:
++ sys.exit("unable to create %s" % userdir)
++
++try:
++ os.symlink(rootresdir, resdir)
++except OSError, e:
++ if e.errno == errno.EEXIST:
++ os.remove(resdir)
++ os.symlink(rootresdir, resdir)
++
++try:
++ os.chdir(userdir)
++except:
++ sys.exit("unable to cd into %s" % userdir)
++
+
+ #configure gc
+ #import gc
diff --git a/games-strategy/outerspace/metadata.xml b/games-strategy/outerspace/metadata.xml
new file mode 100644
index 000000000000..8868ccd042b9
--- /dev/null
+++ b/games-strategy/outerspace/metadata.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+ </maintainer>
+ <longdescription lang="en">
+Outer Space is an on-line strategy game which takes place in the dangerous
+universe. You will become powerful commander of many stars, planets, and great
+fleets and will struggle for survival with other commanders.
+
+Outer Space communicates with the server in the same way as your browser, but
+you will need a special client to play it. Using this client you can create an
+account on the server and you can start to explore the world of the Outer Space.
+</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">ospace</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/games-strategy/outerspace/outerspace-0.5.68-r1.ebuild b/games-strategy/outerspace/outerspace-0.5.68-r1.ebuild
new file mode 100644
index 000000000000..a7d5680c16a5
--- /dev/null
+++ b/games-strategy/outerspace/outerspace-0.5.68-r1.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+PYTHON_COMPAT=( python2_7 )
+
+inherit desktop gnome2-utils distutils-r1
+
+MY_PN="${PN/outerspace/Outer Space}"
+DESCRIPTION="On-line strategy game taking place in the dangerous universe"
+HOMEPAGE="https://www.ospace.net/ https://sourceforge.net/projects/ospace/"
+SRC_URI="mirror://sourceforge/ospace/Client/${PV}/Outer%20Space-${PV}.tar.gz -> ${P}.tar.gz
+ mirror://sourceforge/ospace/Client/${PV}/outerspace_${PV}-0ubuntu1_all.deb"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND=">=dev-python/pygame-1.7"
+DEPEND=""
+
+S="${WORKDIR}/${MY_PN}-${PV}"
+
+src_unpack() {
+ default
+ unpack ./data.tar.gz
+}
+
+python_install() {
+ distutils-r1_python_install \
+ --install-scripts="/usr/bin" \
+ --install-data="/usr/share/${PN}" \
+ --install-lib="$(python_get_sitedir)"
+
+ # source tarball is missing files
+ # get them from ubuntu.deb
+ insinto "$(python_get_sitedir)"/ige/ospace/Rules
+ doins "${WORKDIR}"/usr/share/games/outerspace/libsrvr/ige/ospace/Rules/{Tech,techs}.spf
+}
+
+src_prepare() {
+ default
+
+ # fix setup script
+ # rework python start script to avoid shell-wrapper script
+ eapply "${FILESDIR}"/${P}-setup.patch
+
+ sed -i\
+ -e "s:@GENTOO_DATADIR@:/usr/share/${PN}:" \
+ osc.py || die "sed failed"
+
+ distutils-r1_src_prepare
+}
+
+src_install() {
+ distutils-r1_src_install
+ newicon res/logo-login.png ${PN}.png
+ make_desktop_entry "osc.py" "${MY_PN}"
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+}