summaryrefslogtreecommitdiff
path: root/games-strategy/outerspace
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /games-strategy/outerspace
reinit the tree, so we can have metadata
Diffstat (limited to 'games-strategy/outerspace')
-rw-r--r--games-strategy/outerspace/Manifest8
-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.ebuild80
5 files changed, 200 insertions, 0 deletions
diff --git a/games-strategy/outerspace/Manifest b/games-strategy/outerspace/Manifest
new file mode 100644
index 000000000000..e895e751089f
--- /dev/null
+++ b/games-strategy/outerspace/Manifest
@@ -0,0 +1,8 @@
+AUX outerspace 169 SHA256 e6b6bad8a9ea3e85c13a282e8eb9ed1c71649d79a3309c5f7a053a2727028a7b SHA512 fd20d9de084fef162eec391d68dc973df566b62fd2254fe8ad92c91b073341ca17f96844e0cae28592a7a4d05cc6e3744d66cd37dce9b70319678b91db8d8a1b WHIRLPOOL 70e466dc0ea3f8cf75dbed11a6848f86b3ad0abd57cd9077f0b9b0e3cf00a1a1087bc5536036b877a5442460f3cd25e4198c6ec1b11ef6235f08aee204ccd1d0
+AUX outerspace-0.5.68-setup.patch 1644 SHA256 77ca068e9f9c658c9ede7ccfec008933c589e4be8026a071f4ddb51b7caacccc SHA512 3b583e3fbb0a2a26ee18edd6734d2adac07401376c5a96213f6fddaac18a0df6128007dc9947a77a0c9e12fafea368acff8cb5eef13d55206530bf55b28640c2 WHIRLPOOL 3a653464f2f273832aa36114a77e01e8cd2a116eec6d9447b5e883e3a4d4d6a88e4b96f3da8de55d47f7ab1985dd28a17b2774e792fdebc84476c2eb3612eebf
+DIST outerspace-0.5.68.tar.gz 2249703 SHA256 6ca1ab9f9954821631d150ada07143f84f01eb9eb7773d1656121f657870be01 SHA512 dc2cbebf16fefabcc3356efb496766b90a5eabbf218f085fdc83cf956ca9503e99ef3154e0905c2432a3bf7caabd1f2af585a43397ba368581cd66546fcddc6b WHIRLPOOL cd72366bed75a5eb0a74dfaa8003b47cfa6b5f743b41c427135e965b44f9552bb88aa48203c987fe355824698019d0fe994983c2cfa751679315391fd90aa8f6
+DIST outerspace_0.5.68-0ubuntu1_all.deb 2634188 SHA256 c750f5ab5b124477f59e419f5146548231a48ee3a695a0b7a923628b836e1661 SHA512 9520cf1207a59497d6253b42bc34d580f9b805cf4ae55a5c921082e965892aa67921c4624ea94a5145c911dc2b24a1cca2806c06770ef8d1ded10855fb42666c WHIRLPOOL 137d44d414c3572a7dbbdf16556c499a7132739407407f3f71ee32af2f3671a9c7ec6ae853122cabc466d8963df090fe8b3bfb9881bd643bb498c992304e0e3b
+EBUILD outerspace-0.5.68.ebuild 1716 SHA256 d06e58361bb7bb250d4a6f30576f85be622aace7f358e18fe0a60c6ff2d893a6 SHA512 6d1b22cd4aa57115b8eb9299193e51dced62a4c152b113f221a735c83073879817a61681fbbd4c9013a2db96207e5161b08134d09cbaddbf37f00cf00b9d7b2b WHIRLPOOL 4cdfd7a92f23b5b53d852a31e23437c250450be34c67bad1610eca3cca8422a5cfc77fa0f2cbc56bd18768365d58bd083d2d7fc90b34f9cc93a6b84dd2937304
+MISC ChangeLog 2503 SHA256 02e379a08ac442e2afd4f2c3f10ff70338adb0c3b70faf74081d868d4349f2e9 SHA512 81cf0feca6ff2996efee4deb638c5356bc0d3b1fc166def61963af433eaf123b44f3517a7bd72e007dbf20266100ce7822c3dfd19f9b5f9d86501e65aebb21d0 WHIRLPOOL dbd91d328762aa588fac6a1463f820def90de93f69059c61f3d6f9a8074ecfa325dfb2e5656f6885d93e3f52a7cefbf1ed77788591e53ef8c76fccb39ba1eb20
+MISC ChangeLog-2015 3227 SHA256 9a38e6fe121cfd8b9de40ca4fc4d864f4846cb6a7844804799b86ee2a3fbbb8d SHA512 4eaad39954ba1abc04aa8b6b38caf0fa7990b794876e229a48980db59cdc3cfa33e7e76a32d5e55050ef789de2ffee69d9c57110f85733bd18554f8a5791c028 WHIRLPOOL 02d0973f1ab9f349fe0498f8542f42d9fa57cbdf581b358fa0659f9f5c6a56ed291e52a7d243398d35cf57a8bb17887490c961a9a879bcbd163066909cee9c81
+MISC metadata.xml 831 SHA256 ffdcf418196f918e992c1c001a1923beb14c113691e70a7013f3be93231a8589 SHA512 d607343f2cc56162b694e28523cf256339a306b03bcca9c0148c59700491249a9acc6cfc193467cbdd04d8ea9bb564816747276143b3e4e1bf3dc7deab480d1e WHIRLPOOL 422bb0785e6801bc678b7db3923587911529378a5467729c7ec747c0f71f15740da8bbdf56d7ba620fbea299c167b5bc2112e3a1551cfbbe21064a7a3582fec1
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..202c53bc7ee1
--- /dev/null
+++ b/games-strategy/outerspace/files/outerspace-0.5.68-setup.patch
@@ -0,0 +1,83 @@
+--- setup.py
++++ 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)
+--- osc.py
++++ 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.ebuild b/games-strategy/outerspace/outerspace-0.5.68.ebuild
new file mode 100644
index 000000000000..91e73afb61fc
--- /dev/null
+++ b/games-strategy/outerspace/outerspace-0.5.68.ebuild
@@ -0,0 +1,80 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+PYTHON_COMPAT=( python2_7 )
+
+inherit eutils gnome2-utils distutils-r1 games
+
+MY_PN=${PN/outerspace/Outer Space}
+DESCRIPTION="on-line strategy game taking place in the dangerous universe"
+HOMEPAGE="http://www.ospace.net/"
+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"
+
+S=${WORKDIR}/${MY_PN}-${PV}
+
+src_unpack() {
+ default
+ unpack ./data.tar.gz
+}
+
+python_install() {
+ distutils-r1_python_install \
+ --install-scripts="${GAMES_BINDIR}" \
+ --install-data="${GAMES_DATADIR}/${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() {
+ # fix setup script
+ # rework python start script to avoid shell-wrapper script
+ epatch "${FILESDIR}"/${P}-setup.patch
+
+ sed -i\
+ -e "s:@GENTOO_DATADIR@:${GAMES_DATADIR}/${PN}:" \
+ osc.py || die "sed failed"
+
+ distutils-r1_src_prepare
+}
+
+src_compile() {
+ distutils-r1_src_compile
+}
+
+src_install() {
+ distutils-r1_src_install
+ newicon -s 48 res/icon48.png ${PN}.png
+ make_desktop_entry "osc.py" "${MY_PN}"
+ prepgamesdirs
+}
+
+pkg_preinst() {
+ games_pkg_preinst
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+ gnome2_icon_cache_update
+
+ einfo
+ einfo "start the game via 'osc.py'"
+ einfo
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+}