summaryrefslogtreecommitdiff
path: root/package/cbtt
diff options
context:
space:
mode:
authorwbx <wbx@hydrogenium.(none)>2009-05-17 14:41:34 +0200
committerwbx <wbx@hydrogenium.(none)>2009-05-17 14:41:34 +0200
commit219a6dab8995aad9ac4860cc1a84d6f3509a03a4 (patch)
treeb9c0f3c43aebba2fcfef777592d0add39f2072f4 /package/cbtt
Initial import
Diffstat (limited to 'package/cbtt')
-rw-r--r--package/cbtt/Config.in18
-rw-r--r--package/cbtt/Makefile36
-rw-r--r--package/cbtt/ipkg/cbtt-mysql.control5
-rw-r--r--package/cbtt/ipkg/cbtt.control5
-rw-r--r--package/cbtt/patches/100-compile.patch57
-rw-r--r--package/cbtt/patches/patch-bnbt_h11
6 files changed, 132 insertions, 0 deletions
diff --git a/package/cbtt/Config.in b/package/cbtt/Config.in
new file mode 100644
index 000000000..25b51c6da
--- /dev/null
+++ b/package/cbtt/Config.in
@@ -0,0 +1,18 @@
+config ADK_PACKAGE_CBTT
+ prompt "cbtt.............................. a C BitTorrent Tracker"
+ tristate
+ default n
+ select ADK_PACKAGE_ZLIB
+ depends on ADK_CXX
+ help
+ A C BitTorrent Tracker
+
+config ADK_PACKAGE_CBTT_MYSQL
+ prompt "cbtt-mysql........................ a C BitTorrent Tracker (mysql)"
+ tristate
+ default n
+ select ADK_PACKAGE_ZLIB
+ select ADK_PACKAGE_LIBMYSQLCLIENT
+ depends on ADK_CXX
+ help
+ A C BitTorrent Tracker
diff --git a/package/cbtt/Makefile b/package/cbtt/Makefile
new file mode 100644
index 000000000..a7119ff4b
--- /dev/null
+++ b/package/cbtt/Makefile
@@ -0,0 +1,36 @@
+# $Id$
+#-
+# This file is part of the OpenADK project. OpenADK is copyrighted
+# material, please see the LICENCE file in the top-level directory.
+
+include ${TOPDIR}/rules.mk
+
+PKG_NAME:= cbtt
+PKG_VERSION:= 20060211
+PKG_RELEASE:= 1
+PKG_MD5SUM:= 19abea2817c49ccc9438e9671c402984
+DISTFILES:= ${PKG_NAME}80-${PKG_VERSION}-src.tar.gz
+MASTER_SITES:= ${MASTER_SITE_SOURCEFORGE:=bnbtusermods/}
+WRKDIST= ${WRKDIR}/${PKG_NAME}80-${PKG_VERSION}-src
+
+include ${TOPDIR}/mk/package.mk
+
+$(eval $(call PKG_template,CBTT,cbtt,${PKG_VERSION}-${PKG_RELEASE},${ARCH}))
+$(eval $(call PKG_template,CBTT_MYSQL,cbtt-mysql,${PKG_VERSION}-${PKG_RELEASE},${ARCH}))
+
+BUILD_STYLE= auto
+TLDFLAGS+= -shared -L. -L${STAGING_DIR}/usr/lib/mysql \
+ -lmysqlclient -lz -lpthread -lm -lgcc
+ifeq ($(ADK_TARGET_LIB_UCLIBCXX),y)
+TLDFLAGS+= -nodefaultlibs -lz -lpthread \
+ -luClibc++ -lc -lm -lgcc
+TCFLAGS+= -fno-builtin -nostdinc++
+endif
+
+do-install:
+ ${INSTALL_DIR} ${IDIR_CBTT}/usr/bin
+ ${INSTALL_BIN} ${WRKBUILD}/bnbt ${IDIR_CBTT}/usr/bin/
+ ${INSTALL_DIR} ${IDIR_CBTT_MYSQL}/usr/bin
+ ${INSTALL_BIN} ${WRKBUILD}/bnbtmysql ${IDIR_CBTT_MYSQL}/usr/bin/
+
+include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/cbtt/ipkg/cbtt-mysql.control b/package/cbtt/ipkg/cbtt-mysql.control
new file mode 100644
index 000000000..ef8b52a32
--- /dev/null
+++ b/package/cbtt/ipkg/cbtt-mysql.control
@@ -0,0 +1,5 @@
+Package: cbtt-mysql
+Priority: optional
+Section: net
+Depends: zlib, libmysqlclient, uclibc++
+Description: Bittorrent tracker with mysql support
diff --git a/package/cbtt/ipkg/cbtt.control b/package/cbtt/ipkg/cbtt.control
new file mode 100644
index 000000000..bc8b844ad
--- /dev/null
+++ b/package/cbtt/ipkg/cbtt.control
@@ -0,0 +1,5 @@
+Package: cbtt
+Priority: optional
+Section: net
+Depends: zlib, uclibc++
+Description: Bittorrent tracker
diff --git a/package/cbtt/patches/100-compile.patch b/package/cbtt/patches/100-compile.patch
new file mode 100644
index 000000000..86fdb7ca2
--- /dev/null
+++ b/package/cbtt/patches/100-compile.patch
@@ -0,0 +1,57 @@
+diff -Nur cbtt80-20060211-src/Makefile cbtt80-20060211-src.patched/Makefile
+--- cbtt80-20060211-src.orig/Makefile 2006-02-07 18:44:58.000000000 +0100
++++ cbtt80-20060211-src/Makefile 2009-05-09 16:11:42.000000000 +0200
+@@ -1,10 +1,9 @@
+-SHELL = /bin/sh
+-SYSTEM = $(shell uname)
+-C++ = g++
++SHELL ?= /bin/bash
++SYSTEM = Linux
+ DFLAGS =
+-OFLAGS = -O2 -w
++#OFLAGS = -O2 -w
+ LFLAGS = -L. -lz
+-CFLAGS =
++CFLAGS ?=
+
+ ifeq ($(SYSTEM),Linux)
+ DFLAGS += -D__LINUX__
+@@ -30,6 +29,7 @@ CFLAGS =
+ endif
+
+ CFLAGS += $(OFLAGS) $(DFLAGS) -I.
++LDFLAGS += $(LFLAGS)
+
+ OBJS = atom.o base64.o bencode.o client.o config.o link.o md5.o server.o sha1.o sort.o tracker_admin.o tracker_comments.o tracker_file.o tracker_index.o tracker_info.o tracker_login.o tracker_signup.o tracker_stats.o tracker_torrent.o tracker_upload.o tracker_users.o util.o
+ OBJS_BNBT = bnbt.o tracker.o tracker_announce.o tracker_scrape.o
+@@ -40,19 +40,19 @@ PROGS = ./bnbt ./bnbtmysql
+ all: $(OBJS) $(OBJS_BNBT) $(OBJS_BNBTMYSQL) $(PROGS)
+
+ ./bnbt: $(OBJS) $(OBJS_BNBT)
+- $(C++) -o ./bnbt $(OBJS) $(OBJS_BNBT) $(LFLAGS)
++ $(CXX) -o ./bnbt $(OBJS) $(OBJS_BNBT) $(LDFLAGS)
+
+ ./bnbtmysql: $(OBJS) $(OBJS_BNBTMYSQL)
+- $(C++) -o ./bnbtmysql $(OBJS) $(OBJS_BNBTMYSQL) $(LFLAGS) -L/usr/lib/mysql -lmysqlclient
++ $(CXX) -o ./bnbtmysql $(OBJS) $(OBJS_BNBTMYSQL) $(LDFLAGS)
+
+ clean:
+ rm -f $(OBJS) $(OBJS_BNBT) $(OBJS_BNBTMYSQL) $(PROGS)
+
+ %.o: %.cpp
+- $(C++) -o $@ $(CFLAGS) -c $<
++ $(CXX) -o $@ $(CPPFLAGS) $(CFLAGS) -c $<
+
+ %.mysql.o: %.cpp
+- $(C++) -o $@ $(CFLAGS) -DBNBT_MYSQL -c $<
++ $(CXX) -o $@ $(CPPFLAGS) $(CFLAGS) -DBNBT_MYSQL -c $<
+
+ ./bnbt: $(OBJS) $(OBJS_BNBT)
+
+@@ -91,4 +91,4 @@ bnbt.mysql.o: bnbt.h bnbt_mysql.h config
+ bnbt_mysql.mysql.o: bnbt.h bnbt_mysql.h util.h
+ tracker.mysql.o: bnbt.h bnbt_mysql.h atom.h bencode.h config.h md5.h server.h sort.h tracker.h util.h
+ tracker_announce.mysql.o: bnbt.h bnbt_mysql.h atom.h bencode.h link.h tracker.h util.h
+-tracker_scrape.mysql.o: bnbt.h bnbt_mysql.h atom.h bencode.h tracker.h util.h
+\ No newline at end of file
++tracker_scrape.mysql.o: bnbt.h bnbt_mysql.h atom.h bencode.h tracker.h util.h
diff --git a/package/cbtt/patches/patch-bnbt_h b/package/cbtt/patches/patch-bnbt_h
new file mode 100644
index 000000000..6169a027c
--- /dev/null
+++ b/package/cbtt/patches/patch-bnbt_h
@@ -0,0 +1,11 @@
+$Id: update-patches 24 2008-08-31 14:56:13Z wbx $
+--- cbtt80-20060211-src.orig/bnbt.h 2006-02-07 18:44:58.000000000 +0100
++++ cbtt80-20060211-src/bnbt.h 2009-05-09 16:17:54.000000000 +0200
+@@ -5,6 +5,7 @@
+ #ifndef BNBT_H
+ #define BNBT_H
+
++#include <string.h>
+ #include <stdio.h>
+ #include <time.h>
+