Blame view

buildroot/buildroot-2016.08.1/package/transmission/transmission.mk 2.46 KB
6b13f685e   김민수   BSP 최초 추가
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
  ################################################################################
  #
  # transmission
  #
  ################################################################################
  
  TRANSMISSION_VERSION = 2.92
  TRANSMISSION_SITE = http://download.transmissionbt.com/files
  TRANSMISSION_SOURCE = transmission-$(TRANSMISSION_VERSION).tar.xz
  TRANSMISSION_DEPENDENCIES = \
  	host-pkgconf \
  	host-intltool \
  	libcurl \
  	libevent \
  	openssl \
  	zlib
  TRANSMISSION_AUTORECONF = YES
  TRANSMISSION_CONF_OPTS = \
  	--disable-libnotify \
  	--enable-lightweight
  TRANSMISSION_LICENSE = GPLv2 or GPLv3 with OpenSSL exception
  TRANSMISSION_LICENSE_FILES = COPYING
  
  ifeq ($(BR2_PACKAGE_LIBMINIUPNPC),y)
  TRANSMISSION_DEPENDENCIES += libminiupnpc
  endif
  
  ifeq ($(BR2_PACKAGE_LIBNATPMP),y)
  TRANSMISSION_DEPENDENCIES += libnatpmp
  TRANSMISSION_CONF_OPTS += --enable-external-natpmp
  else
  TRANSMISSION_CONF_OPTS += --disable-external-natpmp
  endif
  
  ifeq ($(BR2_PACKAGE_TRANSMISSION_UTP),y)
  TRANSMISSION_CONF_OPTS += --enable-utp
  else
  TRANSMISSION_CONF_OPTS += --disable-utp
  endif
  
  ifeq ($(BR2_PACKAGE_TRANSMISSION_CLI),y)
  TRANSMISSION_CONF_OPTS += --enable-cli
  else
  TRANSMISSION_CONF_OPTS += --disable-cli
  endif
  
  ifeq ($(BR2_PACKAGE_TRANSMISSION_DAEMON),y)
  TRANSMISSION_CONF_OPTS += --enable-daemon
  
  ifeq ($(BR2_PACKAGE_SYSTEMD),y)
  TRANSMISSION_DEPENDENCIES += systemd
  TRANSMISSION_CONF_OPTS += --with-systemd-daemon
  else
  TRANSMISSION_CONF_OPTS += --without-systemd-daemon
  endif
  
  define TRANSMISSION_USERS
  	transmission -1 transmission -1 * /var/lib/transmission - transmission Transmission Daemon
  endef
  
  define TRANSMISSION_INSTALL_INIT_SYSV
  	$(INSTALL) -m 0755 -D package/transmission/S92transmission \
  		$(TARGET_DIR)/etc/init.d/S92transmission
  endef
  
  define TRANSMISSION_INSTALL_INIT_SYSTEMD
  	$(INSTALL) -D -m 0755 $(@D)/daemon/transmission-daemon.service \
  		$(TARGET_DIR)/usr/lib/systemd/system/transmission-daemon.service
  	mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
  	ln -fs ../../../../usr/lib/systemd/system/transmission-daemon.service \
  		$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/transmission-daemon.service
  endef
  
  else
  TRANSMISSION_CONF_OPTS += --disable-daemon
  endif
  
  ifeq ($(BR2_PACKAGE_TRANSMISSION_REMOTE),y)
  TRANSMISSION_CONF_OPTS += --enable-remote
  else
  TRANSMISSION_CONF_OPTS += --disable-remote
  endif
  
  ifeq ($(BR2_PACKAGE_TRANSMISSION_GTK),y)
  TRANSMISSION_CONF_OPTS += --enable-gtk
  TRANSMISSION_DEPENDENCIES += libgtk2
  else
  TRANSMISSION_CONF_OPTS += --disable-gtk
  endif
  
  $(eval $(autotools-package))