-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,
I ported deluge 1.2.0 with all dependencies for openwrt. All missing
packages attached.

Including:
        - distribute (fork of Setuptools)
        - pyopenssl
        - pyxgd
        - python2-chardet (charset detection)
        - mako (a python templating language)
        - rblibtorrent (C++ BitTorrent implementation focusing on
          efficiency and scalability)
        - deluge (with daemon, console and web ui)

Note: You will also need the additional boost-libs, the twisted fix and 
      the python-zlib-patch from the other mails.


Alex
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)

iEYEARECAAYFAkuasREACgkQ1SSUxvEq73xffwCePq2qZ4od0PX5R6abXTwmsTHU
VIsAoI6gWoUkT9oLHVpJgAKJbglME2dR
=AimA
-----END PGP SIGNATURE-----
diff --git a/libs/rblibtorrent/Makefile b/libs/rblibtorrent/Makefile
new file mode 100644
index 0000000..b26679b
--- /dev/null
+++ b/libs/rblibtorrent/Makefile
@@ -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))
diff --git a/libs/rblibtorrent/patches/enable-shared-linking.patch b/libs/rblibtorrent/patches/enable-shared-linking.patch
new file mode 100644
index 0000000..dec80cc
--- /dev/null
+++ b/libs/rblibtorrent/patches/enable-shared-linking.patch
@@ -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_t...@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_t...@install-exec-local:
+ @ENABLE_PYTHON_BINDING_TRUE@	$(PYTHON) setup.py install @PYTHON_INSTALL_PARAMS@
diff --git a/lang/pyxdg/Makefile b/lang/pyxdg/Makefile
new file mode 100644
index 0000000..1eb255c
--- /dev/null
+++ b/lang/pyxdg/Makefile
@@ -0,0 +1,47 @@
+#
+# Copyright (C) 2008 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=pyxdg
+PKG_VERSION:=0.18
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=http://people.freedesktop.org/~lanius/
+PKG_MD5SUM:=076b57722e91dab8ab83028c6ef9dcea
+
+PKG_BUILD_DEPENDS:=python
+
+include $(INCLUDE_DIR)/package.mk
+$(call include_mk, python-package.mk)
+
+define Package/pyxdg
+  SUBMENU:=Python
+  SECTION:=lang
+  CATEGORY:=Languages
+  TITLE:=pyxdg
+  URL:=http://freedesktop.org/wiki/Software/pyxdg
+  DEPENDS:=+python
+endef
+
+define Package/pyxdg/description
+  A Python module to deal with freedesktop.org specifications
+endef
+
+define Build/Compile
+	$(call Build/Compile/PyMod,,install --prefix="$(PKG_INSTALL_DIR)/usr")
+endef
+
+define Package/pyxdg/install
+	$(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
+	$(CP) \
+	    $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
+	    $(1)$(PYTHON_PKG_DIR)
+endef
+
+$(eval $(call BuildPackage,pyxdg))
diff --git a/lang/python2-chardet/Makefile b/lang/python2-chardet/Makefile
new file mode 100644
index 0000000..ff7b60f
--- /dev/null
+++ b/lang/python2-chardet/Makefile
@@ -0,0 +1,47 @@
+#
+# Copyright (C) 2008 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python2-chardet
+PKG_VERSION:=2.0.1
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz
+PKG_SOURCE_URL:=http://chardet.feedparser.org/download/
+PKG_MD5SUM:=ec771971bab5dd1943a10362ebd2fd4c
+
+PKG_BUILD_DEPENDS:=python
+
+include $(INCLUDE_DIR)/package.mk
+$(call include_mk, python-package.mk)
+
+define Package/python2-chardet
+  SUBMENU:=Python
+  SECTION:=lang
+  CATEGORY:=Languages
+  TITLE:=Universal Encoding Detector
+  URL:=http://chardet.feedparser.org/ http://code.google.com/p/chardet/
+  DEPENDS:=+python
+endef
+
+define Package/python2-chardet/description
+  Character encoding auto-detection in Python.
+endef
+
+define Build/Compile
+	$(call Build/Compile/PyMod,,install --prefix="$(PKG_INSTALL_DIR)/usr")
+endef
+
+define Package/python2-chardet/install
+	$(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
+	$(CP) \
+	    $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
+	    $(1)$(PYTHON_PKG_DIR)
+endef
+
+$(eval $(call BuildPackage,python2-chardet))
diff --git a/lang/mako/Makefile b/lang/mako/Makefile
new file mode 100644
index 0000000..7a69d9b
--- /dev/null
+++ b/lang/mako/Makefile
@@ -0,0 +1,56 @@
+#
+# Copyright (C) 2008 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=mako
+PKG_VERSION:=0.2.5
+PKG_RELEASE:=1
+
+PKG_SOURCE:=Mako-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=http://www.makotemplates.org/downloads/
+PKG_MD5SUM:=d8ca783630dc5e93970a2075532fa643
+
+PKG_BUILD_DEPENDS:=distribute/host
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(subst .tar.gz,,$(PKG_SOURCE))
+
+include $(INCLUDE_DIR)/package.mk
+$(call include_mk, python-package.mk)
+
+define Package/mako
+  SUBMENU:=Python
+  SECTION:=lang
+  CATEGORY:=Languages
+  TITLE:=Mako Templates for Python
+  URL:=http://www.makotemplates.org/
+  DEPENDS:=+python
+endef
+
+define Package/mako/description
+Mako is a template library written in Python. It provides a familiar,
+non-XML syntax which compiles into Python modules for maximum
+performance. Mako's syntax and API borrows from the best ideas of many
+others, including Django templates, Cheetah, Myghty, and
+Genshi. Conceptually, Mako is an embedded Python (i.e. Python Server
+Page) language, which refines the familiar ideas of componentized
+layout and inheritance to produce one of the most straightforward and
+flexible models available, while also maintaining close ties to Python
+calling and scoping semantics.
+endef
+
+define Build/Compile
+	$(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR))
+endef
+
+define Package/mako/install
+	$(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
+	$(CP) \
+	    $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
+	    $(1)$(PYTHON_PKG_DIR)
+endef
+
+$(eval $(call BuildPackage,mako))
diff --git a/net/deluge/Makefile b/net/deluge/Makefile
new file mode 100644
index 0000000..8f8ac5d
--- /dev/null
+++ b/net/deluge/Makefile
@@ -0,0 +1,86 @@
+#
+# Copyright (C) 2008 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=deluge
+PKG_VERSION:=1.2.0
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=http://download.deluge-torrent.org/source/
+PKG_MD5SUM:=cec6b48f0abd79ea2cff3815a1124192
+
+include $(INCLUDE_DIR)/package.mk
+$(call include_mk, python-package.mk)
+
+define Package/deluge
+  SUBMENU:=BitTorrent
+  SECTION:=net
+  CATEGORY:=Network
+  TITLE:=deluge-daemon
+  URL:=http://deluge-torrent.org/
+  DEPENDS:=+python +rblibtorrent +python2-chardet +pyxdg +twisted +twisted-web +pyopenssl +distribute
+endef
+
+define Package/deluge/config
+	config DELUGE_WITH_WEBUI
+		bool "Include the web interface"
+		select PACKAGE_mako
+		default n
+
+	config DELUGE_WITH_GTKUI
+		bool "Include the GTK interface"
+		depends PACKAGE_pygame
+		depends PACKAGE_pygobject
+		depends PACKAGE_pygtk
+		depends PACKAGE_librsvg
+		default n
+endef
+
+define Package/deluge/description
+  BitTorrent client with a client/server model.
+endef
+
+define Package/deluge/conffiles
+/etc/config/deluge
+endef
+
+define Build/Prepare
+	$(call Build/Prepare/Default)
+	$(CP) -a files $(PKG_BUILD_DIR)
+	find $(PKG_BUILD_DIR)/files -name 'CVS' -o -name '.svn' -o -name '*~' | $(XARGS) rm -rf
+endef
+
+define Build/Compile
+	$(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR))
+
+	$(if $(CONFIG_DELUGE_WITH_WEBUI),,$(RM) "$(PKG_INSTALL_DIR)/usr/bin/deluge-web" ; \
+		$(RM) "$(PKG_INSTALL_DIR)/usr/share/man/man1/deluge-web.1" ; \
+		$(RM) -r "$(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/deluge/ui/web")
+
+	$(if $(CONFIG_DELUGE_WITH_GTKUI),,$(RM) "$(PKG_INSTALL_DIR)/usr/bin/deluge-gtk" ; \
+		$(RM) "$(PKG_INSTALL_DIR)/usr/share/man/man1/deluge-gtk.1" ; \
+		$(RM) -r "$(PKG_INSTALL_DIR)/usr/share/applications" ; \
+		$(RM) -r "$(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/deluge/ui/gtkui")
+endef
+
+define Package/deluge/install
+	$(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) $(1)/usr/bin $(1)/etc/config $(1)/etc/init.d
+	$(CP) \
+	    $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
+	    $(1)$(PYTHON_PKG_DIR)
+
+	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin
+
+	$(INSTALL_BIN) $(PKG_BUILD_DIR)/files/deluge.init $(1)/etc/init.d/deluge
+	$(INSTALL_CONF) $(PKG_BUILD_DIR)/files/deluge.config $(1)/etc/config/deluge
+
+	$(SED) 's,#!$(STAGING_DIR)/host/bin/$(PYTHON),#!/usr/bin/$(PYTHON),' $(1)/usr/bin/*
+endef
+
+$(eval $(call BuildPackage,deluge))
diff --git a/net/deluge/files/deluge.config b/net/deluge/files/deluge.config
new file mode 100644
index 0000000..576379f
--- /dev/null
+++ b/net/deluge/files/deluge.config
@@ -0,0 +1,5 @@
+config global deluged
+	option 'user' 'deluge:deluge'
+	option 'home' ''
+	option 'options' ''
+	option 'enabled' 1
diff --git a/net/deluge/files/deluge.init b/net/deluge/files/deluge.init
new file mode 100755
index 0000000..234a13d
--- /dev/null
+++ b/net/deluge/files/deluge.init
@@ -0,0 +1,60 @@
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2010 OpenWrt.org
+# Copyright (C) 2010 Alexander Sulfrian
+
+NAME=deluge
+PIDFILE=/var/run/deluged.pid
+START=50
+STOP=50
+
+load_config()
+{
+	config_get_bool enabled $1 enabled 0
+	[ "${enabled}" -eq 0 ] && return 1
+
+	config_get user $1 user
+	if [ "${user}" == "" ]; then
+		echo "Please check your uci config. User for '$1' should not be empty."
+		return 1
+	fi
+
+	username=$(echo ${user} | cut -d ':' -f 1)
+	group=$(echo ${user} | cut -d ':' -f 2)
+
+	if ! $(cut -d ':' -f 1 /etc/passwd | grep -sq "${username}"); then
+		echo "Please check your uci config. User for '$1' should exist."
+		return 1
+	fi
+
+	if [ "${group}" != "" ]; then
+		if ! $(cut -d ':' -f 1 /etc/passwd | grep -sq "${group}"); then
+			echo "Please check your uci config. Group for '$1' should exist."
+	                return 1
+		fi
+	fi
+}
+
+start()
+{
+	config_load "${NAME}"
+	load_config deluged || return $?
+
+	config_get options deluged options
+
+	config_get home deluged home
+	if [ "${home}" == "" ]; then
+		home=$(grep "^${username}:" /etc/passwd | cut -d ':' -f 6)
+	fi
+
+	HOME="${home}" /sbin/start-stop-daemon -S -u "${username}" \
+		-p "${PIDFILE}" -b -m -x "/usr/bin/python2.6" -a deluged \
+		-c "${user}" -- --do-not-daemonize ${options}
+}
+
+stop()
+{
+	config_load "${NAME}"
+	load_config deluged || return $?
+
+	/sbin/start-stop-daemon -K -u "${username}" -n deluged -p "${PIDFILE}"
+}
diff --git a/lang/pyopenssl/Makefile b/lang/pyopenssl/Makefile
new file mode 100644
index 0000000..f81b996
--- /dev/null
+++ b/lang/pyopenssl/Makefile
@@ -0,0 +1,48 @@
+#
+# Copyright (C) 2008 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=pyopenssl
+PKG_VERSION:=0.10
+PKG_RELEASE:=1
+
+PKG_SOURCE:=pyOpenSSL-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=http://pypi.python.org/packages/source/p/pyOpenSSL/
+PKG_MD5SUM:=34db8056ec53ce80c7f5fc58bee9f093
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/pyOpenSSL-$(PKG_VERSION)
+PKG_BUILD_DEPENDS:=python
+
+include $(INCLUDE_DIR)/package.mk
+$(call include_mk, python-package.mk)
+
+define Package/pyopenssl
+  SUBMENU:=Python
+  SECTION:=lang
+  CATEGORY:=Languages
+  TITLE:=pyopenssl
+  URL:=http://pyopenssl.sourceforge.net/
+  DEPENDS:=+python
+endef
+
+define Package/pyopenssl/description
+  Python interface to the OpenSSL library.
+endef
+
+define Build/Compile
+	$(call Build/Compile/PyMod,,install --prefix="$(PKG_INSTALL_DIR)/usr")
+endef
+
+define Package/pyopenssl/install
+	$(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
+	$(CP) \
+	    $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
+	    $(1)$(PYTHON_PKG_DIR)
+endef
+
+$(eval $(call BuildPackage,pyopenssl))
diff --git a/lang/distribute/Makefile b/lang/distribute/Makefile
new file mode 100644
index 0000000..59d34ba
--- /dev/null
+++ b/lang/distribute/Makefile
@@ -0,0 +1,62 @@
+#
+# Copyright (C) 2006 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=distribute
+PKG_VERSION:=0.6.10
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=http://pypi.python.org/packages/source/d/$(PKG_NAME)/
+PKG_MD5SUM:=99fb4b3e4ef0861bba11aa1905e89fed
+PKG_BUILD_DIR:=$(BUILD_DIR_HOST)/$(PKG_NAME)-$(PKG_VERSION)/
+
+include $(INCLUDE_DIR)/host-build.mk
+include $(INCLUDE_DIR)/package.mk
+$(call include_mk, python-package.mk)
+
+PYTHON:=$(STAGING_DIR)/usr/bin/hostpython
+
+define Package/distribute
+  SUBMENU:=Python
+  SECTION:=lang
+  CATEGORY:=Languages
+  TITLE:=Distribute
+  URL:=http://pypi.python.org/pypi/distribute
+  DEPENDS:=+python
+  PROVIDES:=setuptools
+endef
+
+define Package/distribute/description
+  Distribute (fork of Setuptools) is a collection of extensions to Distutils
+endef
+
+define Host/Compile
+	$(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR))
+endef
+
+define Host/Install
+	$(INSTALL_DIR) $(STAGING_DIR_HOST)$(PYTHON_PKG_DIR)
+	$(CP) \
+	    $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
+	    $(STAGING_DIR_HOST)$(PYTHON_PKG_DIR)
+endef
+
+define Build/Compile
+	$(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR))
+endef
+
+define Package/distribute/install
+	$(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
+	$(CP) \
+	    $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
+	    $(1)$(PYTHON_PKG_DIR)
+endef
+
+$(eval $(call HostBuild))
+$(eval $(call BuildPackage,distribute))
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to