source: packages/net/deluge/Makefile @ 28470

Last change on this file since 28470 was 28470, checked in by nico, 5 years ago

[packages] deluge: split daemon & UIs

File size: 2.7 KB
Line 
1#
2# Copyright (C) 2008-2011 OpenWrt.org
3#
4# This is free software, licensed under the GNU General Public License v2.
5# See /LICENSE for more information.
6#
7
8include $(TOPDIR)/rules.mk
9
10PKG_NAME:=deluge
11PKG_VERSION:=1.2.0
12PKG_RELEASE:=2
13
14PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15PKG_SOURCE_URL:=http://download.deluge-torrent.org/source/
16PKG_MD5SUM:=cec6b48f0abd79ea2cff3815a1124192
17
18PKG_BUILD_DEPENDS:=distribute/host
19
20include $(INCLUDE_DIR)/package.mk
21$(call include_mk, python-package.mk)
22
23define Package/deluge/Default
24  SUBMENU:=BitTorrent
25  SECTION:=net
26  CATEGORY:=Network
27  TITLE:=A lightweight BitTorrent client
28  URL:=http://deluge-torrent.org/
29endef
30
31define Package/deluge
32$(call Package/deluge/Default)
33  TITLE+= (console UI & daemon)
34  DEPENDS+=+python +rblibtorrent +python2-chardet +pyxdg +twisted +twisted-web +pyopenssl
35endef
36
37define Package/deluge-ui-gtk
38$(call Package/deluge/Default)
39  TITLE+= (GTK+ UI)
40  DEPENDS+=deluge +python-gtk
41endef
42
43define Package/deluge-ui-web
44$(call Package/deluge/Default)
45  TITLE+= (Web UI)
46  DEPENDS+=deluge +mako
47endef
48
49define Package/deluge/description
50  BitTorrent client with a client/server model.
51endef
52
53define Package/deluge/conffiles
54/etc/config/deluge
55endef
56
57define Build/Compile
58        $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR))
59
60        $(SED) 's,#!$(STAGING_DIR)/host/bin/$(PYTHON),#!/usr/bin/$(PYTHON),' $(PKG_INSTALL_DIR)/usr/bin/*
61endef
62
63define Package/deluge/install
64        $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
65        $(CP) \
66            $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
67            $(1)$(PYTHON_PKG_DIR)/
68        rm -rf $(1)$(PYTHON_PKG_DIR)/deluge/ui/gtkui
69        rm -rf $(1)$(PYTHON_PKG_DIR)/deluge/ui/web
70
71        $(INSTALL_DIR) $(1)/usr/bin
72        $(CP) \
73            $(PKG_INSTALL_DIR)/usr/bin/* \
74            $(1)/usr/bin/
75        rm -rf $(1)/usr/bin/deluge-gtk
76        rm -rf $(1)/usr/bin/deluge-web
77
78        $(INSTALL_DIR) $(1)/etc/config
79        $(INSTALL_CONF) ./files/deluge.config $(1)/etc/config/deluge
80
81        $(INSTALL_DIR) $(1)/etc/init.d
82        $(INSTALL_BIN) ./files/deluge.init $(1)/etc/init.d/deluge
83endef
84
85define Package/deluge-ui-gtk/install
86        $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)/deluge/ui
87        $(CP) \
88            $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/deluge/ui/gtkui \
89            $(1)$(PYTHON_PKG_DIR)/deluge/ui/
90
91        $(INSTALL_DIR) $(1)/usr/bin
92        $(CP) \
93            $(PKG_INSTALL_DIR)/usr/bin/deluge-gtk \
94            $(1)/usr/bin/
95endef
96
97define Package/deluge-ui-web/install
98        $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)/deluge/ui
99        $(CP) \
100            $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/deluge/ui/web \
101            $(1)$(PYTHON_PKG_DIR)/deluge/ui/
102
103        $(INSTALL_DIR) $(1)/usr/bin
104        $(CP) \
105            $(PKG_INSTALL_DIR)/usr/bin/deluge-web \
106            $(1)/usr/bin/
107endef
108
109$(eval $(call BuildPackage,deluge))
110$(eval $(call BuildPackage,deluge-ui-gtk))
111$(eval $(call BuildPackage,deluge-ui-web))
Note: See TracBrowser for help on using the repository browser.