ebuild for beta version of psybnc
This commit is contained in:
79
net-irc/psybnc/files/compile.diff
Normal file
79
net-irc/psybnc/files/compile.diff
Normal file
@ -0,0 +1,79 @@
|
||||
diff -Naurp src/p_blowfish.c src/p_blowfish.c
|
||||
--- src/p_blowfish.c 2007-02-26 12:16:53.000000000 +0000
|
||||
+++ src/p_blowfish.c 2007-02-26 12:17:11.000000000 +0000
|
||||
@@ -31,7 +31,7 @@ static char rcsid[] = "@(#)$Id: p_blowfi
|
||||
#include <string.h>
|
||||
#include <config.h>
|
||||
|
||||
-char *strmncpy(char *dest, char *source, size_t len);
|
||||
+char *strmncpy(char *dest, const char *source, size_t len);
|
||||
char *lngtxt(int msgnum);
|
||||
|
||||
#define pcontext { strmncpy(ctxt,__FILE__,sizeof(ctxt));strmncpy(cfunc,__FUNCTION__,sizeof(cfunc)); cline=__LINE__; }
|
||||
diff -Naurp src/p_global.h src/p_global.h
|
||||
--- src/p_global.h 2007-02-26 12:16:53.000000000 +0000
|
||||
+++ src/p_global.h 2007-02-26 12:17:11.000000000 +0000
|
||||
@@ -972,8 +972,8 @@ int checklogging(int usern);
|
||||
#endif
|
||||
|
||||
#ifndef P_MEMORY
|
||||
-unsigned long *__pmalloc(unsigned long size,char *module,char *function,int line);
|
||||
-void _pfree(void * pointer,char *module, char *function, int line);
|
||||
+unsigned long *__pmalloc(unsigned long size,const char *module,const char *function,int line);
|
||||
+void _pfree(void * pointer,char *module, const char *function, int line);
|
||||
struct usert *user(int usern);
|
||||
struct newpeert *newpeer(int usern);
|
||||
struct datalinkt *datalink(int usern);
|
||||
@@ -1092,7 +1092,7 @@ int replace(char *rps, char whatc, char
|
||||
char *nobreak(char *tobreak);
|
||||
char *randstring(int length);
|
||||
char *strmcat(char *first,char *second);
|
||||
-char *strmncpy(char *dest, char *source, unsigned int len);
|
||||
+char *strmncpy(char *dest, const char *source, unsigned int len);
|
||||
int strmncasecmp(char *one, char *two);
|
||||
int strmcmp(char *one, char *two);
|
||||
int strmwildcmp(char *line, char *wildcard);
|
||||
diff -Naurp src/p_memory.c src/p_memory.c
|
||||
--- src/p_memory.c 2007-02-26 12:16:53.000000000 +0000
|
||||
+++ src/p_memory.c 2007-02-26 12:17:11.000000000 +0000
|
||||
@@ -32,7 +32,7 @@ FILE *logm=NULL;
|
||||
|
||||
/* malloc-wrapper. No memory will log an error entry and kill the bouncer */
|
||||
|
||||
-unsigned long *__pmalloc(unsigned long size,char *module,char *function, int line)
|
||||
+unsigned long *__pmalloc(unsigned long size,const char *module,const char *function, int line)
|
||||
{
|
||||
unsigned long *rc;
|
||||
if (!(rc=(unsigned long *)malloc(size)))
|
||||
@@ -53,7 +53,7 @@ unsigned long *__pmalloc(unsigned long s
|
||||
return rc;
|
||||
}
|
||||
|
||||
-void _pfree(unsigned long *pointer, char *module, char *function, int line)
|
||||
+void _pfree(unsigned long *pointer, char *module, const char *function, int line)
|
||||
{
|
||||
#ifdef LOGALLOC
|
||||
if(logm==NULL)
|
||||
diff -Naurp src/p_string.c src/p_string.c
|
||||
--- src/p_string.c 2007-02-26 12:16:53.000000000 +0000
|
||||
+++ src/p_string.c 2007-02-26 12:17:11.000000000 +0000
|
||||
@@ -51,7 +51,7 @@ char *lngtxt(unsigned int msgnum)
|
||||
|
||||
/* string copy with len and zero delimit */
|
||||
|
||||
-char *strmncpy(char *dest, char *source, unsigned int len)
|
||||
+char *strmncpy(char *dest, const char *source, unsigned int len)
|
||||
{
|
||||
char bf[strlen(source)+2];
|
||||
char *pt;
|
||||
diff -Naurp src/match.c src/match.c
|
||||
--- src/match.c 2007-02-26 12:26:10.000000000 +0000
|
||||
+++ src/match.c 2007-02-26 12:26:17.000000000 +0000
|
||||
@@ -36,6 +36,7 @@
|
||||
/* Remove the next line to use this in IrcII */
|
||||
#define EGGDROP
|
||||
|
||||
+#include <p_global.h>
|
||||
|
||||
/* ===================================================================
|
||||
* Best to leave stuff after this point alone, but go on and change
|
7
net-irc/psybnc/files/oidentd.conf.psybnc
Normal file
7
net-irc/psybnc/files/oidentd.conf.psybnc
Normal file
@ -0,0 +1,7 @@
|
||||
user psybnc {
|
||||
default {
|
||||
allow spoof
|
||||
allow spoof_all
|
||||
allow spoof_privport
|
||||
}
|
||||
}
|
56
net-irc/psybnc/files/psybnc-2.4_beta1-config.h
Normal file
56
net-irc/psybnc/files/psybnc-2.4_beta1-config.h
Normal file
@ -0,0 +1,56 @@
|
||||
/*
|
||||
* Configuration file for psyBNC, created by menuconf
|
||||
*/
|
||||
|
||||
/* Encryption */
|
||||
|
||||
#define CRYPT
|
||||
|
||||
/* Encryption Type*/
|
||||
|
||||
#define BLOWFISH
|
||||
|
||||
/* Allow Translation */
|
||||
|
||||
#define TRANSLATE
|
||||
|
||||
/* Allow internal network */
|
||||
|
||||
#define INTNET
|
||||
|
||||
/* Allow traffic logging */
|
||||
|
||||
#define TRAFFICLOG
|
||||
|
||||
/* Allow linkage of bouncers */
|
||||
|
||||
#define LINKAGE
|
||||
|
||||
/* Allow the dcc File-Functions */
|
||||
|
||||
#define DCCFILES
|
||||
|
||||
/* Pipe dcc Chats */
|
||||
|
||||
#define DCCCHAT
|
||||
|
||||
/* Allow to add more users */
|
||||
|
||||
#define MULTIUSER
|
||||
|
||||
/* Number of max. Users */
|
||||
|
||||
#define MAXUSER 50
|
||||
|
||||
/* Number of max. Connections per User */
|
||||
|
||||
#define MAXCONN 99
|
||||
|
||||
/* The logging level */
|
||||
|
||||
#define LOGLEVEL 0
|
||||
|
||||
/* SSL-Security */
|
||||
|
||||
#define SSLSEC 2
|
||||
|
11
net-irc/psybnc/files/psybnc-2.4_beta1-ldflags-fix.patch
Normal file
11
net-irc/psybnc/files/psybnc-2.4_beta1-ldflags-fix.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- tools/autoconf.c.orig 2012-07-03 22:55:46.955338792 +0400
|
||||
+++ tools/autoconf.c 2012-07-03 22:56:17.977337001 +0400
|
||||
@@ -637,7 +637,7 @@
|
||||
fprintf(makefile,"TARGET = psybnc\n");
|
||||
fprintf(makefile,"\n");
|
||||
fprintf(makefile,"all: $(OBJS)\n");
|
||||
- fprintf(makefile," $(CC) -o $(TARGET) $(CFLAGS) $(OBJS) %s $(LIBS)\n", dnsobj);
|
||||
+ fprintf(makefile," $(CC) -o $(TARGET) $(CFLAGS) ${LDFLAGS} $(OBJS) %s $(LIBS)\n", dnsobj);
|
||||
/* fprintf(makefile," @strip $(TARGET)\n");*/
|
||||
if(ssl==0)
|
||||
{
|
13
net-irc/psybnc/files/psybnc-2.4_beta1-multinetwork.patch
Normal file
13
net-irc/psybnc/files/psybnc-2.4_beta1-multinetwork.patch
Normal file
@ -0,0 +1,13 @@
|
||||
--- config.h.orig 2012-07-03 23:34:31.863039326 +0400
|
||||
+++ config.h 2012-07-03 23:34:57.407038916 +0400
|
||||
@@ -10,6 +10,10 @@
|
||||
|
||||
#define BLOWFISH
|
||||
|
||||
+/* Allow multiple irc connections per user */
|
||||
+
|
||||
+#define NETWORK
|
||||
+
|
||||
/* Allow Translation */
|
||||
|
||||
#define TRANSLATE
|
13
net-irc/psybnc/files/psybnc-2.4_beta1-oidentd.patch
Normal file
13
net-irc/psybnc/files/psybnc-2.4_beta1-oidentd.patch
Normal file
@ -0,0 +1,13 @@
|
||||
--- config.h.orig 2008-12-14 20:02:57.000000000 +0000
|
||||
+++ config.h 2008-12-14 20:03:35.000000000 +0000
|
||||
@@ -14,6 +14,10 @@
|
||||
|
||||
#define TRANSLATE
|
||||
|
||||
+/* Support oIdentd */
|
||||
+
|
||||
+#define OIDENTD
|
||||
+
|
||||
/* Allow internal network */
|
||||
|
||||
#define INTNET
|
13
net-irc/psybnc/files/psybnc-2.4_beta1-scripting.patch
Normal file
13
net-irc/psybnc/files/psybnc-2.4_beta1-scripting.patch
Normal file
@ -0,0 +1,13 @@
|
||||
--- config.h.orig 2009-01-03 17:30:41.000000000 +0000
|
||||
+++ config.h 2009-01-03 17:31:27.000000000 +0000
|
||||
@@ -26,6 +26,10 @@
|
||||
|
||||
#define TRAFFICLOG
|
||||
|
||||
+/* Allow scripting */
|
||||
+
|
||||
+#define SCRIPTING
|
||||
+
|
||||
/* Allow linkage of bouncers */
|
||||
|
||||
#define LINKAGE
|
42
net-irc/psybnc/files/psybnc-oidentd.initd
Normal file
42
net-irc/psybnc/files/psybnc-oidentd.initd
Normal file
@ -0,0 +1,42 @@
|
||||
#!/sbin/runscript
|
||||
# Copyright 1999-2007 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/net-irc/psybnc/files/psybnc-oidentd.initd,v 1.1 2008/12/14 18:23:14 gurligebis Exp $
|
||||
|
||||
depend() {
|
||||
need net oidentd
|
||||
}
|
||||
|
||||
check_config() {
|
||||
if [[ ! -f ${PSYBNC_CONFIG} ]]
|
||||
then
|
||||
eerror "Please set \$PSYBNC_CONFIG in /etc/conf.d/psybnc!"
|
||||
return 1
|
||||
fi
|
||||
|
||||
if [[ ! -d "${PSYBNC_HOME}" ]]
|
||||
then
|
||||
eerror "Please set \$PSYBNC_HOME in /etc/conf.d/psybnc!"
|
||||
return 1
|
||||
fi
|
||||
|
||||
if [[ -z "${PSYBNC_USER}" ]]
|
||||
then
|
||||
eerror "Please set \$PSYBNC_USER in /etc/conf.d/psybnc!"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
start() {
|
||||
check_config || return 1
|
||||
ebegin "Starting psyBNC"
|
||||
start-stop-daemon --start --quiet --chuid "${PSYBNC_USER}" --chdir "${PSYBNC_HOME}" -e HOME="${PSYBNC_HOME}" --exec /usr/bin/psybnc -- "${PSYBNC_CONFIG}" &>/dev/null
|
||||
eend $?
|
||||
}
|
||||
|
||||
stop() {
|
||||
check_config || return 1
|
||||
ebegin "Stopping psyBNC"
|
||||
start-stop-daemon --stop --quiet --pidfile "${PSYBNC_HOME}"/psybnc.pid --signal 9
|
||||
eend $?
|
||||
}
|
17
net-irc/psybnc/files/psybnc.conf
Normal file
17
net-irc/psybnc/files/psybnc.conf
Normal file
@ -0,0 +1,17 @@
|
||||
# Name
|
||||
PSYBNC.SYSTEM.ME=Gentoo
|
||||
|
||||
# Default listener
|
||||
PSYBNC.SYSTEM.PORT1=23998
|
||||
PSYBNC.SYSTEM.HOST1=*
|
||||
PSYBNC.HOSTALLOWS.ENTRY0=*;*
|
||||
|
||||
# Default SSL listener
|
||||
PSYBNC.SYSTEM.PORT2=23889
|
||||
PSYBNC.SYSTEM.HOST2=S=*
|
||||
PSYBNC.HOSTALLOWS.ENTRY1=*;*
|
||||
|
||||
# Default user
|
||||
USER1.USER.NICK=gentoo
|
||||
USER1.USER.PASS=gentoo
|
||||
USER1.USER.RIGHTS=1
|
5
net-irc/psybnc/files/psybnc.confd
Normal file
5
net-irc/psybnc/files/psybnc.confd
Normal file
@ -0,0 +1,5 @@
|
||||
# /etc/conf.d/psybnc
|
||||
|
||||
PSYBNC_CONFIG="/etc/psybnc/psybnc.conf"
|
||||
PSYBNC_HOME="/var/lib/psybnc"
|
||||
PSYBNC_USER="psybnc"
|
42
net-irc/psybnc/files/psybnc.initd
Normal file
42
net-irc/psybnc/files/psybnc.initd
Normal file
@ -0,0 +1,42 @@
|
||||
#!/sbin/runscript
|
||||
# Copyright 1999-2007 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/net-irc/psybnc/files/psybnc.initd,v 1.2 2007/02/26 00:03:08 gurligebis Exp $
|
||||
|
||||
depend() {
|
||||
need net
|
||||
}
|
||||
|
||||
check_config() {
|
||||
if [[ ! -f ${PSYBNC_CONFIG} ]]
|
||||
then
|
||||
eerror "Please set \$PSYBNC_CONFIG in /etc/conf.d/psybnc!"
|
||||
return 1
|
||||
fi
|
||||
|
||||
if [[ ! -d "${PSYBNC_HOME}" ]]
|
||||
then
|
||||
eerror "Please set \$PSYBNC_HOME in /etc/conf.d/psybnc!"
|
||||
return 1
|
||||
fi
|
||||
|
||||
if [[ -z "${PSYBNC_USER}" ]]
|
||||
then
|
||||
eerror "Please set \$PSYBNC_USER in /etc/conf.d/psybnc!"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
start() {
|
||||
check_config || return 1
|
||||
ebegin "Starting psyBNC"
|
||||
start-stop-daemon --start --quiet --chuid "${PSYBNC_USER}" --chdir "${PSYBNC_HOME}" --exec /usr/bin/psybnc -- "${PSYBNC_CONFIG}" &>/dev/null
|
||||
eend $?
|
||||
}
|
||||
|
||||
stop() {
|
||||
check_config || return 1
|
||||
ebegin "Stopping psyBNC"
|
||||
start-stop-daemon --stop --quiet --pidfile "${PSYBNC_HOME}"/psybnc.pid --signal 9
|
||||
eend $?
|
||||
}
|
Reference in New Issue
Block a user