1 # Copyright (C) 2006 OpenWrt.org
3 # This is free software, licensed under the GNU General Public License v2.
4 # See /LICENSE for more information.
7 include $(TOPDIR
)/rules.mk
13 PKG_SOURCE
:=$(PKG_NAME
)80-$(PKG_VERSION
)-src.
tar.gz
14 PKG_SOURCE_URL
:=@SF
/bnbtusermods
15 PKG_MD5SUM
:=d6edf0a11d7e68fa3d121e91308f22f5
17 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)80-$(PKG_VERSION
)-src
19 include $(INCLUDE_DIR
)/package.mk
21 define Package
/cbtt
/Default
25 DEPENDS
:=+libpthread
+uclibcxx
+zlib
26 TITLE
:=Bittorrent tracker
27 URL
:=http
://bnbtusermods.sourceforge.net
/
31 $(call Package
/cbtt
/Default
)
34 define Package
/cbtt-mysql
35 $(call Package
/cbtt
/Default
)
36 DEPENDS
+= +libmysqlclient
37 TITLE
+= (with mysql support
)
43 $(STAMP_BUILT
)-$(2): $(STAMP_PREPARED
)
44 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
45 $(TARGET_CONFIGURE_OPTS
) \
46 CFLAGS
="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) -I$(STAGING_DIR)/usr/include/uClibc++ -fno-builtin -nostdinc++" \
47 LFLAGS
="$(TARGET_LDFLAGS) -L. -nodefaultlibs -lc $(4) -lz -luClibc++ -lm -lpthread $(LIBGCC_S)" \
51 $(STAMP_BUILT
): $(STAMP_BUILT
)-$(2)
53 define Package
/$(1)/install
54 $(INSTALL_DIR
) $$(1)/usr
/bin
55 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/$(3) $$(1)/usr
/bin
/
60 define Build
/Configure
66 ifneq ($(SDK
)$(CONFIG_PACKAGE_cbtt
),)
67 define Build
/without-mysql
68 $(call Build
/Template
,cbtt
,without-mysql
,bnbt
,)
71 $(eval
$(Build
/without-mysql
))
73 ifneq ($(SDK
)$(CONFIG_PACKAGE_cbtt-mysql
),)
74 define Build
/with-mysql
75 $(call Build
/Template
,cbtt-mysql
,with-mysql
,bnbtmysql
, \
76 -L
$(STAGING_DIR
)/usr
/lib
/mysql
-lmysqlclient \
80 $(eval
$(Build
/with-mysql
))
82 $(eval
$(call BuildPackage
,cbtt
))
83 $(eval
$(call BuildPackage
,cbtt-mysql
))