[patchteam] - New Package - Rasterbar libtorrent

Signed off by alexander@sulfrian.net


git-svn-id: svn://svn.openwrt.org/openwrt/packages@20173 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
dingo 2010-03-13 02:55:32 +00:00
parent d5a84bfdcc
commit 38b870d7f0
2 changed files with 88 additions and 0 deletions

View File

@ -0,0 +1,77 @@
#
# Copyright (C) 2007 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
# $Id: Makefile 9173 2007-10-07 03:20:26Z blogic $
include $(TOPDIR)/rules.mk
PKG_NAME:=rblibtorrent
PKG_VERSION:=0.14.7
PKG_RELEASE:=1
PKG_SOURCE:=libtorrent-rasterbar-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@SF/libtorrent
PKG_MD5SUM:=6959f719245d82758235fd73d93373b2
PKG_BUILD_DIR:=$(BUILD_DIR)/libtorrent-rasterbar-$(PKG_VERSION)
PKG_BUILD_DEPENDS:=libtool bzlib
BOOSTPOSTFIX=mt
include $(INCLUDE_DIR)/package.mk
define Package/rblibtorrent
SECTION:=libs
CATEGORY:=Libraries
TITLE:=Rasterbar BitTorrent library
URL:=http://www.rasterbar.com/products/libtorrent/
DEPENDS:=+boost +boost-python +boost-filesystem +boost-regex +boost-thread +boost-program_options +boost-system +libopenssl
endef
define Package/rblibtorrent/description
Rasterbar libtorrent is a C++ library that aims to be a good alternative to
all the other bittorrent implementations around. It is a library and not a
full featured client, although it comes with a working example client.
endef
CONFIGURE_ARGS+= \
--enable-shared \
--disable-debug \
--enable-python-binding \
--with-ssl=$(STAGING_DIR)/usr \
--with-boost=$(STAGING_DIR)/usr/include \
--with-boost-libdir=$(STAGING_DIR)/usr/lib \
--with-zlib=detect \
--with-boost-system=boost_system-$(BOOSTPOSTFIX) \
--with-boost-filesystem=boost_filesystem-$(BOOSTPOSTFIX) \
--with-boost-thread=boost_thread-$(BOOSTPOSTFIX) \
--with-boost-regex=boost_regex-$(BOOSTPOSTFIX) \
--with-boost-python=boost_python-$(BOOSTPOSTFIX) \
--with-boost-program_options=boost_program_options-$(BOOSTPOSTFIX)
CONFIGURE_VARS+=CC="$(TARGET_CXX)"
EXTRA_LDFLAGS+=-lz -lpthread
define Build/Compile
$(call Build/Compile/Default)
$(call Build/Install/Default)
endef
define Build/InstallDev
mkdir -p $(1)/usr/include
$(CP) $(PKG_INSTALL_DIR)/usr/include/libtorrent $(1)/usr/include/
mkdir -p $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
mkdir -p $(1)/usr/lib/pkgconfig
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libtorrent-rasterbar.pc $(1)/usr/lib/pkgconfig/
endef
define Package/rblibtorrent/install
$(INSTALL_DIR) $(1)/usr/lib $(1)/usr/lib/python2.6/site-packages/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/python2.6/site-packages/*.so* $(1)/usr/lib/python2.6/site-packages/
endef
$(eval $(call BuildPackage,rblibtorrent))

View File

@ -0,0 +1,11 @@
--- libtorrent-rasterbar-0.14.7/bindings/python/Makefile.in 2009-11-18 09:25:39.000000000 +0100
+++ libtorrent-rasterbar-0.14.7/bindings/python/Makefile.in 2010-02-26 13:27:58.000000000 +0100
@@ -408,7 +408,7 @@
@ENABLE_PYTHON_BINDING_TRUE@all-local:
-@ENABLE_PYTHON_BINDING_TRUE@ $(PYTHON) setup.py build
+@ENABLE_PYTHON_BINDING_TRUE@ CXX="$(CXX) -pthread -shared" $(PYTHON) setup.py build
@ENABLE_PYTHON_BINDING_TRUE@install-exec-local:
@ENABLE_PYTHON_BINDING_TRUE@ $(PYTHON) setup.py install @PYTHON_INSTALL_PARAMS@