summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwbx <wbx@3c298f89-4303-0410-b956-a3cf2f4a3e73>2006-03-15 08:18:34 +0000
committerwbx <wbx@3c298f89-4303-0410-b956-a3cf2f4a3e73>2006-03-15 08:18:34 +0000
commitca9dd2dba3366710460de24c07336a451a2d1216 (patch)
treec199cdecdbc2a6aedd754124331a25edc4e100d6
parentfeba996a2f35c2fff086c5a459ca8c49046df41e (diff)
add package from Duncan, thx. changed the patches and some minor stuff
git-svn-id: svn://svn.openwrt.org/openwrt/trunk/openwrt@3373 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--package/Config.in1
-rw-r--r--package/Makefile2
-rw-r--r--package/cbtt/Config.in13
-rw-r--r--package/cbtt/Makefile47
-rw-r--r--package/cbtt/ipkg/cbtt-mysql.control7
-rw-r--r--package/cbtt/ipkg/cbtt.control7
-rw-r--r--package/cbtt/patches/100-compile.patch41
7 files changed, 118 insertions, 0 deletions
diff --git a/package/Config.in b/package/Config.in
index 99c0f2fe0..74d2282b2 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -16,6 +16,7 @@ endmenu
menu "Applications"
source "package/collectd/Config.in"
+source "package/cbtt/Config.in"
source "package/ctorrent/Config.in"
source "package/deco/Config.in"
source "package/gpsd/Config.in"
diff --git a/package/Makefile b/package/Makefile
index 2e7e0db0a..0f2c6df1a 100644
--- a/package/Makefile
+++ b/package/Makefile
@@ -18,6 +18,7 @@ package-$(BR2_PACKAGE_BLUEZ_UTILS) += bluez-utils
package-$(BR2_PACKAGE_BRIDGE) += bridge
package-$(BR2_PACKAGE_BUSYBOX) += busybox
package-$(BR2_PACKAGE_BWM) += bwm
+package-$(BR2_PACKAGE_CBTT) += cbtt
package-$(BR2_PACKAGE_CGILIB) += cgilib
package-$(BR2_PACKAGE_CHILLISPOT) += chillispot
package-$(BR2_PACKAGE_CIFSMOUNT) += cifsmount
@@ -283,6 +284,7 @@ arpwatch-compile: libpcap-compile
atftp-compile: readline-compile
avahi-compile: libdaemon-compile expat-compile libgdbm-compile
bind-compile: openssl-compile
+cbtt-compile: mysql-compile zlib-compile
clinkc-compile: expat-compile
curl-compile: openssl-compile zlib-compile
cyrus-sasl-compile: openssl-compile
diff --git a/package/cbtt/Config.in b/package/cbtt/Config.in
new file mode 100644
index 000000000..f0fe4addf
--- /dev/null
+++ b/package/cbtt/Config.in
@@ -0,0 +1,13 @@
+config BR2_PACKAGE_CBTT
+ prompt "cbtt.............................. a C BitTorrent Tracker"
+ tristate
+ default m if CONFIG_DEVEL
+ help
+ A C BitTorrent Tracker
+
+config BR2_PACKAGE_CBTT_MYSQL
+ prompt "cbtt-mysql........................ a C BitTorrent Tracker (mysql)"
+ tristate
+ default m if CONFIG_DEVEL
+ help
+ A C BitTorrent Tracker
diff --git a/package/cbtt/Makefile b/package/cbtt/Makefile
new file mode 100644
index 000000000..ebe1243da
--- /dev/null
+++ b/package/cbtt/Makefile
@@ -0,0 +1,47 @@
+# $Id$
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=cbtt
+PKG_VERSION:=20060211
+PKG_RELEASE:=1
+PKG_MD5SUM:=19abea2817c49ccc9438e9671c402984
+
+PKG_SOURCE_URL:=@SF/bnbtusermods
+PKG_SOURCE:=$(PKG_NAME)80-$(PKG_VERSION)-src.tar.gz
+PKG_CAT:=zcat
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)80-$(PKG_VERSION)-src
+PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
+
+include $(TOPDIR)/package/rules.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)))
+
+$(PKG_BUILD_DIR)/.configured:
+ touch $@
+
+$(PKG_BUILD_DIR)/.built:
+ rm -rf $(PKG_INSTALL_DIR)
+ mkdir -p $(PKG_INSTALL_DIR)
+ $(MAKE) -C $(PKG_BUILD_DIR) \
+ $(TARGET_CONFIGURE_OPTS) \
+ LFLAGS="-L$(STAGING_DIR)/usr/lib -L $(STAGING_DIR)/usr/lib/mysql -L. -lz -lmysqlclient" \
+ CFLAGS="-I$(STAGING_DIR)/usr/include"
+ mkdir -p $(PKG_INSTALL_DIR)/usr/bin
+ $(CP) $(PKG_BUILD_DIR)/bnbt $(PKG_INSTALL_DIR)/usr/bin/
+ $(CP) $(PKG_BUILD_DIR)/bnbtmysql $(PKG_INSTALL_DIR)/usr/bin/
+ touch $@
+
+$(IPKG_CBTT):
+ install -d -m0755 $(IDIR_CBTT)/usr/bin
+ install -m0755 $(PKG_INSTALL_DIR)/usr/bin/bnbt $(IDIR_CBTT)/usr/bin/
+ $(RSTRIP) $(IDIR_CBTT)
+ $(IPKG_BUILD) $(IDIR_CBTT) $(PACKAGE_DIR)
+
+$(IPKG_CBTT_MYSQL):
+ install -d -m0755 $(IDIR_CBTT_MYSQL)/usr/bin
+ install -m0755 $(PKG_INSTALL_DIR)/usr/bin/bnbtmysql $(IDIR_CBTT_MYSQL)/usr/bin/
+ $(RSTRIP) $(IDIR_CBTT_MYSQL)
+ $(IPKG_BUILD) $(IDIR_CBTT_MYSQL) $(PACKAGE_DIR)
diff --git a/package/cbtt/ipkg/cbtt-mysql.control b/package/cbtt/ipkg/cbtt-mysql.control
new file mode 100644
index 000000000..4786eaa23
--- /dev/null
+++ b/package/cbtt/ipkg/cbtt-mysql.control
@@ -0,0 +1,7 @@
+Package: cbtt-mysql
+Priority: optional
+Section: net
+Maintainer: Duncan Lindley <drhl@drhl.org>
+Source: http://bnbtusermods.sourceforge.net/
+Depends: zlib, libmysqlclient
+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..d5e6d9289
--- /dev/null
+++ b/package/cbtt/ipkg/cbtt.control
@@ -0,0 +1,7 @@
+Package: cbtt
+Priority: optional
+Section: net
+Maintainer: Duncan Lindley <drhl@drhl.org>
+Source: http://bnbtusermods.sourceforge.net/
+Depends: zlib
+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..b767dfb3f
--- /dev/null
+++ b/package/cbtt/patches/100-compile.patch
@@ -0,0 +1,41 @@
+diff -Nur cbtt80-20060211-src/Makefile cbtt80-20060211-src.patched/Makefile
+--- cbtt80-20060211-src/Makefile 2006-02-07 18:44:58.000000000 +0100
++++ cbtt80-20060211-src.patched/Makefile 2006-03-15 09:01:35.000000000 +0100
+@@ -1,6 +1,5 @@
+ SHELL = /bin/sh
+ SYSTEM = $(shell uname)
+-C++ = g++
+ DFLAGS =
+ OFLAGS = -O2 -w
+ LFLAGS = -L. -lz
+@@ -40,19 +39,19 @@
+ all: $(OBJS) $(OBJS_BNBT) $(OBJS_BNBTMYSQL) $(PROGS)
+
+ ./bnbt: $(OBJS) $(OBJS_BNBT)
+- $(C++) -o ./bnbt $(OBJS) $(OBJS_BNBT) $(LFLAGS)
++ $(CXX) -o ./bnbt $(OBJS) $(OBJS_BNBT) $(LFLAGS)
+
+ ./bnbtmysql: $(OBJS) $(OBJS_BNBTMYSQL)
+- $(C++) -o ./bnbtmysql $(OBJS) $(OBJS_BNBTMYSQL) $(LFLAGS) -L/usr/lib/mysql -lmysqlclient
++ $(CXX) -o ./bnbtmysql $(OBJS) $(OBJS_BNBTMYSQL) $(LFLAGS)
+
+ clean:
+ rm -f $(OBJS) $(OBJS_BNBT) $(OBJS_BNBTMYSQL) $(PROGS)
+
+ %.o: %.cpp
+- $(C++) -o $@ $(CFLAGS) -c $<
++ $(CXX) -o $@ $(CFLAGS) -c $<
+
+ %.mysql.o: %.cpp
+- $(C++) -o $@ $(CFLAGS) -DBNBT_MYSQL -c $<
++ $(CXX) -o $@ $(CFLAGS) -DBNBT_MYSQL -c $<
+
+ ./bnbt: $(OBJS) $(OBJS_BNBT)
+
+@@ -91,4 +90,4 @@
+ 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