diff --git a/community/psybnc/PKGBUILD b/community/psybnc/PKGBUILD new file mode 100644 index 000000000..d80cbe968 --- /dev/null +++ b/community/psybnc/PKGBUILD @@ -0,0 +1,47 @@ +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 +} diff --git a/community/psybnc/compile.diff b/community/psybnc/compile.diff new file mode 100644 index 000000000..830fb3438 --- /dev/null +++ b/community/psybnc/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: p_blowfi + #include + #include + +-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 + + /* =================================================================== + * Best to leave stuff after this point alone, but go on and change diff --git a/community/psybnc/psybnc-2.3.2.9-multinetwork.patch b/community/psybnc/psybnc-2.3.2.9-multinetwork.patch new file mode 100644 index 000000000..4d796961d --- /dev/null +++ b/community/psybnc/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/community/psybnc/psybnc-2.3.2.9-oidentd.patch b/community/psybnc/psybnc-2.3.2.9-oidentd.patch new file mode 100644 index 000000000..fbb4b163e --- /dev/null +++ b/community/psybnc/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/community/psybnc/psybnc-2.3.2.9-scripting.patch b/community/psybnc/psybnc-2.3.2.9-scripting.patch new file mode 100644 index 000000000..08dce4fa7 --- /dev/null +++ b/community/psybnc/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/community/psybnc/psybnc.install b/community/psybnc/psybnc.install new file mode 100644 index 000000000..924aeff24 --- /dev/null +++ b/community/psybnc/psybnc.install @@ -0,0 +1,25 @@ +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: