Update ctorrent to dnh3 (#1587)
[openwrt/svn-archive/archive.git] / net / ctorrent / Makefile
index e5631f5ad863d8360a32e17cd6eb6a3631c864b7..527c4a4cf0201d2f280e6638c999b8f0331c2689 100644 (file)
@@ -1,3 +1,4 @@
+#
 # Copyright (C) 2006 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # Copyright (C) 2006 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
@@ -8,14 +9,15 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ctorrent
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ctorrent
-PKG_VERSION:=1.3.4-dnh2
+PKG_VERSION:=1.3.4-dnh3
 PKG_RELEASE:=1
 PKG_RELEASE:=1
-PKG_MD5SUM:=6635e2d0d0ee21faeb85d95cd93c137b
 
 
-PKG_SOURCE_URL:=http://www.rahul.net/dholmes/ctorrent/
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-dnh2
+PKG_SOURCE_URL:=http://www.rahul.net/dholmes/ctorrent/
+PKG_MD5SUM:=ebed47837b071ca35b78bc26f2229c03
 PKG_CAT:=zcat
 PKG_CAT:=zcat
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-dnh3
 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
 
 include $(INCLUDE_DIR)/package.mk
 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
 
 include $(INCLUDE_DIR)/package.mk
@@ -23,45 +25,33 @@ include $(INCLUDE_DIR)/package.mk
 define Package/ctorrent
   SECTION:=net
   CATEGORY:=Network
 define Package/ctorrent
   SECTION:=net
   CATEGORY:=Network
+  DEPENDS:=+libopenssl +uclibcxx
   TITLE:=console-based BitTorrent client
   TITLE:=console-based BitTorrent client
-  DESCRIPTION:=CTorrent is a BitTorrent client written in the C programming language, known to\\\
-       be a very robust and mature programming language, which produces fast and\\\
-       optimized application.\\\
+  DESCRIPTION:=\
+       CTorrent is a BitTorrent client written in the C programming language, known to \\\
+       be a very robust and mature programming language, which produces fast and \\\
+       optimized application.
   URL:=http://www.rahul.net/dholmes/ctorrent/
 endef
    
 define Build/Configure
   URL:=http://www.rahul.net/dholmes/ctorrent/
 endef
    
 define Build/Configure
-       (cd $(PKG_BUILD_DIR); rm -rf config.cache; \
-               $(TARGET_CONFIGURE_OPTS) \
-               CFLAGS="$(TARGET_CFLAGS)" \
-               CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include -I$(STAGING_DIR)/usr/include/openssl" \
-               LDFLAGS="-static -L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
-               ./configure \
-               --target=$(GNU_TARGET_NAME) \
-               --host=$(GNU_TARGET_NAME) \
-               --build=$(GNU_HOST_NAME) \
-               --prefix=/usr \
-               --exec-prefix=/usr \
-               --bindir=/usr/bin \
-               --sbindir=/usr/sbin \
-               --libexecdir=/usr/lib \
-               --sysconfdir=/etc \
-               --datadir=/usr/share \
-               --localstatedir=/var \
-               --mandir=/usr/man \
-               --infodir=/usr/info \
-               --program-prefix="" \
-               --with-gnu-ld \
-       );
+       $(call Build/Configure/Default, \
+               , \
+               CPPFLAGS="$$$$CPPFLAGS -I$(STAGING_DIR)/usr/include/openssl" \
+               CXXFLAGS="$$$$CXXFLAGS -fno-builtin -fno-rtti -nostdinc++" \
+               LIBS="-nodefaultlibs -lcrypto -luClibc++ -lm -lc -lgcc" \
+       )
 endef
 
 define Build/Compile   
 endef
 
 define Build/Compile   
-  $(call Build/Compile/Default, DESTDIR=$(PKG_INSTALL_DIR)  install)
+       $(MAKE) -C $(PKG_BUILD_DIR) \
+               DESTDIR="$(PKG_INSTALL_DIR)" \
+               all install
 endef
        
 define Package/ctorrent/install        
 endef
        
 define Package/ctorrent/install        
-       mkdir -p $(1)
-       $(CP) $(PKG_INSTALL_DIR)/* $(1)/
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(CP) $(PKG_INSTALL_DIR)/usr/bin/ctorrent $(1)/usr/bin/
 endef
 
 $(eval $(call BuildPackage,ctorrent))
 endef
 
 $(eval $(call BuildPackage,ctorrent))