summaryrefslogtreecommitdiff
path: root/net-irc/psybnc
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /net-irc/psybnc
reinit the tree, so we can have metadata
Diffstat (limited to 'net-irc/psybnc')
-rw-r--r--net-irc/psybnc/Manifest15
-rw-r--r--net-irc/psybnc/files/compile.diff79
-rw-r--r--net-irc/psybnc/files/ldflags-fix.patch12
-rw-r--r--net-irc/psybnc/files/oidentd.conf.psybnc7
-rw-r--r--net-irc/psybnc/files/psybnc-2.3.2.9-multinetwork.patch13
-rw-r--r--net-irc/psybnc/files/psybnc-2.3.2.9-oidentd.patch13
-rw-r--r--net-irc/psybnc/files/psybnc-2.3.2.9-scripting.patch13
-rw-r--r--net-irc/psybnc/files/psybnc-oidentd.initd41
-rw-r--r--net-irc/psybnc/files/psybnc.conf17
-rw-r--r--net-irc/psybnc/files/psybnc.confd5
-rw-r--r--net-irc/psybnc/files/psybnc.initd41
-rw-r--r--net-irc/psybnc/metadata.xml14
-rw-r--r--net-irc/psybnc/psybnc-2.3.2.9-r2.ebuild158
13 files changed, 428 insertions, 0 deletions
diff --git a/net-irc/psybnc/Manifest b/net-irc/psybnc/Manifest
new file mode 100644
index 000000000000..eca0e3eb9ce8
--- /dev/null
+++ b/net-irc/psybnc/Manifest
@@ -0,0 +1,15 @@
+AUX compile.diff 3224 SHA256 1d95bcc66ee8bffda1a56e54a18b50d955bc8522f709c5b8c5892a001ff24e4e SHA512 f0b7e573b401812bba613342ece8e2a9d3ab3dee4b8746cbc3fa5a24f817efd05eccb6676b0e003f43eb6c83f76ad4f42988981e4f30c0a93fd5ec0e78c2cd1d WHIRLPOOL 25ee1696f3d46ee69366ba4e22c0dce122a49812ba224066a246a0d0c72a4b161eb0f832a8b6e9c91709e06a067b23499e467a1b6a1bcaf54c85e9557193fde9
+AUX ldflags-fix.patch 540 SHA256 377c903ab1aa510480ca07bdf47884a13adcac9756778e581860b70625330aff SHA512 9ade1e441b0b890a8c2284128124c02786868803771d9acdae560811a7dc56d0cab3673250491b6e99e012a6265db1e0e17fbe5f19aa913d6cc9796c61619d9f WHIRLPOOL 2042252b7d60d072ff52e2d9d7c13770c05020c91fdcb9e5bc613bbb24b1300173abc38ee2fa68119a1523ce095330b30d57e910603a36bba722a01ddaeb417a
+AUX oidentd.conf.psybnc 92 SHA256 0363f6f7c2b2a39dc2b1ee3e41596adf6209bf3e770e9e7c0f13a9f6787c50dc SHA512 1670c597922c557eb4124ec75c41e30135dce47ced3f080051ef1f896b5b24ce8d0833b147fb5ba7b5056cc0c333ecd7a6105bb68f92a72e64f753253a2595ad WHIRLPOOL b742522ac7d32e3b2cf7191c2ecd1e8b229f814cc90e17a6103a6a661188432008cf52c3fb5850513b6ef9bbf0f8090c39d6afdd6c43d6e53803984abea7fcbb
+AUX psybnc-2.3.2.9-multinetwork.patch 261 SHA256 485375e40144079c69ba3dfd942ad9924aba2c7fc4545b67114d74c943c92fed SHA512 fee258905d67ff49e2a227767c0355146687b54307601d931ba8435a88e3399fc5c2a1efbaf6f368f8d316aec76f5810e1a3b664fa72bff29af0b79d761a2be4 WHIRLPOOL 007600b978c40fcc75533eaba23752aa6add080c2dc1a048c33ac8c08586d1f24f7993ee7f231e76da3f57419cd59b140a5f369456ae426be136b3ca17f144b5
+AUX psybnc-2.3.2.9-oidentd.patch 237 SHA256 43593043db85bf3dc3f1a5162afd873ac079afcb0aff9520799b51f362a2e29f SHA512 0c095c74ff6a9a76b417bdefa1b6d103b7fc25dd62c9446a8a2cf1faf0f3b46310e4c47b7b9072d081b240099d60420289eb5c2d1701b59e33a2a398a7e8d211 WHIRLPOOL 1e1ef9a60e2f7f34b886f4cf9ecfcfdc015f7efc23bf708016547133663f3a227cf622f8732bc200ed5a0051e922edb3c150fa5f9d3c42aca21dbd9fd2e5c0f1
+AUX psybnc-2.3.2.9-scripting.patch 244 SHA256 393a51d8da1de671e77072728086dba215e968823a1d53a5371977c9b1419396 SHA512 946d0cd7c79209f113dfea2bb4d35bfcb0f2a045e94d97cb969b7ac510cd61a1f32ee5a863fa751780bb05e808eeaefce3219cc9553a1232c09d1816421f5ae0 WHIRLPOOL 538b73bcf47a3baad93d217b8d3b82d0df84d59d8ff21c7ab20be7a8f5b8b31e05a4a7e7fc77717df7a9a22f4ec96d8497be4811be266ef5dbf87c3ebcc865a5
+AUX psybnc-oidentd.initd 931 SHA256 fbdc1b869b4e18f16670b9fbfa6814420aa62a050e3e01eca8648b577b6c6c25 SHA512 bc338b243d5cf73da0c662601ea2e5fadbe34a64f57cd0d09be55c773e1e1f807fb0c43d46d225a9461d353762b16cf6010710fbf4f43a9dece5130374952e12 WHIRLPOOL e11a4c973be18c56c85141d722756445a48db68eb557202a7360b1613a4e5a957e03e78d099120671579ded67df28d19aa4b8d484a99edfdd96a4e1fa1da8dac
+AUX psybnc.conf 313 SHA256 e4b04c86a4a1ed910b6cf21fa834eb1eeed166bb372cffbfe9674613f68a080f SHA512 0a5f587e70f9c9a83da820a03e77b6b119c5094fa334397762c4838c0a88bb5574a17d7aded274dab9bb6b041d1758e08e3f0d78df71b382bdc04fc8aabe3317 WHIRLPOOL 0927959b19c7cab8a805d87556707bdfeb5776ef1474394906e572436341908f44373b8fd0233bdbf4192c41272f71e9df12645d8657826c952c438a22206549
+AUX psybnc.confd 113 SHA256 5077226f94b59e2e1874b0019d00375f17b73a77a25533275a59f18af6bf24f2 SHA512 e58704dec299271d9a450eb243d0af1323aca58d555b61fc3aa899324a6bdc9aa82afc0597c190dc07c278f22c7cb448592a271e9ee6e4aa3552518ce6254753 WHIRLPOOL 019acd892c39342f53644071a7df8770d2638e881c8fbcb8dd3aa634b3a721d64aa36305eff60b2be9afd2a74026d9a872d623871602d0b7411143a655967d7c
+AUX psybnc.initd 898 SHA256 b7df97726262d4b504df4c466d5611cff847dc7105efc8729f3200b4f7d28ba6 SHA512 2ea77dfd515b81d53d7fe1b38fe3069d7d2081d939fdbb2c6ff97cd859a86ad8a52dd1b40e0b592a9368488759a3fb35741e25c6a5ade3045eb7159acd64bbbd WHIRLPOOL 2502f7cd824e4d426dd9e2456c05d9302e7f3f39816fb08806f7f37719d17668332e8ae6c9f2f9e9153ccb9bb4f98157872125d1efac165babb143507b3b97a1
+DIST psyBNC-2.3.2-9.tar.gz 318676 SHA256 9129ade198f26f7a47301d2ab5933a2844bdd187fca437f8264ae88f168e1644 SHA512 b664f57610e54fadd938b359a0e8052b8fe3dd36bd1ee339f36ee22ae4d36a76e803425c5133f925ac18c01767ffbc8a2f471c014b5b76b05894cfea9fe5416b WHIRLPOOL ebbab2b659aedcd81561a4a2c4a12142f1553d2bc097197ad332fd373559bba6d4f23bb16e7a7a4eaf74f33abfc3f3ec405263664e8d1ab3d26eda56b80af3b8
+EBUILD psybnc-2.3.2.9-r2.ebuild 4582 SHA256 edec8d6d63ad7b0da403b3fe2c2959581220fa7cdd1a102b0bb64acb76d962d2 SHA512 f4c18d8ec6bb989006fa6d81c9cff3a5cc7aa91ec5894b22e16d11948e02c24b5238d9d706f474f31a17d5020eb2621ad2f4a6af70799cbace0fb3ac96854374 WHIRLPOOL 77fcac9bbeb89aec14f48035995cbd81948c1a66e617742077f18d210d0bd4960227a92f3c8cb671929d288e297d8504d53b5c830de413c4e0c581f81e12c560
+MISC ChangeLog 3277 SHA256 3efd2e8d5b29618e90fa380423f8fdf1ded46f0ab5d46a5fc3bd034db1ac764b SHA512 f51be79fa3a38837445a9510e30ef0fe77c26d0764a4dc286fd916d6c7a1c46a44d99f39d331d36a78b35ef8b0946dd7727e9dbc3ba13c8f0de5f76d29702417 WHIRLPOOL c143900c3c7cf418bd05b71814dc4764ee2583d5ea80e06658b8e4c9f92dc0b9dfc4cb6d9cdc8127558b3d4534ee72852d56666850832da7d985f034739eb8d1
+MISC ChangeLog-2015 3095 SHA256 e86f910e1e8f621d9a9e6850d1a06a99f8cf32ea6d1229dee7ed376ee6dfbd34 SHA512 245ccf081d72dfabc26f873cd0e2b54e93ef89e682f4b3882705f97b509a89fe2a9c47302fa1d005327c7f00f456661b9f355fad648d2aea6b5ef837253e6b5b WHIRLPOOL 80a8525d06c88d69b1208eaf64dde0c9e3986b5d551891d64a556b363167a2cb0a548279c122f02d93f39cd6ca80e6067408e3988422870bb9d935052a8fc73d
+MISC metadata.xml 554 SHA256 8675ef9a975203e70f1260e8f4ea972b86dd3c4ad29aca4f7e94ccc7adf267ad SHA512 cbf3d7b05da1d5f3700e37b5f2b860a295eca80c2917afd08e5ca10df677f8e8860b4a78da43a43efe7e7f37d3b638ca78c82133e45d9f64767fd97540824f23 WHIRLPOOL 2c53e830a9a8d60878008bcd0364ad26fe3d12f522cbd19cbeab62c35930528c4bd315ecef951870c6e6493a37275056d70d5287a1a8153cc9490860cfca2bb6
diff --git a/net-irc/psybnc/files/compile.diff b/net-irc/psybnc/files/compile.diff
new file mode 100644
index 000000000000..fdee75c60732
--- /dev/null
+++ b/net-irc/psybnc/files/compile.diff
@@ -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$
+ #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
diff --git a/net-irc/psybnc/files/ldflags-fix.patch b/net-irc/psybnc/files/ldflags-fix.patch
new file mode 100644
index 000000000000..f5bc776b1e6b
--- /dev/null
+++ b/net-irc/psybnc/files/ldflags-fix.patch
@@ -0,0 +1,12 @@
+diff -aurp a/tools/autoconf.c b/tools/autoconf.c
+--- a/tools/autoconf.c 2010-10-10 20:25:29.295001235 +0000
++++ b/tools/autoconf.c 2010-10-10 20:26:02.738999569 +0000
+@@ -449,7 +449,7 @@ int main()
+ fprintf(makefile,"TARGET = psybnc\n");
+ fprintf(makefile,"\n");
+ fprintf(makefile,"all: $(OBJS)\n");
+- fprintf(makefile," $(CC) -o $(TARGET) $(CFLAGS) $(OBJS) $(LIBS)\n");
++ fprintf(makefile," $(CC) -o $(TARGET) $(CFLAGS) $(LDFLAGS) $(OBJS) $(LIBS)\n");
+ fprintf(makefile," @strip $(TARGET)\n");
+ if(ssl==0)
+ {
diff --git a/net-irc/psybnc/files/oidentd.conf.psybnc b/net-irc/psybnc/files/oidentd.conf.psybnc
new file mode 100644
index 000000000000..c8e4ed67505c
--- /dev/null
+++ b/net-irc/psybnc/files/oidentd.conf.psybnc
@@ -0,0 +1,7 @@
+user psybnc {
+ default {
+ allow spoof
+ allow spoof_all
+ allow spoof_privport
+ }
+}
diff --git a/net-irc/psybnc/files/psybnc-2.3.2.9-multinetwork.patch b/net-irc/psybnc/files/psybnc-2.3.2.9-multinetwork.patch
new file mode 100644
index 000000000000..4d796961d6ff
--- /dev/null
+++ b/net-irc/psybnc/files/psybnc-2.3.2.9-multinetwork.patch
@@ -0,0 +1,13 @@
+--- config.h.orig 2009-06-10 21:30:24.000000000 +0000
++++ config.h 2009-06-10 21:30:39.000000000 +0000
+@@ -50,6 +50,10 @@
+
+ #define BLOCKDNS
+
++/* Allow multiple irc connections per user */
++
++#define NETWORK
++
+ /* Fixes the freeze bug */
+
+ #define FREEZEFIX
diff --git a/net-irc/psybnc/files/psybnc-2.3.2.9-oidentd.patch b/net-irc/psybnc/files/psybnc-2.3.2.9-oidentd.patch
new file mode 100644
index 000000000000..fbb4b163e3a3
--- /dev/null
+++ b/net-irc/psybnc/files/psybnc-2.3.2.9-oidentd.patch
@@ -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
diff --git a/net-irc/psybnc/files/psybnc-2.3.2.9-scripting.patch b/net-irc/psybnc/files/psybnc-2.3.2.9-scripting.patch
new file mode 100644
index 000000000000..08dce4fa715b
--- /dev/null
+++ b/net-irc/psybnc/files/psybnc-2.3.2.9-scripting.patch
@@ -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
diff --git a/net-irc/psybnc/files/psybnc-oidentd.initd b/net-irc/psybnc/files/psybnc-oidentd.initd
new file mode 100644
index 000000000000..354e6416c23e
--- /dev/null
+++ b/net-irc/psybnc/files/psybnc-oidentd.initd
@@ -0,0 +1,41 @@
+#!/sbin/openrc-run
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+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 $?
+}
diff --git a/net-irc/psybnc/files/psybnc.conf b/net-irc/psybnc/files/psybnc.conf
new file mode 100644
index 000000000000..8a1ca8907e86
--- /dev/null
+++ b/net-irc/psybnc/files/psybnc.conf
@@ -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
diff --git a/net-irc/psybnc/files/psybnc.confd b/net-irc/psybnc/files/psybnc.confd
new file mode 100644
index 000000000000..cdd8f31f9457
--- /dev/null
+++ b/net-irc/psybnc/files/psybnc.confd
@@ -0,0 +1,5 @@
+# /etc/conf.d/psybnc
+
+PSYBNC_CONFIG="/etc/psybnc/psybnc.conf"
+PSYBNC_HOME="/var/lib/psybnc"
+PSYBNC_USER="psybnc"
diff --git a/net-irc/psybnc/files/psybnc.initd b/net-irc/psybnc/files/psybnc.initd
new file mode 100644
index 000000000000..add37167139b
--- /dev/null
+++ b/net-irc/psybnc/files/psybnc.initd
@@ -0,0 +1,41 @@
+#!/sbin/openrc-run
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+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 $?
+}
diff --git a/net-irc/psybnc/metadata.xml b/net-irc/psybnc/metadata.xml
new file mode 100644
index 000000000000..fc7667fe9321
--- /dev/null
+++ b/net-irc/psybnc/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>gurligebis@gentoo.org</email>
+ <name>Bjarke Istrup Pedersen</name>
+ </maintainer>
+ <use>
+ <flag name="oidentd">Adds support for oidentd</flag>
+ <flag name="scripting">Adds scripting support</flag>
+ <flag name="multinetwork">Adds support for multiple networks</flag>
+ </use>
+ <longdescription>psyBNC is a multi-user and multi-server gateway to IRC networks</longdescription>
+</pkgmetadata>
diff --git a/net-irc/psybnc/psybnc-2.3.2.9-r2.ebuild b/net-irc/psybnc/psybnc-2.3.2.9-r2.ebuild
new file mode 100644
index 000000000000..22fce24e47d3
--- /dev/null
+++ b/net-irc/psybnc/psybnc-2.3.2.9-r2.ebuild
@@ -0,0 +1,158 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="2"
+
+inherit eutils versionator toolchain-funcs flag-o-matic user
+MY_PV="$(replace_version_separator 3 -)"
+PSYBNC_HOME="/var/lib/psybnc"
+
+DESCRIPTION="psyBNC is a multi-user and multi-server gateway to IRC networks"
+HOMEPAGE="http://www.psybnc.at/index.html"
+SRC_URI="http://www.psybnc.at/download/beta/psyBNC-${MY_PV}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~sparc ~x86 ~ppc"
+IUSE="ipv6 ssl oidentd scripting multinetwork"
+
+DEPEND="ssl? ( >=dev-libs/openssl-0.9.7d )
+ oidentd? ( >=net-misc/oidentd-2.0 )"
+RDEPEND="${DEPEND}"
+S="${WORKDIR}"/"${PN}"
+
+pkg_setup() {
+ enewgroup psybnc
+ enewuser psybnc -1 -1 ${PSYBNC_HOME} psybnc
+}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ # Useless files
+ rm -f */INFO
+
+ # Pretend we already have a certificate, we generate it in pkg_config
+ mkdir key
+ touch key/psybnc.cert.pem
+
+ if [[ -f ${ROOT}/usr/share/psybnc/salt.h ]]
+ then
+ einfo "Using existing salt.h for password encryption"
+ cp "${ROOT}"/usr/share/psybnc/salt.h salt.h
+ fi
+}
+
+src_prepare() {
+ epatch "${FILESDIR}/compile.diff"
+ epatch "${FILESDIR}/ldflags-fix.patch"
+
+ # add oidentd
+ use oidentd && epatch "${FILESDIR}/${P}-oidentd.patch"
+
+ # add scripting support
+ use scripting && epatch "${FILESDIR}/${P}-scripting.patch"
+
+ # add multinetwork support
+ use multinetwork && epatch "${FILESDIR}/${P}-multinetwork.patch"
+
+ # Prevent stripping the binary
+ sed -i -e "/@strip/ d" tools/autoconf.c
+}
+
+src_compile() {
+ use ipv6 || rm -f tools/chkipv6.c
+ use ssl || rm -f tools/chkssl.c
+
+ emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" || die "emake failed"
+}
+
+src_install() {
+ dobin psybnc
+
+ insinto /usr/share/psybnc
+ doins -r help lang salt.h
+ fperms 0600 /usr/share/psybnc/salt.h
+
+ insinto /etc/psybnc
+ doins "${FILESDIR}"/psybnc.conf
+
+ keepdir "${PSYBNC_HOME}"/{log,motd,scripts}
+ dosym /usr/share/psybnc/lang "${PSYBNC_HOME}"/lang
+ dosym /usr/share/psybnc/help "${PSYBNC_HOME}"/help
+
+ fowners psybnc:psybnc "${PSYBNC_HOME}"/{,log,motd,scripts} /etc/psybnc/psybnc.conf
+ fperms 0750 "${PSYBNC_HOME}"/{,log,motd,scripts}
+ fperms 0640 /etc/psybnc/psybnc.conf
+
+ if use ssl
+ then
+ keepdir /etc/psybnc/ssl
+ dosym /etc/psybnc/ssl "${PSYBNC_HOME}"/key
+ else
+ # Drop SSL listener from psybnc.conf
+ sed -i -e "/^# Default SSL listener$/,+4 d" "${D}"/etc/psybnc/psybnc.conf
+ fi
+
+ if use oidentd
+ then
+ insinto /etc
+ doins "${FILESDIR}"/oidentd.conf.psybnc
+ fperms 640 /etc/oidentd.conf.psybnc
+ # install init-script with oidentd-support
+ newinitd "${FILESDIR}"/psybnc-oidentd.initd psybnc
+ else
+ # install init-script without oidentd-support
+ newinitd "${FILESDIR}"/psybnc.initd psybnc
+ fi
+
+ newconfd "${FILESDIR}"/psybnc.confd psybnc
+
+ dodoc CHANGES FAQ README SCRIPTING TODO
+ docinto example-script
+ dodoc scripts/example/DEFAULT.SCRIPT
+}
+
+pkg_config() {
+ if use ssl
+ then
+ if [[ -f ${ROOT}/etc/psybnc/ssl/psybnc.cert.pem || -f ${ROOT}/etc/psybnc/ssl/psybnc.key.pem ]]
+ then
+ ewarn "Existing /etc/psybnc/psybnc.cert.pem or /etc/psybnc/psybnc.key.pem found!"
+ ewarn "Remove /etc/psybnc/psybnc.*.pem and run emerge --config =${CATEGORY}/${PF} again."
+ return
+ fi
+
+ einfo "Generating certificate request..."
+ openssl req -new -out "${ROOT}"/etc/psybnc/ssl/psybnc.req.pem -keyout "${ROOT}"/etc/psybnc/ssl/psybnc.key.pem -nodes
+ einfo "Generating self-signed certificate..."
+ openssl req -x509 -days 365 -in "${ROOT}"/etc/psybnc/ssl/psybnc.req.pem -key "${ROOT}"/etc/psybnc/ssl/psybnc.key.pem -out "${ROOT}"/etc/psybnc/ssl/psybnc.cert.pem
+ einfo "Setting permissions on files..."
+ chown root:psybnc "${ROOT}"/etc/psybnc/ssl/psybnc.{cert,key,req}.pem
+ chmod 0640 "${ROOT}"/etc/psybnc/ssl/psybnc.{cert,key,req}.pem
+ fi
+}
+
+pkg_postinst() {
+ if use ssl
+ then
+ elog
+ elog "Please run \"emerge --config =${CATEGORY}/${PF}\" to create needed SSL certificates."
+ fi
+ if use oidentd
+ then
+ elog
+ elog "You have enabled oidentd-support. You will need to set"
+ elog "up your /etc/oident.conf file before running psybnc. An example"
+ elog "for psyBNC can be found under /etc/oidentd.conf.psybnc"
+ fi
+ elog
+ elog "You can connect to psyBNC on port 23998 with user gentoo and password gentoo."
+ elog "Please edit the psyBNC configuration at /etc/psybnc/psybnc.conf to change this."
+ elog
+ elog "To be able to reuse an existing psybnc.conf, you need to make sure that the"
+ elog "old salt.h is available at /usr/share/psybnc/salt.h when compiling a new"
+ elog "version of psyBNC. It is needed for password encryption and decryption."
+ elog
+}