[package] update libtorrent to r1093 (#5218)
[openwrt/svn-archive/archive.git] / libs / libtorrent / Makefile
1 #
2 # Copyright (C) 2007-2008 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=libtorrent
11
12 PKG_REV:=1093
13 PKG_VERSION:=0.12.4_r$(PKG_REV)
14 PKG_RELEASE:=5
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=svn://rakshasa.no/libtorrent/trunk/libtorrent
17 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
18 PKG_SOURCE_VERSION:=$(PKG_REV)
19 PKG_SOURCE_PROTO:=svn
20
21 PKG_FIXUP = libtool
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/libtorrent
26 SECTION:=libs
27 CATEGORY:=Libraries
28 TITLE:=Rakshasa's BitTorrent library
29 URL:=http://libtorrent.rakshasa.no/
30 DEPENDS:=+libopenssl +libsigcxx
31 endef
32
33 define Package/libtorrent/description
34 LibTorrent is a BitTorrent library written in C++ for *nix, with a focus
35 on high performance and good code. The library differentiates itself from
36 other implementations by transfering directly from file pages to the
37 network stack. On high-bandwidth connections it is able to seed at 3 times
38 the speed of the official client.
39 endef
40
41 ifneq ($(CONFIG_GCC_VERSION_3_4)$(CONFIG_GCC_VERSION_4_1),)
42 TARGET_CPPFLAGS += -fno-strict-aliasing -fno-inline
43 endif
44
45 ifneq ($(CONFIG_GCC_VERSION_4_2)$(CONFIG_GCC_VERSION_4_3),)
46 TARGET_CPPFLAGS += -fno-inline
47 endif
48
49
50 # XXX: rtorrent needs encryption (--enable-openssl)
51 CONFIGURE_ARGS+= \
52 --enable-shared \
53 --enable-static \
54 --enable-aligned \
55 --disable-debug \
56 --enable-openssl \
57
58 define Build/Configure
59 (cd $(PKG_BUILD_DIR); ./autogen.sh );
60 $(call Build/Configure/Default)
61 endef
62
63 define Build/Compile
64 $(MAKE) -C $(PKG_BUILD_DIR) \
65 DESTDIR="$(PKG_INSTALL_DIR)" \
66 all install
67 endef
68
69 define Build/InstallDev
70 $(INSTALL_DIR) $(1)/usr/include
71 $(CP) $(PKG_INSTALL_DIR)/usr/include/torrent $(1)/usr/include/
72 $(INSTALL_DIR) $(1)/usr/lib
73 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libtorrent.{a,so*} $(1)/usr/lib/
74 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
75 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libtorrent.pc $(1)/usr/lib/pkgconfig/
76 endef
77
78 define Package/libtorrent/install
79 $(INSTALL_DIR) $(1)/usr/lib
80 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libtorrent.so.* $(1)/usr/lib/
81 endef
82
83 $(eval $(call BuildPackage,libtorrent))
84