Replaced PsyBNC with ZNC

This commit is contained in:
Kevin Mihelich 2010-08-29 12:25:49 -06:00
parent fa37faf6f9
commit 04fb4205f4
9 changed files with 29 additions and 190 deletions

View file

@ -1,47 +0,0 @@
pkgname=psybnc
_pkgname=psyBNC
pkgver=2.3.2_9
# note: if the pkgver had been '0.99-10' then use an underscore, i.e. '0.99_10'
_pkgver=2.3.2-9
pkgrel=2
pkgdesc="psyBNC is an easy-to-use, multi-user, permanent IRC-Bouncer with many features."
arch=('i686' 'x86_64' 'arm')
url="http://www.psybnc.at"
license=('GPL')
depends=('openssl')
makedepends=('ncurses')
backup=('usr/bin/psybnc/psybnc.conf')
source=(http://psybnc.at/download/beta/$_pkgname-$_pkgver.tar.gz compile.diff psybnc-2.3.2.9-multinetwork.patch psybnc-2.3.2.9-oidentd.patch psybnc-2.3.2.9-scripting.patch)
install=(psybnc.install)
md5sums=('c2757cdf2cab668eb374a22abecc5572'
'2124f394dd96767745c213070d934f54'
'065671a27e298a64c89ee2b62aecf0da'
'8666bbf5d677b3819bb930ed0ea63672'
'12604c39d6b35a8065a0813fb79e8a1c')
build() {
# Enter build directory
cd $srcdir/$pkgname || return 1
patch -p0 < ../compile.diff || return 1
patch -p0 < ../psybnc-2.3.2.9-multinetwork.patch || return 1
patch -p0 < ../psybnc-2.3.2.9-oidentd.patch || return 1
patch -p0 < ../psybnc-2.3.2.9-scripting.patch || return 1
# Prevent stripping the binary
sed -i -e "/@strip/ d" $srcdir/$pkgname/tools/autoconf.c || return 1
# Pretend we already have a certificate, we generate it in pkg_config
mkdir -p $srcdir/$pkgname/key || return 1
touch $srcdir/$pkgname/key/psybnc.cert.pem || return 1
make clean || return 1
make || return 1
# Create package tree and extract distributable binary
mkdir -p $pkgdir/usr/share || return 1
cp -R $srcdir/$pkgname $pkgdir/usr/share || return 1
# Remove distributable binary and return to source folder(necessary?)
cd $srcdir/$pkgname || return 1
}

View file

@ -1,79 +0,0 @@
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

View file

@ -1,13 +0,0 @@
--- 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

View file

@ -1,13 +0,0 @@
--- 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

View file

@ -1,13 +0,0 @@
--- 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

View file

@ -1,25 +0,0 @@
pre_install() {
/bin/true
}
post_install() {
echo -e "Run cd /usr/share/psybnc && make menuconfig after install."
}
pre_upgrade() {
/bin/true
}
post_upgrade() {
/bin/true
}
pre_remove() {
/bin/true
}
post_remove() {
/bin/true
}
# vim:set ts=2 sw=2 et:

20
community/znc/PKGBUILD Normal file
View file

@ -0,0 +1,20 @@
# Contributor: mickael9 <mickael9 at gmail dot com>
pkgname=znc
pkgver=0.094
pkgrel=1
pkgdesc='An IRC proxy (bouncer) with modules & scripts support'
arch=(i686 x86_64 arm)
url=http://en.znc.in/wiki/index.php/ZNC
license=(GPL)
depends=(gcc-libs perl openssl c-ares)
makedepends=(perl openssl gcc pkgconfig)
source=(http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz)
md5sums=('db101f7a7756285d824b59e3b33e3ad5')
build() {
cd $srcdir/$pkgname-$pkgver
./configure --prefix=/usr --enable-extra || return 1
make || return 1
make install DESTDIR=$pkgdir
}

View file

@ -0,0 +1,4 @@
This package is very compiling-intensive, there are a few things to note:
1. It took ~30 minutes to compile, distributed across 2 Dockstars.
2. It will eat through all physical RAM on a Dockstar, you must have swap space to compile.
3. I wouldn't bother cross-compiling on qemu unless you have proven your setup to be faster than the plugs.

5
community/znc/TODO Normal file
View file

@ -0,0 +1,5 @@
TODO for ZNC package:
* Possibly start configuration after install? Or give a [y/N] prompt to start it.
* Create some standard rc.d daemon scripts, dropping root privileges.
* Automatically create a new 'znc' user to drop root to?