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
commitff5d312f5c1a4c219c771cbb5d957757ce0688b6 (patch)
treed3cde5bf98c5a9482c6d2ae8bede71420d16e0dc /games-rpg
parentStable for amd64 (diff)
downloadgentoo-2-ff5d312f5c1a4c219c771cbb5d957757ce0688b6.tar.gz
gentoo-2-ff5d312f5c1a4c219c771cbb5d957757ce0688b6.tar.bz2
gentoo-2-ff5d312f5c1a4c219c771cbb5d957757ce0688b6.zip
initial import
(Portage version: 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..30731b80cb13
--- /dev/null
+++ b/games-rpg/mangos/Manifest
@@ -0,0 +1,5 @@
+AUX 9999/mangos-realmd 609 RMD160 e7b277fc805d41a26a910b0c25cae44248d61f3b SHA1 be923041ba81e28146bb7d3be078a6a330066c9e SHA256 efbad86a64e0526c959dfdf3ea841b1d1ce57255724345eca22b7987eb0971e0
+AUX 9999/mangos-worldd 565 RMD160 b2bc4988935ba76316b391c62932745bf3aab633 SHA1 86d63c1f58c7e9450a04ab2c14cab071f4b5182d SHA256 9effcdba3c12db6224fd29cd071b4630c4b6b893bf1f4d9b03cee3caa7a98d6b
+EBUILD mangos-9999.ebuild 3283 RMD160 5c2f81c0d029bc068ca1f54999446763e774174b SHA1 0eba21e02c716be531d3be23b6c6853a096692c6 SHA256 3bf56efe77a1d120603dfabbab69470052f5781f11c666c0da81460b98b43f33
+MISC ChangeLog 310 RMD160 386bfeb4a071f6e7a06db516d260c5b7f24c9b2a SHA1 9e3bfc865eae224eb969a452aa5643cafed9c50f SHA256 853d731702fe76a682f83afec1858a2e814bd350f4dcb67d19907a5fb0f03aec
+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>