summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Parpart <trapni@gentoo.org>2008-10-04 07:38:26 +0000
committerChristian Parpart <trapni@gentoo.org>2008-10-04 07:38:26 +0000
commite7702c76c0ab240ed177f2e9cff940a6e7ba4718 (patch)
tree22d019b84e74c5903b760818ef76d48b7f64e95f /games-rpg
parentStable for amd64 (diff)
downloadhistorical-e7702c76c0ab240ed177f2e9cff940a6e7ba4718.tar.gz
historical-e7702c76c0ab240ed177f2e9cff940a6e7ba4718.tar.bz2
historical-e7702c76c0ab240ed177f2e9cff940a6e7ba4718.zip
initial import
Package-Manager: portage-2.2_rc11/cvs/Linux 2.6.26-gentoo x86_64
Diffstat (limited to 'games-rpg')
-rw-r--r--games-rpg/mangos/ChangeLog11
-rw-r--r--games-rpg/mangos/Manifest5
-rwxr-xr-xgames-rpg/mangos/files/9999/mangos-realmd23
-rwxr-xr-xgames-rpg/mangos/files/9999/mangos-worldd23
-rw-r--r--games-rpg/mangos/mangos-9999.ebuild120
-rw-r--r--games-rpg/mangos/metadata.xml14
6 files changed, 196 insertions, 0 deletions
diff --git a/games-rpg/mangos/ChangeLog b/games-rpg/mangos/ChangeLog
new file mode 100644
index 000000000000..1eebd2f6b5a1
--- /dev/null
+++ b/games-rpg/mangos/ChangeLog
@@ -0,0 +1,11 @@
+# ChangeLog for games-rpg/mangos
+# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/games-rpg/mangos/ChangeLog,v 1.1 2008/10/04 07:38:26 trapni Exp $
+
+*mangos-9999 (04 Oct 2008)
+
+ 04 Oct 2008; Christian Parpart <trapni@gentoo.org>
+ +files/9999/mangos-realmd, +files/9999/mangos-worldd, +metadata.xml,
+ +mangos-9999.ebuild:
+ initial import
+
diff --git a/games-rpg/mangos/Manifest b/games-rpg/mangos/Manifest
new file mode 100644
index 000000000000..ac38669c596c
--- /dev/null
+++ b/games-rpg/mangos/Manifest
@@ -0,0 +1,5 @@
+AUX 9999/mangos-realmd 712 RMD160 8f9d0d272943a6da1376d20c2bb1d36391743e69 SHA1 cb76996097c7f07b6112a74775c3f7af2bc72a7a SHA256 4b1bbbe59d70484ebd755239ae8ca470255d93e9c42c1a0ea1edae894c16f25a
+AUX 9999/mangos-worldd 668 RMD160 74d288b03e08d0adeebcb6c8fc04d1c85689b754 SHA1 3ff2537fcf83652508acba86f9b7ed9ee67011f4 SHA256 7b8426670786f6837cbfafef2d3559b407b5f7025eab70307c70cdf6136efd62
+EBUILD mangos-9999.ebuild 3380 RMD160 8adc78797f017f8dff4ebecc9273956d9483bd16 SHA1 d56c3c547fe6ecdd61e8671a4e929799c4d7241e SHA256 927e25b5dc7c374322f7e5cec557f5c1b41b92b59ae8d17b1e54541233393275
+MISC ChangeLog 398 RMD160 bb3be8b3875b8489a425e3b0ce9ea6be3afcec16 SHA1 5e53d1aed25e617905af741de8f52c10019a2e7a SHA256 1f08de6f2976f079dddbcb6be574172e8570268f6b74be5e6e86ec263eb12d63
+MISC metadata.xml 440 RMD160 2e77620a7a39f4a262407214d7b2dc3257c66793 SHA1 3ffff8c13dab3a413af8afe1f07b52b378d15c14 SHA256 3c844f9168d52e2281e8a197769d937640e3b87b58d3ead9d9723b0b78a33172
diff --git a/games-rpg/mangos/files/9999/mangos-realmd b/games-rpg/mangos/files/9999/mangos-realmd
new file mode 100755
index 000000000000..cb1dc11deffb
--- /dev/null
+++ b/games-rpg/mangos/files/9999/mangos-realmd
@@ -0,0 +1,23 @@
+#!/sbin/runscript
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/games-rpg/mangos/files/9999/mangos-realmd,v 1.1 2008/10/04 07:38:26 trapni Exp $
+
+depend() {
+ need net
+ use mysql
+}
+
+start() {
+ ebegin "Starting MaNGOS Login Server (realmd)"
+ start-stop-daemon --start --background -c mangos --exec /usr/share/mangos/bin/mangos-realmd \
+ --make-pidfile --pidfile /var/run/mangos/realm.pid -- -c /etc/mangos/realmd.conf
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping MaNGOS Login Server (realmd)"
+ start-stop-daemon --stop -c mangos --exec /usr/share/mangos/bin/mangos-realmd \
+ --pidfile /var/run/mangos/realm.pid
+ eend $?
+}
diff --git a/games-rpg/mangos/files/9999/mangos-worldd b/games-rpg/mangos/files/9999/mangos-worldd
new file mode 100755
index 000000000000..d7e6143a7d96
--- /dev/null
+++ b/games-rpg/mangos/files/9999/mangos-worldd
@@ -0,0 +1,23 @@
+#!/sbin/runscript
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/games-rpg/mangos/files/9999/mangos-worldd,v 1.1 2008/10/04 07:38:26 trapni Exp $
+
+depend() {
+ need net
+ use net
+}
+
+start() {
+ ebegin "Starting MaNGOS server"
+ start-stop-daemon --start --background -c mangos --pidfile /var/run/mangos/world.pid \
+ --make-pidfile --exec /usr/bin/mangos-worldd -- -c /etc/mangos/mangosd.conf
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping MaNGOS server"
+ start-stop-daemon --stop -c mangos --exec /usr/share/mangos/bin/mangos-worldd \
+ --pidfile /var/run/mangos/world.pid
+ eend $?
+}
diff --git a/games-rpg/mangos/mangos-9999.ebuild b/games-rpg/mangos/mangos-9999.ebuild
new file mode 100644
index 000000000000..22b1d2e6572e
--- /dev/null
+++ b/games-rpg/mangos/mangos-9999.ebuild
@@ -0,0 +1,120 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/games-rpg/mangos/mangos-9999.ebuild,v 1.1 2008/10/04 07:38:26 trapni Exp $
+
+# TODO:
+# - make use of system's zlib/zthread ebuilds instead of mangos' packaged
+# - create ebuilds for specific releases (and related patchsets, if desired)
+
+inherit eutils subversion autotools
+
+MANGOS_SVN_REPO_URI="https://mangos.svn.sourceforge.net/svnroot/mangos/trunk"
+SD2_SVN_REPO_URI="https://scriptdev2.svn.sourceforge.net/svnroot/scriptdev2"
+
+ESVN_REPO_URI="${MANGOS_SVN_REPO_URI}"
+
+DESCRIPTION="Massive Network Game Object Server"
+HOMEPAGE="http://www.mangosproject.org/"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="cli ra sd2 debug mysql postgres"
+
+RDEPEND="postgres? ( virtual/postgresql-server )
+ mysql? ( >=virtual/mysql-4.1 )
+ !mysql? ( !postgres? ( >=virtual/mysql-4.1 ) )"
+
+DEPEND="${RDEPEND}
+ >=sys-devel/gcc-3.2
+ sys-devel/make
+ sys-devel/automake
+ sys-devel/autoconf
+ dev-libs/glib
+ dev-libs/openssl"
+
+pkg_setup() {
+ if useq mysql && useq postgres; then
+ eerror "Please decide with database you want to use for this ebuild by"
+ eerror "explicitely enabling/disabling the mysql and postgres USE-flags!"
+ die "Both useflags - mysql and postgres - has been specified. Choose one of them only!"
+ fi
+ enewgroup mangos
+ enewuser mangos
+}
+
+## unpacks SD2 (ScriptDev2) into mangos workdir
+function sd2_src_unpack() {
+ S="${S}/src/bindings/ScriptDev2" ESVN_REPO_URI="${SD2_SVN_REPO_URI}" subversion_src_unpack || die
+
+ local PATCHES_DIR="${S}/src/bindings/ScriptDev2/patches"
+ local FILE=$(ls ${PATCHES_DIR} | sort -f -r | awk "NR == 1")
+
+ EPATCH_OPTS="-d ${S}" EPATCH_FORCE="yes" epatch "${PATCHES_DIR}/${FILE}" || die
+}
+
+src_unpack() {
+ subversion_src_unpack
+
+ useq sd2 && sd2_src_unpack
+
+ cd "${S}" || die
+ eautoreconf --install || die "eautoreconf failed"
+}
+
+src_compile() {
+ local myconf
+
+ if ! useq mysql && ! useq postgres; then
+ # defaulth to mysql in case nothing has been specified.
+ myconf="${myconf} --with-mysql"
+ fi
+
+ econf \
+ --with-gnu-ld \
+ ${myconf} \
+ --sysconfdir=/etc/mangos \
+ $(use_with mysql) \
+ $(use_with postgres postgresql) \
+ $(use_enable cli) \
+ $(use_enable ra) \
+ $(use_enable debug debug-info) \
+ || die "econf failed"
+
+ emake || die "emake with current options failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+
+ rm -f "${D}/usr/bin/gensvnrevision" # not really part of mangos dist
+
+ doinitd "${FILESDIR}/${PV}/mangos-realmd" || die
+ doinitd "${FILESDIR}/${PV}/mangos-worldd" || die
+
+ dodir /usr/share/mangos/dbc
+ dodir /usr/share/mangos/maps
+ dodir /usr/share/mangos/vmaps
+
+ dodir /var/log/mangos
+
+ fowners root.mangos /etc/mangos
+ fowners mangos.mangos /var/log/mangos
+}
+
+pkg_postinst() {
+ ewarn "You need to manually configure MaNGOS."
+ ewarn "See /etc/mangos/ for config files."
+ ewarn "Remember to move you maps, DBC and vmaps files to your data folder - /usr/share/mangos/"
+ ewarn
+ ewarn "Don't forget to run SQL scripts for:"
+ ewarn "\t- MaNGOS databases : /usr/share/mangos/sql"
+
+ useq sd2 && ewarn "\t- ScriptDev2 database: /usr/share/scriptdev2/sql"
+
+ ewarn
+ einfo "If you want Mangos to start automatically on boot execute :"
+ einfo "\t- rc-update add mangos-realmd default"
+ einfo "\t- rc-update add mangos-worldd default"
+ einfo
+}
diff --git a/games-rpg/mangos/metadata.xml b/games-rpg/mangos/metadata.xml
new file mode 100644
index 000000000000..c9467015b9e9
--- /dev/null
+++ b/games-rpg/mangos/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+
+<pkgmetadata>
+ <herd>no-herd</herd>
+ <maintainer>
+ <email>trapni@gentoo.org</email>
+ </maintainer>
+ <use>
+ <flag name='ra'>compiles with support remote console system</flag>
+ <flag name='cli'>compiles with support command line system</flag>
+ <flag name='sd2'>includes ScriptDev2 to distribution</flag>
+ </use>
+</pkgmetadata>