[packages] transmission: add uci config and init script (#6611)
[packages.git] / net / transmission / Makefile
1 #
2 # Copyright (C) 2009-2010 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:=transmission
11 PKG_VERSION:=1.82
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15 PKG_SOURCE_URL:=http://mirrors.m0k.org/transmission/files
16 PKG_MD5SUM:=00fe9cc2c4f8e004c89825812e387fc4
17
18 PKG_FIXUP:=libtool
19 PKG_INSTALL:=1
20
21 include $(INCLUDE_DIR)/package.mk
22
23 define Package/transmission/template
24   SUBMENU:=BitTorrent
25   SECTION:=net
26   CATEGORY:=Network
27   TITLE:=A free, lightweight BitTorrent client
28   URL:=http://www.transmissionbt.com
29 endef
30
31 define Package/transmission-daemon
32   $(call Package/transmission/template)
33   DEPENDS:=+libcurl +libopenssl +libpthread +libevent
34   MENU:=1
35 endef
36
37 define Package/transmission-cli
38   $(call Package/transmission/template)
39   DEPENDS:=transmission-daemon
40 endef
41
42 define Package/transmission-web
43   $(call Package/transmission/template)
44   DEPENDS:=transmission-daemon
45 endef
46
47 define Package/transmission-daemon/description
48  Transmission is a simple BitTorrent client.
49  It features a very simple, intuitive interface
50  on top on an efficient, cross-platform back-end.
51  This package contains the daemon itself.
52 endef
53
54 define Package/transmission-cli/description
55  CLI utilities for transmission.
56 endef
57
58 define Package/transmission-web/description
59  Webinterface resources for transmission.
60 endef
61
62 CONFIGURE_ARGS += \
63         --enable-daemon \
64         --disable-gtk \
65         --disable-wx \
66         --with-wx-config="$(STAGING_DIR)/usr/bin/" \
67
68 MAKE_FLAGS += \
69         CFLAGS="$(TARGET_CFLAGS)" \
70
71 define Package/transmission-daemon/install
72         $(INSTALL_DIR) $(1)/usr/bin
73         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/transmission-daemon $(1)/usr/bin/
74         $(INSTALL_DIR) $(1)/etc/init.d/
75         $(INSTALL_BIN) files/transmission.init $(1)/etc/init.d/transmission
76         $(INSTALL_DIR) $(1)/etc/config
77         $(INSTALL_CONF) files/transmission.config $(1)/etc/config/transmission
78 endef
79
80 define Package/transmission-cli/install
81         $(INSTALL_DIR) $(1)/usr/bin
82         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/transmissioncli $(1)/usr/bin/
83         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/transmission-remote $(1)/usr/bin/
84 endef
85
86 define Package/transmission-web/install
87         $(INSTALL_DIR) $(1)/usr/share/transmission
88         $(CP) $(PKG_INSTALL_DIR)/usr/share/transmission/web $(1)/usr/share/transmission/
89 endef
90
91 $(eval $(call BuildPackage,transmission-daemon))
92 $(eval $(call BuildPackage,transmission-cli))
93 $(eval $(call BuildPackage,transmission-web))