nuke $Id$ in /packages as well
[openwrt/svn-archive/archive.git] / net / cbtt / Makefile
1 # Copyright (C) 2006 OpenWrt.org
2 #
3 # This is free software, licensed under the GNU General Public License v2.
4 # See /LICENSE for more information.
5 #
6
7 include $(TOPDIR)/rules.mk
8
9 PKG_NAME:=cbtt
10 PKG_VERSION:=20060727
11 PKG_RELEASE:=1
12
13 PKG_SOURCE:=$(PKG_NAME)80-$(PKG_VERSION)-src.tar.gz
14 PKG_SOURCE_URL:=@SF/bnbtusermods
15 PKG_MD5SUM:=d6edf0a11d7e68fa3d121e91308f22f5
16
17 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)80-$(PKG_VERSION)-src
18
19 include $(INCLUDE_DIR)/package.mk
20
21 define Package/cbtt/Default
22 SUBMENU:=BitTorrent
23 SECTION:=net
24 CATEGORY:=Network
25 DEPENDS:=+libpthread +uclibcxx +zlib
26 TITLE:=Bittorrent tracker
27 URL:=http://bnbtusermods.sourceforge.net/
28 endef
29
30 define Package/cbtt
31 $(call Package/cbtt/Default)
32 endef
33
34 define Package/cbtt-mysql
35 $(call Package/cbtt/Default)
36 DEPENDS+= +libmysqlclient
37 TITLE+= (with mysql support)
38 endef
39
40
41 define Build/Template
42
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 $(4) -lz -luClibc++ -lm -lpthread $(LIBGCC_S)" \
48 $(3)
49 touch $$@
50
51 $(STAMP_BUILT): $(STAMP_BUILT)-$(2)
52
53 define Package/$(1)/install
54 $(INSTALL_DIR) $$(1)/usr/bin
55 $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(3) $$(1)/usr/bin/
56 endef
57
58 endef
59
60 define Build/Configure
61 endef
62
63 define Build/Compile
64 endef
65
66 ifneq ($(SDK)$(CONFIG_PACKAGE_cbtt),)
67 define Build/without-mysql
68 $(call Build/Template,cbtt,without-mysql,bnbt,)
69 endef
70 endif
71 $(eval $(Build/without-mysql))
72
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 \
77 )
78 endef
79 endif
80 $(eval $(Build/with-mysql))
81
82 $(eval $(call BuildPackage,cbtt))
83 $(eval $(call BuildPackage,cbtt-mysql))