diff options
Diffstat (limited to 'games-server/tpserver-cpp')
-rw-r--r-- | games-server/tpserver-cpp/Manifest | 7 | ||||
-rw-r--r-- | games-server/tpserver-cpp/files/tpserver-cpp-0.6.2-stdint.patch | 78 | ||||
-rw-r--r-- | games-server/tpserver-cpp/files/tpserver-cpp.confd | 1 | ||||
-rw-r--r-- | games-server/tpserver-cpp/files/tpserver-cpp.initd | 50 | ||||
-rw-r--r-- | games-server/tpserver-cpp/files/tpserver.conf | 44 | ||||
-rw-r--r-- | games-server/tpserver-cpp/metadata.xml | 8 | ||||
-rw-r--r-- | games-server/tpserver-cpp/tpserver-cpp-0.6.2.ebuild | 60 |
7 files changed, 248 insertions, 0 deletions
diff --git a/games-server/tpserver-cpp/Manifest b/games-server/tpserver-cpp/Manifest new file mode 100644 index 0000000..591de94 --- /dev/null +++ b/games-server/tpserver-cpp/Manifest @@ -0,0 +1,7 @@ +AUX tpserver-cpp-0.6.2-stdint.patch 2764 RMD160 ff4aff2ed7a07463c5a01d5ab757fceebbbc974e SHA1 f40ecc737fdb48464331b1e880d8bbcbd816fbbd SHA256 f965cc591aa3581241ba7eaeb64ab1b079d3689d2efe5f4c381c68c621c33c99 +AUX tpserver-cpp.confd 47 RMD160 04f48fe7d448e19bc0ef5f9c5013831c118e7764 SHA1 ba28d47524d72030084dc7dc109db958b3e802cc SHA256 1060f09307bdec9e4fcd257e383254ac1fa04dd444f18fe6438137838efd7b78 +AUX tpserver-cpp.initd 1143 RMD160 e3e0434e50741ddf9d16bc5c1c254b6d6df11f4c SHA1 2e7c7970a324fe3dabc46b57a7a420ba77bbbdee SHA256 b8311cb5e9eddd166f14b7348112e34c9445a8653bab5ae918bb2ba8bd5c53eb +AUX tpserver.conf 1001 RMD160 faf1d5eb7eaa83e5a30e7b4d50165149588ef35a SHA1 4b41e33d791811a8624fad8ee812ec6f0c107e8d SHA256 3675a1ee1cf4ae467b521d71653d75f179b7f5536590df34d01d223099aa3361 +DIST tpserver-cpp-0.6.2.tar.gz 1060478 RMD160 366e1f308c9d358623d54426048fcf1deceb8580 SHA1 ebb5008d1532de480f2d466702e76a453ac05a49 SHA256 7790749f1a31e4ded708cc02833a672d6586bc79bf6d4bb4146e7459357c9172 +EBUILD tpserver-cpp-0.6.2.ebuild 1189 RMD160 c19914b24f53debf8c2dbf9a260ad76e319a433c SHA1 5e25786577282b02a0322d8c37d3a53f88ddbfe3 SHA256 aeca2f101a0d56336445b8b6027b8c3d0194a067514bf9411102eb808ddcf740 +MISC metadata.xml 230 RMD160 65b1879f0881b046ac536157a1b73ae8e08a8a23 SHA1 14b143872462f3e5df4ac14bb0e872f1dc762ef0 SHA256 0ef810189a3667f1a7527037968f2b88fae043d5efcaaaa27e33287da96783b6 diff --git a/games-server/tpserver-cpp/files/tpserver-cpp-0.6.2-stdint.patch b/games-server/tpserver-cpp/files/tpserver-cpp-0.6.2-stdint.patch new file mode 100644 index 0000000..0f74924 --- /dev/null +++ b/games-server/tpserver-cpp/files/tpserver-cpp-0.6.2-stdint.patch @@ -0,0 +1,78 @@ +diff -ruN tpserver-cpp-0.6.2.old/tpserver//advertiser.h tpserver-cpp-0.6.2/tpserver//advertiser.h +--- tpserver-cpp-0.6.2.old/tpserver//advertiser.h 2008-08-25 01:29:23.000000000 -0400 ++++ tpserver-cpp-0.6.2/tpserver//advertiser.h 2012-02-22 15:50:35.000000000 -0500 +@@ -20,6 +20,7 @@ + #ifndef ADVERTISER_H + #define ADVERTISER_H + ++#include <stdint.h> + #include <map> + #include <set> + #include <string> +diff -ruN tpserver-cpp-0.6.2.old/tpserver//board.h tpserver-cpp-0.6.2/tpserver//board.h +--- tpserver-cpp-0.6.2.old/tpserver//board.h 2009-01-24 03:11:30.000000000 -0500 ++++ tpserver-cpp-0.6.2/tpserver//board.h 2012-02-22 15:40:29.000000000 -0500 +@@ -21,6 +21,7 @@ + * + */ + ++#include <stdint.h> + #include <string> + + class Message; +diff -ruN tpserver-cpp-0.6.2.old/tpserver//command.h tpserver-cpp-0.6.2/tpserver//command.h +--- tpserver-cpp-0.6.2.old/tpserver//command.h 2008-09-01 01:27:21.000000000 -0400 ++++ tpserver-cpp-0.6.2/tpserver//command.h 2012-02-22 15:47:52.000000000 -0500 +@@ -20,6 +20,7 @@ + * + */ + ++#include <stdint.h> + #include <list> + #include <string> + +diff -ruN tpserver-cpp-0.6.2.old/tpserver//persistence.h tpserver-cpp-0.6.2/tpserver//persistence.h +--- tpserver-cpp-0.6.2.old/tpserver//persistence.h 2008-08-25 01:29:23.000000000 -0400 ++++ tpserver-cpp-0.6.2/tpserver//persistence.h 2012-02-22 15:37:52.000000000 -0500 +@@ -20,6 +20,7 @@ + * + */ + ++#include <stdint.h> + #include <string> + #include <list> + #include <set> +diff -ruN tpserver-cpp-0.6.2.old/tpserver//resourcedescription.h tpserver-cpp-0.6.2/tpserver//resourcedescription.h +--- tpserver-cpp-0.6.2.old/tpserver//resourcedescription.h 2008-08-25 01:29:23.000000000 -0400 ++++ tpserver-cpp-0.6.2/tpserver//resourcedescription.h 2012-02-22 15:45:22.000000000 -0500 +@@ -20,6 +20,7 @@ + #ifndef RESOURCEDESCRIPTION_H + #define RESOURCEDESCRIPTION_H + ++#include <stdint.h> + #include <string> + + class Frame; +diff -ruN tpserver-cpp-0.6.2.old/tpserver//settings.cpp tpserver-cpp-0.6.2/tpserver//settings.cpp +--- tpserver-cpp-0.6.2.old/tpserver//settings.cpp 2009-01-24 03:11:30.000000000 -0500 ++++ tpserver-cpp-0.6.2/tpserver//settings.cpp 2012-02-22 15:32:48.000000000 -0500 +@@ -22,6 +22,7 @@ + #include <iostream> + #include <fstream> + #include <string.h> ++#include <stdint.h> + + #ifdef HAVE_CONFIG_H + #include "config.h" +diff -ruN tpserver-cpp-0.6.2.old/tpserver//tlsmanager.h tpserver-cpp-0.6.2/tpserver//tlsmanager.h +--- tpserver-cpp-0.6.2.old/tpserver//tlsmanager.h 2008-08-25 01:29:23.000000000 -0400 ++++ tpserver-cpp-0.6.2/tpserver//tlsmanager.h 2012-02-22 15:28:03.000000000 -0500 +@@ -20,6 +20,8 @@ + * + */ + ++#include <stdint.h> ++ + typedef struct gnutls_certificate_credentials_st *gnutls_certificate_credentials_t; + typedef struct gnutls_dh_params_int* gnutls_dh_params_t; + diff --git a/games-server/tpserver-cpp/files/tpserver-cpp.confd b/games-server/tpserver-cpp/files/tpserver-cpp.confd new file mode 100644 index 0000000..0ceff94 --- /dev/null +++ b/games-server/tpserver-cpp/files/tpserver-cpp.confd @@ -0,0 +1 @@ +PIDFILE=/var/run/tpserver-cpp/tpserver-cpp.pid diff --git a/games-server/tpserver-cpp/files/tpserver-cpp.initd b/games-server/tpserver-cpp/files/tpserver-cpp.initd new file mode 100644 index 0000000..7a355dd --- /dev/null +++ b/games-server/tpserver-cpp/files/tpserver-cpp.initd @@ -0,0 +1,50 @@ +#!/sbin/runscript +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +# Default location if not specified in /etc/conf.d/tpserver-cpp +PIDFILE=${PIDFILE:-/var/run/tpserver-cpp/tpserver-cpp.pid} + +depend() { + need net +} + +checkconfig() { + local conf="/etc/tpserver-cpp/tpserver.conf" + + if [ -e "${conf}" ] ; then + if [ -n "$(find /etc/tpserver-cpp -maxdepth 1 -name tpserver.conf -perm +0004)" ] ; then + eerror "${conf} must not be world-readable. Run e.g.:" + eerror " chmod 640 ${conf}" + eerror " chown root:games ${conf}" + return 1 + fi + else + eerror "/etc/tpserver-cpp/tpserver.conf is needed to run tpserver-cpp" + eerror "There is a sample file in /etc/tpserver-cpp/" + return 1 + fi +} + +start() { + checkconfig || return 1 + ebegin "Starting ${SVCNAME}" + start-stop-daemon \ + --start \ + --chuid tpserver-cpp \ + --exec /usr/games/bin/tpserver-cpp \ + --name tpserver-cpp \ + --pidfile "${PIDFILE}" \ + -- -pid="${PIDFILE}" + eend $? +} + +stop() { + ebegin "Stopping ${SVCNAME}" + start-stop-daemon \ + --stop \ + --signal TERM \ + --pidfile "${PIDFILE}" + eend $? +} diff --git a/games-server/tpserver-cpp/files/tpserver.conf b/games-server/tpserver-cpp/files/tpserver.conf new file mode 100644 index 0000000..c4b0d37 --- /dev/null +++ b/games-server/tpserver-cpp/files/tpserver.conf @@ -0,0 +1,44 @@ +##AI Comp sample conf for tpserver-cpp + +#server wide settings +#logging and output +log_colour = yes +log_console = yes +log_level = 0 +#see the sample.conf file for more logging options. + +#Can set the server_name, admin_email, game_comment, and metaserver_fake_* +# as in the sample.conf file + +#Game +add_players = yes +autoadd_players = yes +ruleset = minisec +tpscheme = auto # use the first one found, can set to either tpmzscheme or tpguile + +#persistence = tpmysql # uncomment if you want mysql persistence, +## also see the modules/persistence/mysql/sample.conf for mysql settings. + + + +#Load and start the game +game_load = yes +game_start = yes +network_start = yes + +#set turn length (in seconds) +turn_length = 60 + +#network settings +#see sample.conf for options + + +#minisec ruleset options +minisec_min_systems = 15 +minisec_max_systems = 25 +#which gives about 20 on average +minisec_min_planets = 1 +minisec_max_planets = 3 +#which gives about 2 on average + +#total planets is between 15 and 75, averaging about 40
\ No newline at end of file diff --git a/games-server/tpserver-cpp/metadata.xml b/games-server/tpserver-cpp/metadata.xml new file mode 100644 index 0000000..3510201 --- /dev/null +++ b/games-server/tpserver-cpp/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer> + <email>mavrinac@gmail.com</email> + <name>Aaron Mavrinac</name> +</maintainer> +</pkgmetadata> diff --git a/games-server/tpserver-cpp/tpserver-cpp-0.6.2.ebuild b/games-server/tpserver-cpp/tpserver-cpp-0.6.2.ebuild new file mode 100644 index 0000000..3b2c15c --- /dev/null +++ b/games-server/tpserver-cpp/tpserver-cpp-0.6.2.ebuild @@ -0,0 +1,60 @@ +# Copyright 2008-2012 Funtoo Technologies +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=3 + +inherit games + +DESCRIPTION="A C++ server for Thousand Parsec games" +HOMEPAGE="http://www.thousandparsec.net/tp/" +SRC_URI=" + mirror://sourceforge/thousandparsec/${P}.tar.gz + ${HOMEPAGE}/downloads/${PN}/${P}.tar.gz +" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="avahi gnutls mysql +tpadmin" + +DEPEND=" + dev-libs/boost + >=dev-scheme/guile-1.6 + avahi? ( >=net-dns/avahi-0.6.0 ) + gnutls? ( >=net-libs/gnutls-1.2.10 ) + mysql? ( >=dev-db/mysql-4.0 ) +" +RDEPEND="${DEPEND} + tpadmin? ( games-server/tpadmin-cpp ) +" + +PATCHES=( + "${FILESDIR}/${P}-stdint.patch" +) + +DOCS="AUTHORS ChangeLog NEWS README" + +src_configure() { + egamesconf \ + $(use_enable avahi) \ + $(use_enable gnutls) \ + $(use_with mysql) \ + || die "egamesconf failed" +} + +src_install() { + games_src_install + + newinitd "${FILESDIR}"/${PN}.initd ${PN} + newconfd "${FILESDIR}"/${PN}.confd ${PN} + keepdir /var/{cache,run}/${PN} + + dodir /etc/${PN} + insinto /etc/${PN} + insopts -m 0640 -o root -g games + doins sample.conf "${FILESDIR}"/tpserver.conf + + prepgamesdirs + gamesowners /var/{cache,run}/${PN} +} |