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.
8 include $(TOPDIR
)/rules.mk
14 PKG_SOURCE
:=$(PKG_NAME
)80-$(PKG_VERSION
)-src.
tar.gz
15 PKG_SOURCE_URL
:=@SF
/bnbtusermods
16 PKG_MD5SUM
:=d6edf0a11d7e68fa3d121e91308f22f5
18 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)80-$(PKG_VERSION
)-src
20 include $(INCLUDE_DIR
)/package.mk
22 define Package
/cbtt
/Default
26 DEPENDS
:=+libpthread
+uclibcxx
+zlib
27 TITLE
:=Bittorrent tracker
28 URL
:=http
://bnbtusermods.sourceforge.net
/
32 $(call Package
/cbtt
/Default
)
35 define Package
/cbtt-mysql
36 $(call Package
/cbtt
/Default
)
37 DEPENDS
+= +libmysqlclient
38 TITLE
+= (with mysql support
)
44 $(STAMP_BUILT
)-$(2): $(STAMP_PREPARED
)
45 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
46 $(TARGET_CONFIGURE_OPTS
) \
47 CFLAGS
="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) -I$(STAGING_DIR)/usr/include/uClibc++ -fno-builtin -nostdinc++" \
48 LFLAGS
="$(TARGET_LDFLAGS) -L. -nodefaultlibs $(4) -lz -luClibc++ -lm -lpthread -lgcc_s" \
52 $(STAMP_BUILT
): $(STAMP_BUILT
)-$(2)
54 define Package
/$(1)/install
55 $(INSTALL_DIR
) $$(1)/usr
/bin
56 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/$(3) $$(1)/usr
/bin
/
61 define Build
/Configure
67 ifneq ($(SDK
)$(CONFIG_PACKAGE_cbtt
),)
68 define Build
/without-mysql
69 $(call Build
/Template
,cbtt
,without-mysql
,bnbt
,)
72 $(eval
$(Build
/without-mysql
))
74 ifneq ($(SDK
)$(CONFIG_PACKAGE_cbtt-mysql
),)
75 define Build
/with-mysql
76 $(call Build
/Template
,cbtt-mysql
,with-mysql
,bnbtmysql
, \
77 -L
$(STAGING_DIR
)/usr
/lib
/mysql
-lmysqlclient \
81 $(eval
$(Build
/with-mysql
))
83 $(eval
$(call BuildPackage
,cbtt
))
84 $(eval
$(call BuildPackage
,cbtt-mysql
))