2 # Copyright (C) 2008 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR)/rules.mk
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://download.deluge-torrent.org/source/
16 PKG_MD5SUM:=cec6b48f0abd79ea2cff3815a1124192
18 include $(INCLUDE_DIR)/package.mk
19 $(call include_mk, python-package.mk)
26 URL:=http://deluge-torrent.org/
27 DEPENDS:=+python +rblibtorrent +python2-chardet +pyxdg +twisted +twisted-web +pyopenssl +distribute
30 define Package/deluge/config
31 config DELUGE_WITH_WEBUI
32 bool "Include the web interface"
36 config DELUGE_WITH_GTKUI
37 bool "Include the GTK interface"
38 depends PACKAGE_pygame
39 depends PACKAGE_pygobject
41 depends PACKAGE_librsvg
45 define Package/deluge/description
46 BitTorrent client with a client/server model.
49 define Package/deluge/conffiles
54 $(call Build/Prepare/Default)
55 $(CP) -a files $(PKG_BUILD_DIR)
56 find $(PKG_BUILD_DIR)/files -name 'CVS' -o -name '.svn' -o -name '*~' | $(XARGS) rm -rf
60 $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR))
62 $(if $(CONFIG_DELUGE_WITH_WEBUI),,$(RM) "$(PKG_INSTALL_DIR)/usr/bin/deluge-web" ; \
63 $(RM) "$(PKG_INSTALL_DIR)/usr/share/man/man1/deluge-web.1" ; \
64 $(RM) -r "$(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/deluge/ui/web")
66 $(if $(CONFIG_DELUGE_WITH_GTKUI),,$(RM) "$(PKG_INSTALL_DIR)/usr/bin/deluge-gtk" ; \
67 $(RM) "$(PKG_INSTALL_DIR)/usr/share/man/man1/deluge-gtk.1" ; \
68 $(RM) -r "$(PKG_INSTALL_DIR)/usr/share/applications" ; \
69 $(RM) -r "$(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/deluge/ui/gtkui")
72 define Package/deluge/install
73 $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) $(1)/usr/bin $(1)/etc/config $(1)/etc/init.d
75 $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
78 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin
80 $(INSTALL_BIN) $(PKG_BUILD_DIR)/files/deluge.init $(1)/etc/init.d/deluge
81 $(INSTALL_CONF) $(PKG_BUILD_DIR)/files/deluge.config $(1)/etc/config/deluge
83 $(SED) 's,#!$(STAGING_DIR)/host/bin/$(PYTHON),#!/usr/bin/$(PYTHON),' $(1)/usr/bin/*
86 $(eval $(call BuildPackage,deluge))