b26679bd4998851b628945f19fe77ba2cccb1a73
[openwrt/svn-archive/archive.git] / libs / rblibtorrent / Makefile
1 #
2 # Copyright (C) 2007 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id: Makefile 9173 2007-10-07 03:20:26Z blogic $
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=rblibtorrent
12 PKG_VERSION:=0.14.7
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=libtorrent-rasterbar-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=@SF/libtorrent
17 PKG_MD5SUM:=6959f719245d82758235fd73d93373b2
18 PKG_BUILD_DIR:=$(BUILD_DIR)/libtorrent-rasterbar-$(PKG_VERSION)
19 PKG_BUILD_DEPENDS:=libtool bzlib
20 BOOSTPOSTFIX=mt
21
22 include $(INCLUDE_DIR)/package.mk
23
24 define Package/rblibtorrent
25 SECTION:=libs
26 CATEGORY:=Libraries
27 TITLE:=Rasterbar BitTorrent library
28 URL:=http://www.rasterbar.com/products/libtorrent/
29 DEPENDS:=+boost +boost-python +boost-filesystem +boost-regex +boost-thread +boost-program_options +boost-system +libopenssl
30 endef
31
32 define Package/rblibtorrent/description
33 Rasterbar libtorrent is a C++ library that aims to be a good alternative to
34 all the other bittorrent implementations around. It is a library and not a
35 full featured client, although it comes with a working example client.
36 endef
37
38 CONFIGURE_ARGS+= \
39 --enable-shared \
40 --disable-debug \
41 --enable-python-binding \
42 --with-ssl=$(STAGING_DIR)/usr \
43 --with-boost=$(STAGING_DIR)/usr/include \
44 --with-boost-libdir=$(STAGING_DIR)/usr/lib \
45 --with-zlib=detect \
46 --with-boost-system=boost_system-$(BOOSTPOSTFIX) \
47 --with-boost-filesystem=boost_filesystem-$(BOOSTPOSTFIX) \
48 --with-boost-thread=boost_thread-$(BOOSTPOSTFIX) \
49 --with-boost-regex=boost_regex-$(BOOSTPOSTFIX) \
50 --with-boost-python=boost_python-$(BOOSTPOSTFIX) \
51 --with-boost-program_options=boost_program_options-$(BOOSTPOSTFIX)
52
53 CONFIGURE_VARS+=CC="$(TARGET_CXX)"
54
55 EXTRA_LDFLAGS+=-lz -lpthread
56
57 define Build/Compile
58 $(call Build/Compile/Default)
59 $(call Build/Install/Default)
60 endef
61
62 define Build/InstallDev
63 mkdir -p $(1)/usr/include
64 $(CP) $(PKG_INSTALL_DIR)/usr/include/libtorrent $(1)/usr/include/
65 mkdir -p $(1)/usr/lib
66 $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
67 mkdir -p $(1)/usr/lib/pkgconfig
68 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libtorrent-rasterbar.pc $(1)/usr/lib/pkgconfig/
69 endef
70
71 define Package/rblibtorrent/install
72 $(INSTALL_DIR) $(1)/usr/lib $(1)/usr/lib/python2.6/site-packages/
73 $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
74 $(CP) $(PKG_INSTALL_DIR)/usr/lib/python2.6/site-packages/*.so* $(1)/usr/lib/python2.6/site-packages/
75 endef
76
77 $(eval $(call BuildPackage,rblibtorrent))