packages/net/cbtt/Makefile
nico 25e391427b fix uClibc++ issue after build dir reorg: install uClibc++ headers in a separate include dir
git-svn-id: svn://svn.openwrt.org/openwrt/packages@8598 3c298f89-4303-0410-b956-a3cf2f4a3e73
2007-09-03 15:58:55 +00:00

84 lines
1.8 KiB
Makefile

# Copyright (C) 2006 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
# $Id$
include $(TOPDIR)/rules.mk
PKG_NAME:=cbtt
PKG_VERSION:=20060727
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)80-$(PKG_VERSION)-src.tar.gz
PKG_SOURCE_URL:=@SF/bnbtusermods
PKG_MD5SUM:=d6edf0a11d7e68fa3d121e91308f22f5
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)80-$(PKG_VERSION)-src
PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
include $(INCLUDE_DIR)/package.mk
define Package/cbtt/Default
SECTION:=net
CATEGORY:=Network
DEPENDS:=+libpthread +uclibcxx +zlib
TITLE:=Bittorrent tracker
URL:=http://bnbtusermods.sourceforge.net
endef
define Package/cbtt
$(call Package/cbtt/Default)
endef
define Package/cbtt-mysql
DEPENDS+= +libmysqlclient
TITLE+= (with mysql support)
endef
define Build/Template
$(STAMP_BUILT)-$(2): $(STAMP_PREPARED)
$(MAKE) -C $(PKG_BUILD_DIR) \
$(TARGET_CONFIGURE_OPTS) \
CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) -I$(STAGING_DIR)/usr/include/uClibc++ -fno-builtin -fno-rtti -nostdinc++" \
LFLAGS="$(TARGET_LDFLAGS) -L. -nodefaultlibs $(4) -lz -luClibc++ -lm -lpthread" \
$(3)
touch $$@
$(STAMP_BUILT): $(STAMP_BUILT)-$(2)
define Package/$(1)/install
$(INSTALL_DIR) $$(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/$(3) $$(1)/usr/bin/
endef
endef
define Build/Configure
endef
define Build/Compile
endef
ifneq ($(SDK)$(CONFIG_PACKAGE_cbtt),)
define Build/without-mysql
$(call Build/Template,cbtt,without-mysql,bnbt,)
endef
endif
$(eval $(Build/without-mysql))
ifneq ($(SDK)$(CONFIG_PACKAGE_cbtt-mysql),)
define Build/with-mysql
$(call Build/Template,cbtt-mysql,with-mysql,bnbtmysql, \
-L$(STAGING_DIR)/usr/lib/mysql -lmysqlclient \
)
endef
endif
$(eval $(Build/with-mysql))
$(eval $(call BuildPackage,cbtt))
$(eval $(call BuildPackage,cbtt-mysql))