b72797f9f948b1cd8d0f3345239ff028fa2c2341
[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 # $Id$
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=cbtt
11 PKG_VERSION:=20060211
12 PKG_RELEASE:=1
13 PKG_MD5SUM:=19abea2817c49ccc9438e9671c402984
14
15 PKG_SOURCE_URL:=@SF/bnbtusermods
16 PKG_SOURCE:=$(PKG_NAME)80-$(PKG_VERSION)-src.tar.gz
17 PKG_CAT:=zcat
18
19 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)80-$(PKG_VERSION)-src
20 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
21
22 include $(INCLUDE_DIR)/package.mk
23
24 PKG_BUILD_DEPENDS=zlib libmysqlclient
25
26 define Package/cbtt
27 SECTION:=net
28 CATEGORY:=Network
29 DEPENDS:=zlib
30 MENU:=1
31 TITLE:=Bittorrent tracker
32 DEPENDS:=+libpthread
33 DESCRIPTION:=a C BitTorrent Tracker
34 URL:=http://bnbtusermods.sourceforge.net
35 endef
36
37 define Package/cbtt-mysql
38 SECTION:=net
39 CATEGORY:=Network
40 DEPENDS:=cbtt +libmysqlclient +libpthread
41 TITLE:=Bittorrent tracker with mysql support
42 DESCRIPTION:=Bittorrent tracker with mysql support
43 URL:=http://bnbtusermods.sourceforge.net
44 endef
45
46 define Build/Compile
47 rm -rf $(PKG_INSTALL_DIR)
48 mkdir -p $(PKG_INSTALL_DIR)
49 $(MAKE) -C $(PKG_BUILD_DIR) \
50 $(TARGET_CONFIGURE_OPTS) \
51 LFLAGS="-L$(STAGING_DIR)/usr/lib -L $(STAGING_DIR)/usr/lib/mysql -L. -lz -lmysqlclient -lpthread" \
52 CFLAGS="-I$(STAGING_DIR)/usr/include"
53 mkdir -p $(PKG_INSTALL_DIR)/usr/bin
54 endef
55
56 define Package/cbtt/install
57 $(INSTALL_DIR) $(1)/usr/bin
58 $(INSTALL_BIN) $(PKG_BUILD_DIR)/bnbt $(1)/usr/bin/
59 endef
60
61 define Package/cbtt-mysql/install
62 $(INSTALL_DIR) $(1)/usr/bin
63 $(INSTALL_BIN) $(PKG_BUILD_DIR)/bnbtmysql $(1)/usr/bin/
64 endef
65
66 $(eval $(call BuildPackage,cbtt))
67 $(eval $(call BuildPackage,cbtt-mysql))