From 119e46f00bd3215d73135352210589b509d2dcd6 Mon Sep 17 00:00:00 2001 From: florian Date: Mon, 7 Aug 2006 09:14:27 +0000 Subject: [PATCH] Port psybnc to -ng git-svn-id: svn://svn.openwrt.org/openwrt/packages@4500 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- net/psybnc/Makefile | 55 ++++++++++++++ net/psybnc/patches/Makefile.patch | 59 +++++++++++++++ net/psybnc/patches/psybnc.conf.patch | 14 ++++ net/psybnc/patches/psybnc.patch | 105 +++++++++++++++++++++++++++ net/psybnc/patches/startscript.patch | 16 ++++ 5 files changed, 249 insertions(+) create mode 100644 net/psybnc/Makefile create mode 100644 net/psybnc/patches/Makefile.patch create mode 100644 net/psybnc/patches/psybnc.conf.patch create mode 100644 net/psybnc/patches/psybnc.patch create mode 100644 net/psybnc/patches/startscript.patch diff --git a/net/psybnc/Makefile b/net/psybnc/Makefile new file mode 100644 index 000000000..76b0bc846 --- /dev/null +++ b/net/psybnc/Makefile @@ -0,0 +1,55 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# $Id$ + +include $(TOPDIR)/rules.mk + +PKG_NAME:=psybnc +PKG_VERSION:=2.3.2-7 +PKG_RELEASE:=1 +PKG_MD5SUM:=4b893a92f914813450e0921b2894ad6c + +PKG_SOURCE_URL:=http://www.psybnc.info/download/beta/ +PKG_SOURCE:=psyBNC-$(PKG_VERSION).tar.gz +PKG_CAT:=zcat + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) + +include $(INCLUDE_DIR)/package.mk + +define Package/psybnc + SECTION:=net + CATEGORY:=Network + DEPENDS:= + TITLE:=An IRC-Bouncer with many features + DESCRIPTION:=psyBNC is an easy-to-use, multi-user, permanent\\\ + IRC-Bouncer with many features. Some of its features\\\ + vhost- and relay support to connected bouncers and an\\\ + extensive online help system. Many other helpful\\\ + functions are included.\\\ + URL:=http://www.psybnc.info/ +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + CC="$(TARGET_CC)" \ + CFLAGS="$(TARGET_CFLAGS)" \ + HOSTCC="$(HOSTCC)" \ + all +endef + +define Package/psybnc/install + install -d -m0755 $(1)/usr/share/psybnc/lang/ + install -d -m0755 $(1)/usr/share/psybnc/log/ + install -d -m0755 $(1)/usr/sbin/ + install -m0755 $(PKG_BUILD_DIR)/psybnc $(1)/usr/share/psybnc/ + install -m0600 $(PKG_BUILD_DIR)/psybnc.conf $(1)/usr/share/psybnc/ + install -m0644 $(PKG_BUILD_DIR)/lang/english.lng $(1)/usr/share/psybnc/lang/ + install -m0755 $(PKG_BUILD_DIR)/psybnc.sh $(1)/usr/sbin/psybnc +endef + +$(eval $(call BuildPackage,psybnc)) diff --git a/net/psybnc/patches/Makefile.patch b/net/psybnc/patches/Makefile.patch new file mode 100644 index 000000000..2db956072 --- /dev/null +++ b/net/psybnc/patches/Makefile.patch @@ -0,0 +1,59 @@ +--- psybnc/Makefile 2005-06-04 20:22:45.000000000 +0200 ++++ psybnc_patched/Makefile 2005-11-04 11:50:28.879157626 +0100 +@@ -1,16 +1,16 @@ +-CC = gcc ++HOSTCC = gcc + CCFLAGS = + + all: $(OBJS) + @echo Initializing bouncer compilation + @echo [*] Running Conversion Tool for older psyBNC Data. +- @$(CC) tools/convconf.c -o tools/convconf ++ @$(HOSTCC) tools/convconf.c -o tools/convconf + @tools/convconf + @echo [*] Running Autoconfig. +- @$(CC) -I. tools/autoconf.c -o tools/autoconf ++ @$(HOSTCC) -I. tools/autoconf.c -o tools/autoconf + @tools/autoconf + @echo [*] Compiling MakeSalt for Encryption.. +- @$(CC) -I. -o makesalt tools/makesalt.c ++ @$(HOSTCC) -I. -o makesalt tools/makesalt.c + @./makesalt + @echo [*] Compiling Bouncer.. + @make -f makefile.out +@@ -20,14 +20,14 @@ + menuconfig: + @echo Initializing Menu-Configuration + @echo [*] Running Conversion Tool for older psyBNC Data. +- @$(CC) tools/convconf.c -o tools/convconf ++ @$(HOSTCC) tools/convconf.c -o tools/convconf + @tools/convconf + @echo [*] Running Autoconfig. +- @$(CC) -I. tools/autoconf.c -o tools/autoconf ++ @$(HOSTCC) -I. tools/autoconf.c -o tools/autoconf + @tools/autoconf + @echo [*] Creating Menu, please wait. + @echo This needs the 'ncurses' library. If it is not available, menuconf wont work. If you are using 'curses', use make menuconfig-curses instead. +- @$(CC) menuconf/menuconf.c menuconf/inputbox.c menuconf/util.c menuconf/checklist.c menuconf/menubox.c menuconf/textbox.c src/snprintf.c -I. -lncurses -lm -o menuconf/menuconf 2>/dev/null ++ @$(HOSTCC) menuconf/menuconf.c menuconf/inputbox.c menuconf/util.c menuconf/checklist.c menuconf/menubox.c menuconf/textbox.c src/snprintf.c -I. -lncurses -lm -o menuconf/menuconf 2>/dev/null + @menuconf/menuconf + @clear + @echo Now compile psyBNC using make, if not yet compiled, or if Options were changed. +@@ -36,14 +36,14 @@ + menuconfig-curses: + @echo Initializing Menu-Configuration using Curses + @echo [*] Running Conversion Tool for older psyBNC Data. +- @$(CC) tools/convconf.c -o tools/convconf ++ @$(HOSTCC) tools/convconf.c -o tools/convconf + @tools/convconf + @echo [*] Running Autoconfig. +- @$(CC) -I. tools/autoconf.c -o tools/autoconf ++ @$(HOSTCC) -I. tools/autoconf.c -o tools/autoconf + @tools/autoconf + @echo [*] Creating Menu, please wait. + @echo This needs the 'curses' library. If it is not available, menuconf wont work. +- @$(CC) menuconf/menuconf.c menuconf/inputbox.c menuconf/util.c menuconf/checklist.c menuconf/menubox.c menuconf/textbox.c src/snprintf.c -DNONCURSES -I. -lcurses -lm -o menuconf/menuconf 2>/dev/null ++ @$(HOSTCC) menuconf/menuconf.c menuconf/inputbox.c menuconf/util.c menuconf/checklist.c menuconf/menubox.c menuconf/textbox.c src/snprintf.c -DNONCURSES -I. -lcurses -lm -o menuconf/menuconf 2>/dev/null + @menuconf/menuconf + @clear + @echo Now compile psyBNC using make, if not yet compiled, or if Options were changed. diff --git a/net/psybnc/patches/psybnc.conf.patch b/net/psybnc/patches/psybnc.conf.patch new file mode 100644 index 000000000..98e9ad5a9 --- /dev/null +++ b/net/psybnc/patches/psybnc.conf.patch @@ -0,0 +1,14 @@ +diff -Naur psybnc/psybnc.conf psybnc_finish/psybnc.conf +--- psybnc/psybnc.conf 1970-01-01 01:00:00.000000000 +0100 ++++ psybnc_finish/psybnc.conf 2005-11-03 18:27:44.726264185 +0100 +@@ -0,0 +1,10 @@ ++PSYBNC.SYSTEM.PORT1=50001 ++PSYBNC.SYSTEM.ME=psybnc_mipsel ++PSYBNC.SYSTEM.HOST1=* ++PSYBNC.HOSTALLOWS.ENTRY0=*;* ++USER1.USER.NICK=change_me ++USER1.USER.USER=psybnc_admin ++USER1.USER.PASS=change_me ++USER1.USER.RIGHTS=1 ++USER1.USER.VLINK=0 ++USER1.USER.LOGIN=psybnc_admin diff --git a/net/psybnc/patches/psybnc.patch b/net/psybnc/patches/psybnc.patch new file mode 100644 index 000000000..32f2165ea --- /dev/null +++ b/net/psybnc/patches/psybnc.patch @@ -0,0 +1,105 @@ +diff -ur psybnc/config.h psybnc_finish/config.h +--- psybnc/config.h 2005-06-04 20:22:45.000000000 +0200 ++++ psybnc_finish/config.h 2005-11-03 17:05:40.802998216 +0100 +@@ -1,40 +1,7 @@ +-/* $Id: config.h,v 1.2 2005/06/04 18:05:33 hisi Exp $ */ + /* + * 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 +@@ -47,28 +14,27 @@ + + #define MAXCONN 99 + +-/* Allow the usage of scripts */ ++/* Use blocking DNS */ + +-#define SCRIPTING ++#define BLOCKDNS + + /* Allow multiple irc connections per user */ + + #define NETWORK + +-/* Allow Proxy Support */ ++/* The logging level */ + +-#define PROXYS ++#define LOGLEVEL 2 + +-/* The logging level */ ++/* The ctcp Version reply */ + +-#define LOGLEVEL 0 ++#define CTCPVERSION "psyBNC 2.3.2-7 running on mipsel, ported by piie visit www.linuX-gamers.net" + +-/* SSL-Security */ ++/* The Path to SSL */ + +-#define SSLSEC 2 ++#define SSLPATH "/tmp/" + +-/* Blocking DNS is preferred. Non Blocking DNS is experimental */ ++/* SSL-Security */ ++ ++#define SSLSEC 0 + +-#ifndef BLOCKDNS +-#define BLOCKDNS +-#endif +diff -ur psybnc/tools/autoconf.c psybnc_finish/tools/autoconf.c +--- psybnc/tools/autoconf.c 2005-06-04 20:22:45.000000000 +0200 ++++ psybnc_finish/tools/autoconf.c 2005-10-29 14:46:49.000000000 +0200 +@@ -425,7 +425,7 @@ + printf("Can't create makefile.out .. aborting\n"); + exit(0x1); + } +- fprintf(makefile,"CC = gcc\n"); ++ fprintf(makefile,"CC = mipsel-linux-gcc\n"); + fprintf(makefile,"SRC = src/\n"); + #ifdef BOUNDCHECK + fprintf(makefile,"CFLAGS = -O -fbounds-checking -fno-builtin\n"); +@@ -450,7 +450,7 @@ + fprintf(makefile,"\n"); + fprintf(makefile,"all: $(OBJS)\n"); + fprintf(makefile," $(CC) -o $(TARGET) $(CFLAGS) $(OBJS) $(LIBS)\n"); +- fprintf(makefile," @strip $(TARGET)\n"); ++ /*fprintf(makefile," @strip $(TARGET)\n");*/ + if(ssl==0) + { + if(!fexists("key/psybnc.cert.pem")) /* only create, if not exist */ diff --git a/net/psybnc/patches/startscript.patch b/net/psybnc/patches/startscript.patch new file mode 100644 index 000000000..635213db7 --- /dev/null +++ b/net/psybnc/patches/startscript.patch @@ -0,0 +1,16 @@ +diff -Naur psybnc/psybnc.sh psybnc_patched/psybnc.sh +--- psybnc/psybnc.sh 1970-01-01 01:00:00.000000000 +0100 ++++ psybnc_finish/psybnc.sh 2005-11-04 12:51:26.478557377 +0100 +@@ -0,0 +1,12 @@ ++#!/bin/sh ++ ++PDIR=$(pwd); ++cd /usr/share/psybnc; ++./psybnc "$@"; ++cd "$PDIR"; ++ ++echo; ++echo; ++echo "Configuration is located at /usr/share/psybnc/psybnc.conf"; ++echo "everything can be configured within your chatclient,"; ++echo "after logging in as psybnc_admin ( /bhelp shows bnc help )";