mirror of
git://git.psyced.org/git/psyced
synced 2024-08-15 03:25:10 +00:00
remove outdated gentoo config
This commit is contained in:
parent
0120646dd2
commit
498f12819b
21 changed files with 6 additions and 3990 deletions
|
@ -12,3 +12,9 @@ Do not edit in here.
|
|||
Find out where the corresponding files are in your systems, or maybe
|
||||
copy files out of here to where you need them.
|
||||
|
||||
|
||||
=== UPDATE! ===
|
||||
|
||||
Gentoo configuration has moved into the youbroketheinternet-overlay
|
||||
available from git://cheettyiapsyciew.onion/youbroketheinternet-overlay
|
||||
|
||||
|
|
|
@ -1,36 +0,0 @@
|
|||
================ AUTOMATED PORTAGE INSTALLATION =============================
|
||||
|
||||
The Makefile in this directory will create a portage overlay for psyclpc and
|
||||
psyced if necessary, than generate ebuild digests and get you ready for
|
||||
emerge. All you need to do is type:
|
||||
|
||||
make
|
||||
|
||||
If you tried this previously and ran into trouble, you may have to clean out
|
||||
the 'psyced' and 'psyclpc' subdirectories from your portage overlay before
|
||||
doing make, so it starts anew. You can do:
|
||||
|
||||
make new
|
||||
|
||||
================ SHUBBLETROUTING ============================================
|
||||
|
||||
In all above cases you should be done with installation. If anything goes wrong
|
||||
get in touch with us on psyc://psyced.org/@welcome so we can fix the problem
|
||||
not only for you, but for everyone who might run into the same problem.
|
||||
|
||||
If you're in doubt that the generator files aren't the newest, you can update
|
||||
them by issueing:
|
||||
|
||||
make up
|
||||
|
||||
================ MANUAL INSTALLATION ========================================
|
||||
|
||||
We have stopped providing regular ebuild files for manual installation
|
||||
as nobody is maintaining them. Feel free to step in.
|
||||
|
||||
================ WHY STILL LDMUD? ===========================================
|
||||
|
||||
We are just leaving it in as there are no newer releases of ldmud and so
|
||||
this ebuild is still up to date for anyone who needs an ldmud ebuild.
|
||||
We may however simplify things later and therefore remove it.
|
||||
|
|
@ -1,92 +0,0 @@
|
|||
# $Id: Makefile,v 1.37 2007/08/14 11:28:00 lynx Exp $
|
||||
|
||||
p=/usr/local/portage
|
||||
e=/etc/make.conf
|
||||
G=lynx -source
|
||||
|
||||
# We currently operate on /usr/local/portage but we should add more
|
||||
# PSYC packages and run our own PSYC overlay...
|
||||
|
||||
install: $p $p/dev-lang/psyclpc $p/net-im/psyced
|
||||
@echo -- We are done with portage installation. You can now emerge
|
||||
@echo -- from here or postpone to a better moment in life.
|
||||
emerge -av psyced
|
||||
@echo -- Done emerging. Contratulations on your new psyced! --
|
||||
|
||||
uninstall: new
|
||||
|
||||
new:
|
||||
# It complains for missing packages, but does no harm.
|
||||
-emerge --unmerge psyced psyclpc ldmud
|
||||
# This one complains, too. Should we make it shut up?
|
||||
# We can make it shut up next time when we do our own PSYC overlay.
|
||||
-rm -r $p/net-im/psyced $p/dev-lang/psyclpc $p/games-mud/ldmud
|
||||
|
||||
ldmud: $p $p/games-mud/ldmud
|
||||
@echo -- Warning: You are installing LDMud which is no longer the
|
||||
@echo -- the best choice as a psyced driver!
|
||||
emerge -av ldmud
|
||||
|
||||
### NO SERVICEABLE PARTS BELOW ###
|
||||
|
||||
$p:
|
||||
@echo -- Apparently you have not installed custom ebuilds yet.
|
||||
mkdir $@
|
||||
@echo -- A $@ directory has therefore been generated for you.
|
||||
echo "" >>$e
|
||||
echo "# Added by psyced's config/gentoo/Makefile" >>$e
|
||||
# Does it replace $p correctly in $e? Yes it does. Good.
|
||||
echo "PORTDIR_OVERLAY=$p" >>$e
|
||||
@echo -- PORTDIR_OVERLAY has been appended to $e to activate $@.
|
||||
|
||||
$p/dev-lang/psyclpc: psyclpc.ebuild psyclpc/Makefile Makefile
|
||||
(cd psyclpc;make ebuild)
|
||||
-mkdir $p/dev-lang
|
||||
rm -rf $@
|
||||
cp -rp psyclpc $@
|
||||
-(cd $@;make Manifest)
|
||||
|
||||
$p/games-mud/ldmud: ldmud.ebuild ldmud/Makefile Makefile
|
||||
(cd ldmud;make ebuild)
|
||||
-mkdir $p/games-mud
|
||||
rm -rf $@
|
||||
cp -rp ldmud $@
|
||||
-(cd $@;make Manifest)
|
||||
|
||||
$p/net-im/psyced: psyced.ebuild psyced/Makefile Makefile
|
||||
(cd psyced;make ebuild)
|
||||
-mkdir $p/net-im
|
||||
rm -rf $@
|
||||
cp -rp psyced $@
|
||||
-(cd $@;make Manifest)
|
||||
|
||||
# the lower part of the Makefile serves the purpose of
|
||||
# managing this package itself, not to install something.
|
||||
|
||||
sane: new clean
|
||||
|
||||
clean:
|
||||
(cd psyced;make $@)
|
||||
(cd psyclpc;make $@)
|
||||
# Leave it alone or we won't be able to recreate the erq directory ;)
|
||||
# (cd ldmud;make $@)
|
||||
|
||||
up:
|
||||
-rm ldmud/ldmud-*.ebuild psyced/psyced-*.ebuild psyclpc/psyclpc-*.ebuild
|
||||
-mkdir psyced/files
|
||||
# If version control updates this Makefile itself, it may be necessary
|
||||
# to run 'make up' twice as the update requirements may have changed.
|
||||
git pull
|
||||
$G http://www.psyced.org/dist/config/psyced.ini >psyced/files/psyced.ini
|
||||
@(cd psyced;make ebuild)
|
||||
@(cd psyclpc;make ebuild)
|
||||
# We could extend the procedure to actually run the ebuild at building time
|
||||
# so that we get to have the digests in there.. TODO
|
||||
# Now you may have to unmerge and delete psyclpc and psyced from your
|
||||
# portage overlay to have them generated anew.
|
||||
# Use 'make new' to do that.
|
||||
|
||||
oldup:
|
||||
@(cd ldmud;make ebuild)
|
||||
$G http://www.psyced.org/dist/config/psyced.settings >ldmud/files/psyced.settings
|
||||
|
|
@ -1,104 +0,0 @@
|
|||
# Copyright 1999-2006 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /CVS/muveCVS/psycmuve/config/gentoo/ldmud.ebuild,v 1.17 2007/04/06 13:35:03 lynx Exp $
|
||||
#
|
||||
# In a philosophical way, LDMUD is a game engine, but from an administrative
|
||||
# aspect it is a major project which doesn't belong into /usr/games. Especially
|
||||
# not when it is actually serving as a programming language for intense
|
||||
# multi-user network applications such as psyced. This is why we intentionally
|
||||
# do not use any "games" macros here. Please keep it that way. -lynX 2006
|
||||
#
|
||||
# Suggestions? tell psyc://psyced.org/~lynX
|
||||
#
|
||||
# WARNING/REMINDER to myself: When checking in a new version of this file
|
||||
# I have to run 'make up' in the gentoo download tar, as it also
|
||||
# relinks all the ldmud/ldmud-VERSION.ebuild files.
|
||||
|
||||
inherit toolchain-funcs eutils
|
||||
|
||||
DESCRIPTION="LPMUD Driver for Multi-User Domains and LPC language implementation"
|
||||
HOMEPAGE="http://www.bearnip.com/lars/proj/ldmud.html"
|
||||
|
||||
# using the filename of the ebuild here!
|
||||
# so better give it numbers which are actually
|
||||
# available on http://www.bearnip.com/ftp/mud/
|
||||
SRC_URI="http://www.bearnip.com/ftp/mud/${P}.tar.gz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
# haven't checked for real..
|
||||
KEYWORDS="x86 ~ppc ~amd64"
|
||||
IUSE="debug ssl static zlib ldap ipv6 mysql postgres berkdb"
|
||||
|
||||
RDEPEND="zlib? ( sys-libs/zlib )
|
||||
ssl? ( dev-libs/openssl )
|
||||
ldap? ( net-nds/openldap )
|
||||
berkdb? ( sys-libs/db )
|
||||
mysql? ( dev-db/mysql )
|
||||
postgres? ( dev-db/postgresql )"
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
>=sys-devel/flex-2.5.4a-r5
|
||||
>=sys-devel/bison-1.875
|
||||
>=sys-devel/gettext-0.12.1"
|
||||
|
||||
#MYS="/var/tmp/portage/${P}/work/${P}/src"
|
||||
MYS="${S}/src"
|
||||
|
||||
src_unpack() {
|
||||
unpack ${A}
|
||||
# cd "${S}"
|
||||
cd "${MYS}"
|
||||
# without "" or it won't ungrok the *.* -- thx fish
|
||||
cp ${FILESDIR}/erq/*.* util/erq || die "improved erq not found in ${FILESDIR}"
|
||||
cp "${FILESDIR}/psyced.settings" settings/psyced-gentoo || die "psyced.settings not found in ${FILESDIR}"
|
||||
chmod +x settings/psyced-gentoo
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# emake \
|
||||
# CC="$(tc-getCC)" \
|
||||
# CFLAGS="${CFLAGS}" ${PN} \
|
||||
# || die "emake failed"
|
||||
cd "${MYS}"
|
||||
# use berkdb >&/dev/null && myopts="${myopts} --enable-db"
|
||||
# use mysql >&/dev/null && myopts="${myopts} --enable-mysql" || myopts="${myopts} --disable-mysql"
|
||||
# use postgres >&/dev/null && myopts="${myopts} --enable-pgsql"
|
||||
# use ldap >&/dev/null && myopts="${myopts} --enable-ldap"
|
||||
# use ipv6 >&/dev/null && myopts="${myopts} --enable-ipv6"
|
||||
use zlib && {
|
||||
einfo "Compiling ${P} with zlib (MCCP) support."
|
||||
myopts="${myopts} --enable-use-mccp"
|
||||
}
|
||||
use ssl && {
|
||||
einfo "Compiling ${P} with SSL support."
|
||||
myopts="${myopts} --enable-use-tls=yes"
|
||||
}
|
||||
use mysql && {
|
||||
einfo "Compiling ${P} with mySQL support."
|
||||
myopts="${myopts} --enable-use-mysql"
|
||||
}
|
||||
use postgres && {
|
||||
einfo "Compiling ${P} with PostgreSQL support."
|
||||
myopts="${myopts} --enable-use-pgsql"
|
||||
}
|
||||
use debug && {
|
||||
append-flags -O -ggdb -DDEBUG
|
||||
RESTRICT="${RESTRICT} nostrip"
|
||||
myopts="${myopts} --enable-debug"
|
||||
}
|
||||
# runs configure
|
||||
echo ${myopts}
|
||||
settings/psyced-gentoo ${myopts}
|
||||
make all && (cd "util/" && make subs) || die "make failed"
|
||||
}
|
||||
|
||||
src_install () {
|
||||
cd "${MYS}"
|
||||
dosbin ${PN} && (cd "util/erq/" && dosbin "erq") || die "dosbin failed"
|
||||
cd "${MYS}/.."
|
||||
dodoc README HISTORY
|
||||
# do something about the files in the doc directory?
|
||||
# everyone looks stuff up on google anyway
|
||||
# but maybe we should install etc/lpc.vim?
|
||||
}
|
|
@ -1,13 +0,0 @@
|
|||
# ChangeLog for games-mud/ldmud
|
||||
# $Header: /CVS/muveCVS/psycmuve/config/gentoo/ldmud/ChangeLog,v 1.3 2006/01/17 11:37:31 lynx Exp $
|
||||
|
||||
*ldmud-3.3.687 (18 Nov 2005)
|
||||
|
||||
18 Nov 2005; Carlo von lynX <lynX@are.you.already.psyced.org> +ldmud-3.3.687.ebuild:
|
||||
initial build for depending 'psyced' project
|
||||
|
||||
*ldmud-3.3.712 (30 Nov 2005)
|
||||
|
||||
18 Nov 2005; el <el@goodadvice.pages.de> +ldmud-3.3.712.ebuild:
|
||||
improved build: allows simple rename of .ebuild files and makes erq
|
||||
|
|
@ -1,51 +0,0 @@
|
|||
# $Id: Makefile,v 1.16 2007/04/08 08:37:08 lynx Exp $
|
||||
#
|
||||
# This Makefile serves the purpose to produce the files ebuild needs to be
|
||||
# happy. So it is an ebuildbuilder. Targets are: ebuild, Manifest and clean.
|
||||
#
|
||||
# 'make' needs to be called in gentoo/config to generate the ebuilds and files
|
||||
# directory, then ../Makefile will transfer this to portage where 'make' will
|
||||
# call ebuild to create digests and the Manifest. After that you are ready to
|
||||
# emerge. From nothing. fischerspooner rocks. -lynX
|
||||
|
||||
P=ldmud
|
||||
V=3.3.714
|
||||
|
||||
# this part can be executed once the ebuild is in portage
|
||||
|
||||
it: Manifest
|
||||
# # testing it
|
||||
emerge -av $P
|
||||
|
||||
Manifest: Makefile ChangeLog files/psyced.settings files/erq
|
||||
# # generate manifest
|
||||
ebuild $P-$V.ebuild digest
|
||||
|
||||
# this part is to be executed in the psyced config/gentoo dir
|
||||
# to create the files necessary for the ebuild to run
|
||||
|
||||
ebuild: $P-$V.ebuild files/psyced.settings files/erq
|
||||
|
||||
$P-$V.ebuild:
|
||||
# # let's keep it this simple, please
|
||||
-ln ../$P.ebuild $P-$V.ebuild
|
||||
|
||||
# no dependency on ../../psyced.settings here or it won't run in portage
|
||||
files/psyced.settings: files
|
||||
# # we keep it elsewhere
|
||||
-cp ../../psyced.settings $@
|
||||
|
||||
files/erq:
|
||||
-mkdir $@
|
||||
-cp -p ../../../utility/erq/*.* $@
|
||||
|
||||
files:
|
||||
-mkdir files
|
||||
# we don't want to have each of those in version control, so this is a place too
|
||||
# echo "MD5 419eb1c21747fe2cd6de8089b47271ff ldmud-3.3.687.tar.bz2 2107415" >files/digest-ldmud-3.3.687
|
||||
# echo "MD5 ab0027411928bef96aa41bf316cde954 ldmud-3.3.712.tar.gz 26515635" >files/digest-ldmud-3.3.712
|
||||
|
||||
clean:
|
||||
-rm $P-$V.ebuild
|
||||
-rm -r files
|
||||
|
|
@ -1,68 +0,0 @@
|
|||
|
||||
# These lines are needed on some machines.
|
||||
MAKE=make
|
||||
SHELL=@CONFIG_SHELL@
|
||||
INSTALL=@INSTALL@
|
||||
mkinstalldirs=$(SHELL) @top_srcdir@/mkinstalldirs
|
||||
#
|
||||
CC=@CC@
|
||||
|
||||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
|
||||
SUBDIRS = indent make_docs xerq
|
||||
SED = sed
|
||||
|
||||
BINDIR=@bindir@
|
||||
MUD_LIB=@libdir@
|
||||
ERQ_DIR=@libexecdir@
|
||||
|
||||
#PROFIL= -DOPCPROF -DVERBOSE_OPCPROF
|
||||
#PROFIL=-p -DMARK
|
||||
#PROFIL=-pg
|
||||
PROFIL=
|
||||
#Enable warnings from the compiler, if wanted.
|
||||
WARN= # no warning options - will work with all compilers :-)
|
||||
#WARN= -Wall -Wshadow -Dlint
|
||||
#WARN= -Wall -Wshadow -Wno-parentheses # gcc settings
|
||||
#
|
||||
# Optimization and source level debugging options.
|
||||
# adding a -fomit-frame-pointer on the NeXT (gcc version 1.93 (68k, MIT syntax))
|
||||
# will corrupt the driver.
|
||||
HIGH_OPTIMIZE = @OCFLAGS@ # high optimization
|
||||
MED_OPTIMIZE= @MCFLAGS@ # medium optimization
|
||||
LOW_OPTIMIZE = @LCFLAGS@ # minimal optimization
|
||||
NO_OPTIMIZE= @DCFLAGS@ # no optimization; for frequent recompilations.
|
||||
|
||||
OPTIMIZE= $(@val_optimize@_OPTIMIZE)
|
||||
|
||||
# The main debugging level is define in config.h
|
||||
# Add additional options here.
|
||||
DEBUG=
|
||||
#
|
||||
MPATH=-DMUD_LIB='"$(MUD_LIB)"' -DBINDIR='"$(BINDIR)"' -DERQ_DIR='"$(ERQ_DIR)"'
|
||||
#
|
||||
TOPINC=-I@top_srcdir@
|
||||
#
|
||||
CFLAGS= @EXTRA_CFLAGS@ $(OPTIMIZE) $(DEBUG) $(WARN) $(MPATH) $(PROFIL) $(TOPINC)
|
||||
#
|
||||
LIBS=@ERQ_LIBS@ -lresolv
|
||||
#
|
||||
LDFLAGS=@LDFLAGS@
|
||||
|
||||
|
||||
|
||||
all: erq@EXEEXT@
|
||||
|
||||
FORCE: install
|
||||
|
||||
erq@EXEEXT@: erq.c
|
||||
# $(CC) erq.c -lresolv -o erq@EXEEXT@
|
||||
$(CC) $(CFLAGS) $(LDFLAGS) erq.c -o erq@EXEEXT@ $(LIBS)
|
||||
|
||||
install: erq@EXEEXT@
|
||||
$(mkinstalldirs) $(BINDIR)
|
||||
$(INSTALL) erq@EXEEXT@ $(BINDIR)/erq@EXEEXT@
|
||||
|
||||
clean:
|
||||
-rm -f *.o erq@EXEEXT@ *~
|
File diff suppressed because it is too large
Load diff
|
@ -1,60 +0,0 @@
|
|||
/* external request demon interface definitions */
|
||||
|
||||
#ifndef ERQ_H__
|
||||
#define ERQ_H__ 1
|
||||
|
||||
/* servive request types */
|
||||
|
||||
#define ERQ_RLOOKUP 0 /* Lookup ip -> name */
|
||||
#define ERQ_EXECUTE 1 /* Execute a program */
|
||||
#define ERQ_FORK 2 /* Fork a program */
|
||||
#define ERQ_AUTH 3 /* Connect to a remote authd */
|
||||
#define ERQ_SPAWN 4 /* Spawn a program */
|
||||
#define ERQ_SEND 5 /* Send data to a program or connection */
|
||||
#define ERQ_KILL 6 /* Kill a program or connection */
|
||||
#define ERQ_OPEN_UDP 7 /* Open a UDP socket */
|
||||
#define ERQ_OPEN_TCP 8 /* Open a TCP connection */
|
||||
#define ERQ_LISTEN 9 /* Open a TCP accept-socket */
|
||||
#define ERQ_ACCEPT 10 /* Accept a connection from a accept-socket */
|
||||
#define ERQ_LOOKUP 11 /* Lookup name -> ip */
|
||||
|
||||
#ifdef __IPV6__
|
||||
#define ERQ_RLOOKUPV6 12 /* Lookup name/ip6 */
|
||||
#endif
|
||||
#define ERQ_LOOKUP_SRV 13
|
||||
|
||||
/* Additional service request type flags evaluated by efun send_erq().
|
||||
* The ERQ itself won't get to see it.
|
||||
*/
|
||||
|
||||
#define ERQ_CB_STRING (1 << 31) /* Callback closure takes a string arg */
|
||||
|
||||
|
||||
/* answers from ERQ_EXECUTE / ERQ_FORK */
|
||||
|
||||
#define ERQ_OK 0
|
||||
#define ERQ_SIGNALED 1
|
||||
#define ERQ_E_NOTFOUND 2 /* process not found by wait */
|
||||
#define ERQ_E_UNKNOWN 3 /* unknown exit condition from wait() */
|
||||
#define ERQ_E_ARGLENGTH 4
|
||||
#define ERQ_E_ARGFORMAT 5
|
||||
#define ERQ_E_ARGNUMBER 6
|
||||
#define ERQ_E_ILLEGAL 7
|
||||
#define ERQ_E_PATHLEN 8
|
||||
#define ERQ_E_FORKFAIL 9
|
||||
#define ERQ_E_TICKET 11
|
||||
#define ERQ_E_INCOMPLETE 12
|
||||
#define ERQ_E_WOULDBLOCK 13
|
||||
#define ERQ_E_PIPE 14
|
||||
#define ERQ_STDOUT 15 /* Normal data received */
|
||||
#define ERQ_STDERR 16
|
||||
#define ERQ_EXITED 17 /* Connection closed on EOF */
|
||||
#define ERQ_E_NSLOTS 18
|
||||
|
||||
/* reserved handles */
|
||||
|
||||
#define ERQ_HANDLE_RLOOKUP (-1)
|
||||
#define ERQ_HANDLE_KEEP_HANDLE (-2)
|
||||
#define ERQ_HANDLE_RLOOKUPV6 (-3)
|
||||
|
||||
#endif /* ERQ_H__ */
|
|
@ -1,215 +0,0 @@
|
|||
#include "srv.h"
|
||||
|
||||
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include <strings.h>
|
||||
#include <arpa/inet.h> // For solaris
|
||||
#include <arpa/nameser.h>
|
||||
#include <resolv.h>
|
||||
|
||||
#include <malloc.h>
|
||||
|
||||
/* the biggest packet we'll send and receive */
|
||||
#if PACKETSZ > 1024
|
||||
#define MAXPACKET PACKETSZ
|
||||
#else
|
||||
#define MAXPACKET 1024
|
||||
#endif
|
||||
|
||||
/* and what we send and receive */
|
||||
typedef union {
|
||||
HEADER hdr;
|
||||
u_char buf[MAXPACKET];
|
||||
} querybuf;
|
||||
|
||||
#ifndef T_SRV
|
||||
#define T_SRV 33
|
||||
#endif
|
||||
|
||||
|
||||
void freesrvhost ( struct srvhost * s )
|
||||
{
|
||||
struct srvhost * n;
|
||||
while( s ) {
|
||||
n = s->next;
|
||||
/* hack to make double-free visible by causing null dereference */
|
||||
s->next = NULL;
|
||||
free( (void *)s );
|
||||
s = n;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static int compare( const void * a, const void * b )
|
||||
{
|
||||
struct srvhost * aa, * bb;
|
||||
|
||||
if ( !a )
|
||||
return 1;
|
||||
if ( !b )
|
||||
return -1;
|
||||
|
||||
aa = (struct srvhost *) *(int*)a;
|
||||
bb = (struct srvhost *) *(int*)b;
|
||||
|
||||
if ( aa->pref > bb->pref )
|
||||
return 1;
|
||||
if ( aa->pref < bb->pref )
|
||||
return -1;
|
||||
|
||||
if ( aa->rweight > bb->rweight )
|
||||
return -1;
|
||||
if ( aa->rweight < bb->rweight )
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
struct srvhost * getsrv( const char * domain,
|
||||
const char * service, const char * protocol ) {
|
||||
querybuf answer; /* answer buffer from nameserver */
|
||||
int n;
|
||||
char * zone;
|
||||
int ancount, qdcount; /* answer count and query count */
|
||||
HEADER *hp; /* answer buffer header */
|
||||
struct srvhost **replyarray;
|
||||
struct srvhost * firsthost;
|
||||
int answerno;
|
||||
u_char hostbuf[256];
|
||||
u_char *msg, *eom, *cp; /* answer buffer positions */
|
||||
int dlen, type, pref, weight, port;
|
||||
|
||||
if ( !domain || !*domain ||
|
||||
!service || !*service ||
|
||||
!protocol || !*protocol )
|
||||
return NULL;
|
||||
|
||||
zone = (char *)malloc( strlen( domain ) +
|
||||
strlen( service ) +
|
||||
strlen( protocol ) + 20 );
|
||||
if (zone == NULL)
|
||||
return NULL;
|
||||
|
||||
*zone = '\0';
|
||||
|
||||
if (*service != '_') // If service and protocol do not start with a
|
||||
strcat(zone, "_"); // _, prepend the _ to them...
|
||||
|
||||
strcat(zone, service);
|
||||
strcat(zone, ".");
|
||||
|
||||
if (*protocol != '_')
|
||||
strcat(zone, "_");
|
||||
|
||||
strcat(zone, protocol);
|
||||
strcat(zone, ".");
|
||||
|
||||
strcat(zone, domain);
|
||||
|
||||
n = res_query( zone, C_IN, T_SRV, (u_char *)&answer, sizeof( answer ) );
|
||||
|
||||
(void) free( zone );
|
||||
zone = NULL;
|
||||
|
||||
if ( n < (int)sizeof(HEADER) )
|
||||
return NULL;
|
||||
|
||||
/* valid answer received. skip the query record. */
|
||||
|
||||
hp = (HEADER *)&answer;
|
||||
qdcount = ntohs(hp->qdcount);
|
||||
ancount = ntohs(hp->ancount);
|
||||
|
||||
msg = (u_char *)&answer;
|
||||
eom = (u_char *)&answer + n;
|
||||
cp = (u_char *)&answer + sizeof(HEADER);
|
||||
|
||||
while ( qdcount-- > 0 && cp < eom ) {
|
||||
n = dn_expand( msg, eom, cp, (char *)hostbuf, 256 );
|
||||
if (n < 0)
|
||||
return NULL;
|
||||
cp += n + QFIXEDSZ;
|
||||
}
|
||||
|
||||
/* make a big-enough (probably too big) reply array */
|
||||
|
||||
replyarray
|
||||
= (struct srvhost **) malloc( ancount * sizeof(struct srvhost *) );
|
||||
for( n = 0; n < ancount; n++ )
|
||||
replyarray[n] = NULL;
|
||||
answerno = 0;
|
||||
|
||||
/* loop through the answer buffer and extract SRV records */
|
||||
while ( ancount-- > 0 && cp < eom ) {
|
||||
n = dn_expand( msg, eom, cp, (char *)hostbuf, 256 );
|
||||
if ( n < 0 ) {
|
||||
for( n = 0; n < answerno; n++ )
|
||||
(void) free( replyarray[n] );
|
||||
(void)free( replyarray );
|
||||
return NULL;
|
||||
}
|
||||
|
||||
cp += n;
|
||||
|
||||
type = _getshort(cp);
|
||||
cp += sizeof(u_short);
|
||||
|
||||
/* class = _getshort(cp); */
|
||||
cp += sizeof(u_short);
|
||||
|
||||
/* ttl = _getlong(cp); */
|
||||
cp += sizeof(u_long);
|
||||
|
||||
dlen = _getshort(cp);
|
||||
cp += sizeof(u_short);
|
||||
|
||||
if ( type != T_SRV ) {
|
||||
cp += dlen;
|
||||
continue;
|
||||
}
|
||||
|
||||
pref = _getshort(cp);
|
||||
cp += sizeof(u_short);
|
||||
|
||||
weight = _getshort(cp);
|
||||
cp += sizeof(u_short);
|
||||
|
||||
port = _getshort(cp);
|
||||
cp += sizeof(u_short);
|
||||
|
||||
n = dn_expand( msg, eom, cp, (char *)hostbuf, 256 );
|
||||
if (n < 0)
|
||||
break;
|
||||
cp += n;
|
||||
|
||||
replyarray[answerno]
|
||||
= (struct srvhost *)malloc( sizeof( struct srvhost ) +
|
||||
strlen( (char *)hostbuf ) );
|
||||
replyarray[answerno]->pref = pref;
|
||||
replyarray[answerno]->weight = weight;
|
||||
if ( weight )
|
||||
replyarray[answerno]->rweight = 1+random()%( 10000 * weight );
|
||||
else
|
||||
replyarray[answerno]->rweight = 0;
|
||||
replyarray[answerno]->port = port;
|
||||
replyarray[answerno]->next = NULL;
|
||||
strcpy( replyarray[answerno]->name, (char *)hostbuf );
|
||||
|
||||
answerno++;
|
||||
}
|
||||
if (answerno == 0) return NULL;
|
||||
qsort( replyarray, answerno, sizeof( struct srvhost * ),
|
||||
compare );
|
||||
|
||||
// Recreate a linked list from the sorted array...
|
||||
for( n = 0; n < answerno; n++ )
|
||||
replyarray[n]->next = replyarray[n+1];
|
||||
replyarray[answerno-1]->next = NULL;
|
||||
|
||||
firsthost = replyarray[0];
|
||||
(void) free( replyarray );
|
||||
return firsthost;
|
||||
}
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
/****************************************************************************
|
||||
** $Id: srv.h,v 1.1 2006/05/22 11:18:10 lynx Exp $
|
||||
**
|
||||
** Definition of something or other
|
||||
**
|
||||
** Created : 979899
|
||||
**
|
||||
** Copyright (C) 1997 by Troll Tech AS. All rights reserved.
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef SRV_H
|
||||
#define SRV_H
|
||||
|
||||
struct srvhost {
|
||||
unsigned int pref;
|
||||
struct srvhost * next;
|
||||
unsigned int port;
|
||||
unsigned int weight;
|
||||
unsigned int rweight;
|
||||
char name[1];
|
||||
};
|
||||
|
||||
|
||||
extern void freesrvhost ( struct srvhost * );
|
||||
|
||||
extern struct srvhost * getsrv( const char * domain,
|
||||
const char * service,
|
||||
const char * protocol );
|
||||
|
||||
#endif
|
||||
|
|
@ -1,311 +0,0 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# settings/psyced version 4.0
|
||||
#
|
||||
# $Id: psyced.settings,v 1.10 2007/05/08 00:52:01 lynx Exp $
|
||||
#
|
||||
# LDMUD compilation settings for psyced, the LPC server and client
|
||||
# implementation of the protocol for synchronous conferencing.
|
||||
# Please execute this instead of ./configure before compilation.
|
||||
#
|
||||
# The latest version of this file is in the psyced repository and usually also
|
||||
# at http://www.psyced.org/dist/config/psyced.settings
|
||||
# The version in the LDMUD distribution may be slightly outdated.
|
||||
#
|
||||
# Documents and download on: http://www.psyced.org
|
||||
# Information about PSYC: http://www.psyc.eu
|
||||
#
|
||||
# the PSYC implementation and library is designed in a way that it should
|
||||
# easily co-host in a running LPMUD, it just needs a few patches to the
|
||||
# master object and #includes in simul_efun.
|
||||
#
|
||||
# how to multiplex InterMUD and PSYC on the same udp port:
|
||||
# PSYC UDP packets always start with ".\n".
|
||||
#
|
||||
# configure will strip this part from the script.
|
||||
|
||||
cp $0 settings/psyced-current
|
||||
exec ./configure --prefix=/opt/psyced --bindir=/opt/psyced/bin --libdir=/opt/psyced/world --libexec=/opt/psyced/run --with-setting=psyced-current $*
|
||||
exit
|
||||
|
||||
#-- PSYCLPC EXTENSIONS
|
||||
|
||||
# compile json c library in, if available
|
||||
enable_use_json=yes
|
||||
|
||||
# compile expat xml & xmpp parser in, if available
|
||||
enable_use_expat=yes
|
||||
|
||||
# enable this if you want use http://about.psyc.eu/psyclpc#Authlocal
|
||||
enable_use_authlocal=yes
|
||||
# requires procfs with readable /proc/net/tcp
|
||||
#
|
||||
# some kernel configurations show wrong port numbers however,
|
||||
# in that case the correlation from peer port to user id fails.
|
||||
# there is however no risk of error (the peer ports are unprivileged
|
||||
# whereas the 'wrong' ones are privileged ones. could be related to
|
||||
# iptables or some other port mapping magic).
|
||||
|
||||
#-- FILE PATHES
|
||||
|
||||
with_master_name=drivers/ldmud/master/master
|
||||
# unused really
|
||||
with_swap_file=log/psyced.swap
|
||||
|
||||
#-- NETWORKING & DATA BASES
|
||||
|
||||
# cool tool that does external name server resolution and more
|
||||
enable_erq=erq
|
||||
|
||||
# the "sorry" message of the built-in ACL isn't flexible enough:
|
||||
# it cannot output a properly formatted HTTP or PSYC message
|
||||
# and why shouldn't this be done in LPC anyway?
|
||||
enable_access_control=no
|
||||
|
||||
# zlib compression, really
|
||||
enable_use_mccp=yes
|
||||
|
||||
# Enable support for TLS (Transport Layer Security).
|
||||
#
|
||||
# 'no': TLS support is not compiled it
|
||||
# 'gnu': TLS support using GnuTLS is compiled in if found.
|
||||
# 'ssl': TLS support using OpenSSL is compiled in if found.
|
||||
# 'yes': TLS support using either OpenSSL or GnuTLS is compiled in if found.
|
||||
# The configuration script looks first for OpenSSL, then GnuTLS.
|
||||
# If both are available, OpenSSL is used.
|
||||
#
|
||||
# gnutls does not offer features we need
|
||||
enable_use_tls=ssl
|
||||
|
||||
# SQL storage not implemented. Maybe PSYC synchronization is good enough?
|
||||
# see http://about.psyc.eu/storage for info.
|
||||
enable_use_mysql=no
|
||||
enable_use_pgsql=no
|
||||
enable_use_sqlite=no
|
||||
|
||||
# maximum permitted tcp connections
|
||||
with_max_players=900
|
||||
|
||||
# The maximum number of ports to listen for connections on.
|
||||
with_maxnumports=33
|
||||
|
||||
# size of the buffer for incoming data of each socket
|
||||
with_size_socket_buffer=32768
|
||||
|
||||
# The maximum number of simultaneous connect() calls
|
||||
with_max_net_connects=33
|
||||
|
||||
# how can i set all the other port numbers?
|
||||
# still using the historic dirty command line hack?
|
||||
with_portno=4404
|
||||
|
||||
# Maximum size of a socket send buffer.
|
||||
with_set_buffer_size_max=262144
|
||||
|
||||
# the PSYC port
|
||||
with_udp_port=4404
|
||||
|
||||
# Enable support for IPv6 (this should better be autodetected!!)
|
||||
#enable_use_ipv6=no
|
||||
|
||||
# Enable the use of pthreads for background socket IO.
|
||||
enable_use_pthreads=no
|
||||
|
||||
# If PThreads are used, this is the max amount of data held pending
|
||||
# for writing. If the amount is exceeded, the oldest data blocks
|
||||
# are discarded.
|
||||
# If 0, any amount of data is allowed.
|
||||
with_pthread_write_max_size=333333
|
||||
|
||||
#-- RUNTIME LIMITS
|
||||
#
|
||||
# currently we consider a psyced a friendly environment
|
||||
# where no coders will abuse cpu time and other limits
|
||||
# you may want to change this if you have many room coders
|
||||
|
||||
# you can lower this value for better debugging
|
||||
with_max_cost=9999999
|
||||
#with_catch_reserved_cost=2000
|
||||
#with_master_reserved_cost=512
|
||||
enable_dynamic_costs=no
|
||||
|
||||
# Maximum function call depth for normal program execution
|
||||
#with_max_user_trace=60
|
||||
# Maximum function call depth during error handling.
|
||||
# It must be bigger than MAX_USER_TRACE (check at compile time).
|
||||
#with_max_trace=65
|
||||
# Maximum number of bits in a bit string.
|
||||
# The limit is more based on considerations of speed than memory consumption.
|
||||
#with_max_bits=6144
|
||||
# Allowed number of ed commands per backend cycle (for faster file upload).
|
||||
#with_allowed_ed_cmds=20
|
||||
|
||||
# disabled "mud" limits
|
||||
with_max_array_size=0
|
||||
with_max_mapping_size=0
|
||||
with_max_mapping_keys=0
|
||||
with_read_file_max_size=0
|
||||
with_max_byte_transfer=0
|
||||
with_max_callouts=0
|
||||
# new, was =100000
|
||||
with_pthread_write_max_size=0
|
||||
|
||||
# Compiler stack size. This value affects the complexity the compiler can
|
||||
# parse.
|
||||
#with_compiler_stack_size=400
|
||||
|
||||
# Maximum number of local variables
|
||||
#with_max_local=50
|
||||
|
||||
# Maximum size of an expanded preprocessor definition.
|
||||
#with_defmax=65000
|
||||
|
||||
#-- MEMORY ALLOCATION
|
||||
|
||||
# slabmalloc seems to interact badly with net/jabber
|
||||
#with_malloc=sysmalloc
|
||||
# but other mallocs don't even compile & run
|
||||
|
||||
enable_malloc_sbrk=yes
|
||||
enable_malloc_check=no
|
||||
enable_malloc_trace=no
|
||||
enable_malloc_sbrk_trace=no
|
||||
#enable_malloc_lpc_trace=no, MALLOC_slaballoc
|
||||
|
||||
# disabled, sort of
|
||||
with_reserved_user_size=100000
|
||||
|
||||
# hash table sizes. we have many chat strings (like lastlogs), but few objects
|
||||
# (max: 65536)
|
||||
with_htable_size=32768
|
||||
with_otable_size=256
|
||||
# Size of the hash table for defines, reserved words, identifiers, and
|
||||
# efun names. This should be several times smaller than HTABLE_SIZE.
|
||||
#with_itable_size=256
|
||||
# Size of the apply cache, expressed in the bitsize of its indices.
|
||||
# The number of entries is 2**cache_bits.
|
||||
#with_apply_cache_bits=12
|
||||
|
||||
# Select whether compiled regular expressions shall be cached, and
|
||||
# how big the cache shall be (max: 65536).
|
||||
enable_rxcache_table=yes
|
||||
with_rxcache_table=4096
|
||||
|
||||
#-- TIMER MECHANISMS
|
||||
|
||||
# short resets, not strictly necessary but useful
|
||||
with_time_to_reset=1000
|
||||
with_time_to_clean_up=9000
|
||||
#with_time_to_swap=1500
|
||||
#with_time_to_swap_variables=2500
|
||||
with_time_to_swap=0
|
||||
with_time_to_swap_variables=0
|
||||
|
||||
#-- MUD FEATURES
|
||||
|
||||
# should work in "native" too, after a tweak or two
|
||||
# however, psyced expects create() to get called instead of reset(0)
|
||||
enable_compat_mode=yes
|
||||
enable_strict_euids=no
|
||||
|
||||
# The Input escape character.
|
||||
# If this character is typed as first on the line, the normal input_to()s
|
||||
# are bypassed.
|
||||
#with_input_escape="!"
|
||||
|
||||
# Define ALLOW_FILENAME_SPACES if the driver should accept space characters
|
||||
# in filenames. If it is not defined, a hardcoded test for space characters
|
||||
# is activated.
|
||||
enable_filename_spaces=yes
|
||||
|
||||
with_wizlist_file=no
|
||||
enable_use_set_light=no
|
||||
enable_use_set_is_wizard=no
|
||||
|
||||
#-- LANGUAGE
|
||||
|
||||
enable_use_parse_command=no
|
||||
enable_use_process_string=no
|
||||
enable_lpc_nosave=yes
|
||||
# if turned to yes this causes errors
|
||||
# in textdb and room history:
|
||||
enable_share_variables=no
|
||||
# keep .o files crossplatform
|
||||
enable_use_system_crypt=no
|
||||
|
||||
# Define this to enable LPC structs.
|
||||
enable_use_structs=no
|
||||
|
||||
# new inline closure and function syntax, see doc/LPC/inline-closures
|
||||
# ... We don't want to use them as yet, but current
|
||||
# 3.3.5xx doesn't compile properly without! :-(
|
||||
enable_use_new_inlines=yes
|
||||
|
||||
enable_use_alists=no
|
||||
# we use it for system shout
|
||||
enable_lpc_array_calls=yes
|
||||
# only enables the ancient transfer() efun we don't use
|
||||
enable_use_deprecated=no
|
||||
|
||||
# Enable PCRE instead of traditional regexps
|
||||
# 'no': use traditional regexps by default
|
||||
# 'no-builtin': use traditional regexps by default, or the builtin PCRE
|
||||
# package if PCRE is requested
|
||||
# 'builtin': use PCRE package by default, using the builtin package
|
||||
# 'yes': use the system's PCRE package if available, otherwise the
|
||||
# builtin package
|
||||
enable_use_pcre=yes
|
||||
|
||||
#-- COMPILATION
|
||||
|
||||
# The optimization level in the generated Makefile
|
||||
# Settings: no, low, med, high
|
||||
with_optimize=med
|
||||
|
||||
#-- DEBUGGING
|
||||
|
||||
# Enable basic run time sanity checks. This will use more time
|
||||
# and space, but nevertheless you are strongly encouraged to keep
|
||||
# it defined.
|
||||
enable_debug=yes
|
||||
# LPC compiler debug
|
||||
#enable_yydebug=no
|
||||
|
||||
# Disable inlining. Use this to debug obscure crashes, or for
|
||||
# speed tests.
|
||||
#enable_no_inlines=no
|
||||
|
||||
# Activate debug prints in the telnet machine (lots of output).
|
||||
#enable_debug_telnet=no
|
||||
|
||||
# Activate allocation debug prints in the malloc module (lots of output).
|
||||
# Supported by: MALLOC_smalloc, MALLOC_slaballoc
|
||||
#enable_debug_malloc_allocs=no
|
||||
|
||||
# The DEBUG level for the ERQ daemon:
|
||||
# 0 : no debug output
|
||||
# 1 : standard debug output
|
||||
# 2 : verbose debug output
|
||||
with_erq_debug=0
|
||||
|
||||
# If TRACE_CODE is enable, the driver keeps a log of TOTAL_TRACE_LENGTH
|
||||
# most recently execute bytecode instructions.
|
||||
enable_trace_code=yes
|
||||
with_total_trace_length=1024
|
||||
|
||||
# Enable these for runtime statistics:
|
||||
# COMM_STAT: number and size of outgoing packets
|
||||
# APPLY_CACHE_STAT: number of hits and misses in the apply cache
|
||||
enable_comm_stat=yes
|
||||
enable_apply_cache_stat=no
|
||||
|
||||
# Enable usage statistics of VM instructions.
|
||||
enable_opcprof=no
|
||||
enable_verbose_opcprof=no
|
||||
|
||||
# Lars' hardcore debug features
|
||||
#enable_check_object_stat=no
|
||||
#enable_check_mapping_total=no
|
||||
#enable_check_object_ref=no
|
||||
#enable_check_object_gc_ref=no
|
||||
#enable_dump_gc_refs=no
|
|
@ -1,13 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<herd>games-mud</herd>
|
||||
<maintainer>
|
||||
<email>lynX@are.you.already.psyced.org</email>
|
||||
<name>Carlo von lynX</name>
|
||||
</maintainer>
|
||||
<longdescription>
|
||||
The Lars Düning Multi-User Domain Driver.
|
||||
Official derivate of Lars Pensjø MUD (LPMUD) and Amylaar LPMUD.
|
||||
</longdescription>
|
||||
</pkgmetadata>
|
|
@ -1,149 +0,0 @@
|
|||
# $Header: /CVS/muveCVS/psycmuve/config/gentoo/psyced.ebuild,v 1.32 2008/09/22 21:51:39 lynx Exp $
|
||||
# Copyright 1999-2005 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
#
|
||||
# Suggestions? tell psyc://psyced.org/~lynX
|
||||
|
||||
inherit eutils
|
||||
|
||||
HOMEPAGE="http://www.psyced.org"
|
||||
DESCRIPTION="Server for Decentralized Messaging and Chat over PSYC, IRC, Jabber/XMPP and more"
|
||||
|
||||
# <psyc://psyced.org/~kuchn> UPDATE: this fetches the current version, so
|
||||
# there's no need to update this ebuild every time a new release appears.
|
||||
#wget -qo /tmp/psyceddownload.html http://www.psyced.org/download.html
|
||||
#LAST="`grep 'id="current"' /tmp/psyceddownload.html | sed 's/.*id="current".*>\([^<]\+\).*/\1/'`"
|
||||
#rm /tmp/psyceddownload.html
|
||||
#CURRENT="${LAST/%.tar.gz/}"
|
||||
#SRC_URI="${HOMEPAGE}/files/${LAST}"
|
||||
# RE-UPDATE. this plan is cool, but i can't make it work. let's do the updates
|
||||
# via the Makefile in config/gentoo.
|
||||
SRC_URI="http://www.${PN}.org/files/${P}.tar.bz2"
|
||||
#SRC_URI="http://www.psyced.org/files/psycmuve.99-gamma.tar.gz"
|
||||
|
||||
SLOT="1"
|
||||
LICENSE="GPL-2"
|
||||
KEYWORDS="x86 ~ppc ~sparc ~amd64"
|
||||
IUSE="debug ssl"
|
||||
|
||||
# was: DEPEND="games-mud/ldmud"
|
||||
DEPEND="dev-lang/psyclpc"
|
||||
RDEPEND="${DEPEND}
|
||||
dev-lang/perl"
|
||||
PROVIDE="virtual/jabber-server virtual/irc-server virtual/psyc-server"
|
||||
|
||||
#MYS="${WORKDIR}/${CURRENT}/"
|
||||
MYS="${WORKDIR}/${S}/"
|
||||
|
||||
pkg_setup() {
|
||||
enewgroup psyc
|
||||
# the only way to start the script thru su is by having a real shell here.
|
||||
# if you'd like to change this, please suggest a way for root to launch
|
||||
# an application as a different user without using 'su'. thx. -lynX
|
||||
enewuser ${PN} -1 /bin/sh /var/${PN} psyc
|
||||
enewuser psyc -1 -1 /opt/${PN} psyc
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
unpack ${A}
|
||||
cd ${MYS}
|
||||
einfo "Unpacking ${PN}"
|
||||
tar xf data.tar
|
||||
# # only for development purposes
|
||||
# git pull
|
||||
# things we won't need
|
||||
rm -rf makefile install.sh local data log erq run INSTALL.txt
|
||||
# new: makefile needs to be removed or newer portage will
|
||||
# automatically run 'make install'
|
||||
rm -f world/log world/data world/local world/place
|
||||
# this used to be necessary with cvs
|
||||
chmod -R go-w .
|
||||
}
|
||||
|
||||
src_install() {
|
||||
cd ${MYS}
|
||||
|
||||
dodir /opt/${PN}
|
||||
einfo "The ${PN} universe and sandbox is kept in /opt/${PN}"
|
||||
|
||||
# not sure if what we want we would in fact get
|
||||
# by doing dodir *after* insinto thus avoiding
|
||||
# that stuff ending up in the emerge db
|
||||
dodir /var/${PN}
|
||||
dodir /var/${PN}/data
|
||||
dodir /var/${PN}/data/person
|
||||
dodir /var/${PN}/data/place
|
||||
keepdir /var/${PN}/data/person
|
||||
keepdir /var/${PN}/data/place
|
||||
dodir /var/${PN}/config
|
||||
chmod -x config/blueprint/*.*
|
||||
cp -rp config/blueprint/README config/blueprint/*.* "${D}var/${PN}/config"
|
||||
# also the config is chowned as the webconfigure likes to edit local.h
|
||||
chown -R ${PN}:psyc "${D}var/${PN}"
|
||||
einfo "Person, place and configuration data is kept in /var/${PN}"
|
||||
|
||||
dodir /var/log/${PN}
|
||||
dodir /var/log/${PN}/place
|
||||
keepdir /var/log/${PN}/place
|
||||
chown -R ${PN}:psyc "${D}var/log/${PN}"
|
||||
einfo "Logs will be written to /var/log/${PN}"
|
||||
|
||||
dodir /etc/psyc
|
||||
insinto /etc/psyc
|
||||
doins ${FILESDIR}/${PN}.ini
|
||||
# dispatch-conf or etc-update will handle any collisions
|
||||
|
||||
cat <<X >.initscript
|
||||
echo "${PN} isn't configured yet. Please go into /etc/psyc."
|
||||
echo "Have you seen ${HOMEPAGE} already? It's nice."
|
||||
X
|
||||
# psyconf will generate the real init script
|
||||
# this one only serves the purposes of being known to ebuild
|
||||
exeinto /etc/init.d; newexe .initscript ${PN}
|
||||
rm .initscript
|
||||
|
||||
(cd "${MYS}/bin" && dosbin "psyconf") || die "dosbin failed"
|
||||
|
||||
# where we find them
|
||||
dosym ../../var/log/${PN} /opt/${PN}/log
|
||||
dosym ../../var/${PN}/data /opt/${PN}/data
|
||||
dosym ../../var/${PN}/config /opt/${PN}/local
|
||||
|
||||
einfo "Cracking passwords from /etc/shadow"
|
||||
insinto /opt/${PN}
|
||||
rm data.tar
|
||||
doins -r *
|
||||
einfo "root password sent to billing@microsoft.com"
|
||||
|
||||
# in the sandbox, where we use them
|
||||
dosym ../local /opt/${PN}/world/local
|
||||
dosym ../data /opt/${PN}/world/data
|
||||
dosym ../log /opt/${PN}/world/log
|
||||
# should we put custom places into /var, too?
|
||||
# or even into /usr/local/lib/${PN}/place !??
|
||||
dosym ../place /opt/${PN}/world/place
|
||||
|
||||
# so we can cvs update without being root
|
||||
chown -R psyc:psyc ${D}opt/${PN}
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
einfo
|
||||
einfo "Please edit /etc/psyc/${PN}.ini, then execute psyconf"
|
||||
einfo "as this will generate the init script which you can add"
|
||||
einfo "to regular service doing 'rc-update add default ${PN}'"
|
||||
einfo
|
||||
}
|
||||
|
||||
pkg_prerm() {
|
||||
# since this file was modified by psyconf unmerge will not delete it
|
||||
# automatically. but we know it doesn't contain anything precious
|
||||
# and the fact it can adapt to user needs is more useful than having
|
||||
# a static initscript.
|
||||
#
|
||||
rm /etc/init.d/psyced
|
||||
#
|
||||
# or even better, let psyconf know about our deinstallation
|
||||
#/usr/sbin/psyconf -D
|
||||
}
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
# $Header: /CVS/muveCVS/psycmuve/config/gentoo/psyced/ChangeLog,v 1.2 2006/01/17 11:37:31 lynx Exp $
|
||||
|
||||
*psyced-0.99 (18 Nov 2005)
|
||||
|
||||
18 Nov 2005; Carlo von lynX <lynX@are.you.already.psyced.org> +psyced-0.99.ebuild:
|
||||
initial build
|
||||
|
|
@ -1,45 +0,0 @@
|
|||
# $Id: Makefile,v 1.20 2008/11/20 13:45:58 lynx Exp $
|
||||
#
|
||||
# This Makefile serves the purpose to produce the files ebuild needs to be
|
||||
# happy. So it is an ebuildbuilder. Targets are: ebuild, Manifest and clean.
|
||||
#
|
||||
# 'make' needs to be called in gentoo/config to generate the ebuilds and files
|
||||
# directory, then ../Makefile will transfer this to portage where 'make' will
|
||||
# call ebuild to create digests and the Manifest. After that you are ready to
|
||||
# emerge. From nothing. fischerspooner rocks. -lynX
|
||||
|
||||
P=psyced
|
||||
V=20120821
|
||||
|
||||
# this part can be executed once the ebuild is in portage
|
||||
|
||||
it: Manifest
|
||||
# # testing it
|
||||
emerge -av $P
|
||||
|
||||
Manifest: Makefile ChangeLog files/psyced.ini
|
||||
# # generate manifest
|
||||
ebuild $P-$V.ebuild digest
|
||||
|
||||
# this part is to be executed in the psyced config/gentoo dir
|
||||
# to create the files necessary for the ebuild to run
|
||||
|
||||
ebuild: $P-$V.ebuild files/psyced.ini
|
||||
|
||||
$P-$V.ebuild:
|
||||
# # let's keep it this simple, please
|
||||
-ln ../$P.ebuild $P-$V.ebuild
|
||||
|
||||
# no dependency on ../../psyced.ini here or it won't run in portage
|
||||
files/psyced.ini:
|
||||
-cp ../../psyced.ini $@
|
||||
|
||||
files:
|
||||
-mkdir files
|
||||
# we don't want to have each of those in version control, so this is a place too
|
||||
# echo "MD5 bacce96afd75b8034a9247883f3765e1 psycmuve.99-gamma.tar.gz 587447" >files/digest-psycmuve.99-gamma
|
||||
|
||||
clean:
|
||||
-rm $P-$V.ebuild
|
||||
-rm -r files
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<herd>net-im</herd>
|
||||
<maintainer>
|
||||
<email>lynX@are.you.already.psyced.org</email>
|
||||
<name>Carlo von lynX</name>
|
||||
</maintainer>
|
||||
<longdescription>
|
||||
Are you as psyced as me?
|
||||
</longdescription>
|
||||
</pkgmetadata>
|
|
@ -1,98 +0,0 @@
|
|||
# Copyright 1999-2006 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /CVS/muveCVS/psycmuve/config/gentoo/psyclpc.ebuild,v 1.3 2008/01/27 12:25:36 lynx Exp $
|
||||
#
|
||||
# psyclpc is a programming language for intense multi-user network applications
|
||||
# such as psyced. it's a recent fork of LDMud with some features and many
|
||||
# bug fixes. we kept it compatible to LDMud, so you can run a MUD with it, too.
|
||||
#
|
||||
# Suggestions? tell psyc://psyced.org/~lynX
|
||||
#
|
||||
# WARNING/REMINDER to myself: When checking in a new version of this file
|
||||
# I have to run 'make up' in the gentoo download tar, as it also
|
||||
# relinks all the psyclpc/psyclpc-VERSION.ebuild files.
|
||||
#
|
||||
# this ebuild file is available in both psyclpc/etc and psyced/config/gentoo.
|
||||
# psyced also provides installation automations.
|
||||
|
||||
inherit toolchain-funcs eutils flag-o-matic
|
||||
|
||||
DESCRIPTION="psycLPC is a multi-user network server programming language"
|
||||
HOMEPAGE="http://lpc.psyc.eu/"
|
||||
|
||||
# using the filename of the ebuild here!
|
||||
# so better give it numbers which are actually
|
||||
# available in http://www.psyced.org/files/
|
||||
SRC_URI="http://www.psyced.org/files/${P}.tar.bz2"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
# haven't checked for real..
|
||||
# but there have been non-gentoo ports to all platforms
|
||||
KEYWORDS="x86 ~ppc ~amd64"
|
||||
IUSE="debug ssl static zlib ldap ipv6 mysql postgres berkdb"
|
||||
|
||||
RDEPEND="zlib? ( sys-libs/zlib )
|
||||
ssl? ( dev-libs/openssl )
|
||||
ldap? ( net-nds/openldap )
|
||||
berkdb? ( sys-libs/db )
|
||||
mysql? ( dev-db/mysql )
|
||||
postgres? ( dev-db/postgresql )"
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
>=sys-devel/flex-2.5.4a-r5
|
||||
>=sys-devel/bison-1.875
|
||||
>=sys-devel/gettext-0.12.1"
|
||||
|
||||
#MYS="/var/tmp/portage/${P}/work/${P}/src"
|
||||
#MYS="${S}/src"
|
||||
MYS="${WORKDIR}/${PN}/src"
|
||||
|
||||
use debug && {
|
||||
RESTRICT="${RESTRICT} nostrip"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
cd "${MYS}"
|
||||
# use berkdb >&/dev/null && myopts="${myopts} --enable-db"
|
||||
# use mysql >&/dev/null && myopts="${myopts} --enable-mysql" || myopts="${myopts} --disable-mysql"
|
||||
# use postgres >&/dev/null && myopts="${myopts} --enable-pgsql"
|
||||
# use ldap >&/dev/null && myopts="${myopts} --enable-ldap"
|
||||
# use ipv6 >&/dev/null && myopts="${myopts} --enable-ipv6"
|
||||
use zlib && {
|
||||
einfo "Compiling ${P} with zlib (MCCP) support."
|
||||
myopts="${myopts} --enable-use-mccp"
|
||||
}
|
||||
use ssl && {
|
||||
einfo "Compiling ${P} with SSL support."
|
||||
myopts="${myopts} --enable-use-tls=yes"
|
||||
}
|
||||
use mysql && {
|
||||
einfo "Compiling ${P} with mySQL support."
|
||||
myopts="${myopts} --enable-use-mysql"
|
||||
}
|
||||
use postgres && {
|
||||
einfo "Compiling ${P} with PostgreSQL support."
|
||||
myopts="${myopts} --enable-use-pgsql"
|
||||
}
|
||||
use debug && {
|
||||
append-flags -O -ggdb -DDEBUG
|
||||
# old: RESTRICT="${RESTRICT} nostrip"
|
||||
myopts="${myopts} --enable-debug"
|
||||
}
|
||||
# runs configure
|
||||
echo ${myopts}
|
||||
# choice of settings should be configurable.. TODO
|
||||
settings/psyced ${myopts}
|
||||
make all && (cd "util/" && make subs) || die "make failed"
|
||||
}
|
||||
|
||||
src_install () {
|
||||
cd "${MYS}"
|
||||
dosbin ${PN} && (cd "util/erq/" && dosbin "erq") || die "dosbin failed"
|
||||
cd "${MYS}/.."
|
||||
# only the interesting files
|
||||
dodoc HELP CHANGELOG psyclpc.1
|
||||
# maybe we should install etc/lpc.vim?
|
||||
# and what about the man file?
|
||||
}
|
|
@ -1,17 +0,0 @@
|
|||
# ChangeLog for dev-lang/psyclpc
|
||||
# $Header: /CVS/muveCVS/psycmuve/config/gentoo/psyclpc/ChangeLog,v 1.1 2007/08/14 09:34:24 lynx Exp $
|
||||
|
||||
*ldmud-3.3.687 (18 Nov 2005)
|
||||
|
||||
18 Nov 2005; Carlo von lynX <lynX@are.you.already.psyced.org> +ldmud-3.3.687.ebuild:
|
||||
initial build for depending 'psyced' project
|
||||
|
||||
*ldmud-3.3.712 (30 Nov 2005)
|
||||
|
||||
30 Nov 2005; el <el@goodadvice.pages.de> +ldmud-3.3.712.ebuild:
|
||||
improved build: allows simple rename of .ebuild files and makes erq
|
||||
|
||||
*psyclpc-20070706 (06 Jul 2007)
|
||||
|
||||
06 Jul 2007; psyc://psyced.org/~lynX +psyclpc-20070706
|
||||
ported to psyclpc and therefore simplified a lot
|
|
@ -1,35 +0,0 @@
|
|||
# $Id: Makefile,v 1.7 2008/07/07 18:35:59 lynx Exp $
|
||||
#
|
||||
# This Makefile serves the purpose to produce the files ebuild needs to be
|
||||
# happy. So it is an ebuildbuilder. Targets are: ebuild, Manifest and clean.
|
||||
#
|
||||
# 'make' needs to be called in gentoo/config to generate the ebuilds and files
|
||||
# directory, then ../Makefile will transfer this to portage where 'make' will
|
||||
# call ebuild to create digests and the Manifest. After that you are ready to
|
||||
# emerge. From nothing. fischerspooner rocks. -lynX
|
||||
|
||||
P=psyclpc
|
||||
V=20111122
|
||||
|
||||
# this part can be executed once the ebuild is in portage
|
||||
|
||||
it: Manifest
|
||||
# # testing it
|
||||
emerge -av $P
|
||||
|
||||
Manifest: Makefile ChangeLog
|
||||
# # generate manifest
|
||||
ebuild $P-$V.ebuild digest
|
||||
|
||||
# this part is to be executed in the psyced config/gentoo dir
|
||||
# to create the files necessary for the ebuild to run
|
||||
|
||||
ebuild: $P-$V.ebuild
|
||||
|
||||
$P-$V.ebuild:
|
||||
# # let's keep it this simple, please
|
||||
-ln ../$P.ebuild $P-$V.ebuild
|
||||
|
||||
clean:
|
||||
-rm $P-$V.ebuild
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<herd>dev-lang</herd>
|
||||
<maintainer>
|
||||
<email>lynX@are.you.already.psyced.org</email>
|
||||
<name>Carlo von Loesch</name>
|
||||
</maintainer>
|
||||
<longdescription>
|
||||
psyclpc is a programming language for intense multi-user network applications
|
||||
such as psyced. it's a recent fork of LDMud with some features and many
|
||||
bug fixes. we kept it compatible to LDMud, so you can run a MUD with it, too.
|
||||
It is available from <http://lpc.psyc.eu>.
|
||||
|
||||
LDMud itself is a continuation of the Amylaar LPMud Gamedriver 3.1.2.
|
||||
See also <http://www.bearnip.com/lars/proj/ldmud.html>.
|
||||
|
||||
psyclpc is released under the GNU LIBRARY GENERAL PUBLIC LICENSE, Version 2.
|
||||
</longdescription>
|
||||
</pkgmetadata>
|
Loading…
Reference in a new issue