summaryrefslogtreecommitdiff
path: root/package/transmission/transmission.mk
blob: db066928162a77318142925236ab1cc50fd61cbc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#############################################################
#
# transmission
#
#############################################################
TRANSMISSION_VERSION = 2.33
TRANSMISSION_SITE = http://download.transmissionbt.com/files/
TRANSMISSION_SOURCE = transmission-$(TRANSMISSION_VERSION).tar.bz2
TRANSMISSION_DEPENDENCIES = \
	host-pkg-config \
	libcurl \
	libevent \
	openssl \
	zlib

TRANSMISSION_CONF_OPT = \
	--disable-gtk \
	--disable-libnotify \
	--enable-lightweight

define TRANSMISSION_INIT_SCRIPT_INSTALL
	[ -f $(TARGET_DIR)/etc/init.d/S92transmission ] || \
		$(INSTALL) -m 0755 -D package/transmission/S92transmission \
			$(TARGET_DIR)/etc/init.d/S92transmission
endef

ifeq ($(BR2_PACKAGE_TRANSMISSION_UTP),y)
	TRANSMISSION_CONF_OPT += --enable-utp
else
	TRANSMISSION_CONF_OPT += --disable-utp
endif

ifeq ($(BR2_PACKAGE_TRANSMISSION_CLI),y)
	TRANSMISSION_CONF_OPT += --enable-cli
else
	TRANSMISSION_CONF_OPT += --disable-cli
endif

ifeq ($(BR2_PACKAGE_TRANSMISSION_DAEMON),y)
	TRANSMISSION_CONF_OPT += --enable-daemon
	TRANSMISSION_POST_INSTALL_TARGET_HOOKS += TRANSMISSION_INIT_SCRIPT_INSTALL
else
	TRANSMISSION_CONF_OPT += --disable-daemon
endif

ifeq ($(BR2_PACKAGE_TRANSMISSION_REMOTE),y)
	TRANSMISSION_CONF_OPT += --enable-remote
else
	TRANSMISSION_CONF_OPT += --disable-remote
endif

$(eval $(call AUTOTARGETS))