Browse Source

transmission: split packages depending on selected cryptography library

transmission: Shortening the title

Signed-off-by: Cezary Jackiewicz <cezary@eko.one.pl>
Cezary Jackiewicz 8 years ago
parent
commit
24aca0746b
1 changed files with 88 additions and 19 deletions
  1. 88
    19
      net/transmission/Makefile

+ 88
- 19
net/transmission/Makefile View File

9
 
9
 
10
 PKG_NAME:=transmission
10
 PKG_NAME:=transmission
11
 PKG_VERSION:=2.92
11
 PKG_VERSION:=2.92
12
-PKG_RELEASE:=1
12
+PKG_RELEASE:=2
13
 
13
 
14
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
14
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
15
 PKG_SOURCE_URL:=http://download-origin.transmissionbt.com/files/ http://mirrors.m0k.org/transmission/files
15
 PKG_SOURCE_URL:=http://download-origin.transmissionbt.com/files/ http://mirrors.m0k.org/transmission/files
19
 PKG_INSTALL:=1
19
 PKG_INSTALL:=1
20
 PKG_BUILD_PARALLEL:=1
20
 PKG_BUILD_PARALLEL:=1
21
 
21
 
22
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
23
+
22
 include $(INCLUDE_DIR)/package.mk
24
 include $(INCLUDE_DIR)/package.mk
23
 
25
 
24
 define Package/transmission/template
26
 define Package/transmission/template
25
   SUBMENU:=BitTorrent
27
   SUBMENU:=BitTorrent
26
   SECTION:=net
28
   SECTION:=net
27
   CATEGORY:=Network
29
   CATEGORY:=Network
28
-  TITLE:=A free, lightweight BitTorrent client
30
+  TITLE:=BitTorrent client
29
   URL:=http://www.transmissionbt.com
31
   URL:=http://www.transmissionbt.com
30
   MAINTAINER:=Cezary Jackiewicz <cezary@eko.one.pl>
32
   MAINTAINER:=Cezary Jackiewicz <cezary@eko.one.pl>
31
 endef
33
 endef
32
 
34
 
33
-define Package/transmission-daemon
35
+define Package/transmission-daemon/Default
34
   $(call Package/transmission/template)
36
   $(call Package/transmission/template)
35
-  DEPENDS:=+libcurl +libopenssl +libpthread +libevent2 +librt
36
-  MENU:=1
37
+  DEPENDS:=+libcurl +libpthread +libevent2 +librt
37
   USERID:=transmission=224:transmission=224
38
   USERID:=transmission=224:transmission=224
39
+  PROVIDES:=transmission-daemon
40
+endef
41
+
42
+define Package/transmission-daemon-openssl
43
+  $(call Package/transmission-daemon/Default)
44
+  TITLE+= (with OpenSSL)
45
+  DEPENDS+=+libopenssl
46
+  VARIANT:=openssl
47
+endef
48
+
49
+define Package/transmission-daemon-polarssl
50
+  $(call Package/transmission-daemon/Default)
51
+  TITLE+= (with PolarSSL)
52
+  DEPENDS+=+libpolarssl +zlib
53
+  VARIANT:=polarssl
38
 endef
54
 endef
39
 
55
 
40
-define Package/transmission-cli
56
+define Package/transmission-cli/Default
41
   $(call Package/transmission/template)
57
   $(call Package/transmission/template)
42
-  DEPENDS:=transmission-daemon
58
+  DEPENDS:=+libcurl +libpthread +libevent2 +librt
59
+endef
60
+
61
+define Package/transmission-cli-openssl
62
+  $(call Package/transmission-cli/Default)
63
+  TITLE+= (with OpenSSL)
64
+  DEPENDS+=+libopenssl
65
+  VARIANT:=openssl
43
 endef
66
 endef
44
 
67
 
45
-define Package/transmission-remote
68
+define Package/transmission-cli-polarssl
69
+  $(call Package/transmission-cli/Default)
70
+  TITLE+= (with PolarSSL)
71
+  DEPENDS+=+libpolarssl +zlib
72
+  VARIANT:=polarssl
73
+endef
74
+
75
+define Package/transmission-remote/Default
46
   $(call Package/transmission/template)
76
   $(call Package/transmission/template)
47
-  DEPENDS:=+libcurl +libopenssl +libpthread +libevent2 +librt
77
+  DEPENDS:=+libcurl +libpthread +libevent2 +librt
78
+endef
79
+
80
+define Package/transmission-remote-openssl
81
+  $(call Package/transmission-remote/Default)
82
+  TITLE+= (with OpenSSL)
83
+  DEPENDS+=+libopenssl
84
+  VARIANT:=openssl
85
+endef
86
+
87
+define Package/transmission-remote-polarssl
88
+  $(call Package/transmission-remote/Default)
89
+  TITLE+= (with PolarSSL)
90
+  DEPENDS+=+libpolarssl +zlib
91
+  VARIANT:=polarssl
48
 endef
92
 endef
49
 
93
 
50
 define Package/transmission-web
94
 define Package/transmission-web
51
   $(call Package/transmission/template)
95
   $(call Package/transmission/template)
96
+  TITLE+= (webinterface)
52
   DEPENDS:=transmission-daemon
97
   DEPENDS:=transmission-daemon
53
 endef
98
 endef
54
 
99
 
55
 
100
 
56
-define Package/transmission-daemon/description
101
+define Package/transmission-daemon/Default/description
57
  Transmission is a simple BitTorrent client.
102
  Transmission is a simple BitTorrent client.
58
  It features a very simple, intuitive interface
103
  It features a very simple, intuitive interface
59
  on top on an efficient, cross-platform back-end.
104
  on top on an efficient, cross-platform back-end.
60
  This package contains the daemon itself.
105
  This package contains the daemon itself.
61
 endef
106
 endef
107
+Package/transmission-daemon-openssl/description = $(Package/transmission-daemon/Default/description)
108
+Package/transmission-daemon-polarssl/description = $(Package/transmission-daemon/Default/description)
62
 
109
 
63
-define Package/transmission-cli/description
110
+define Package/transmission-cli/Default/description
64
  CLI utilities for transmission.
111
  CLI utilities for transmission.
65
 endef
112
 endef
113
+Package/transmission-cli-openssl/description = $(Package/transmission-cli/Default/description)
114
+Package/transmission-cli-polarssl/description = $(Package/transmission-cli/Default/description)
66
 
115
 
67
-define Package/transmission-remote/description
116
+define Package/transmission-remote/Default/description
68
  CLI remote interface for transmission.
117
  CLI remote interface for transmission.
69
 endef
118
 endef
119
+Package/transmission-remote-openssl/description = $(Package/transmission-remote/Default/description)
120
+Package/transmission-remote-polarssl/description = $(Package/transmission-remote/Default/description)
70
 
121
 
71
 define Package/transmission-web/description
122
 define Package/transmission-web/description
72
  Webinterface resources for transmission.
123
  Webinterface resources for transmission.
73
 endef
124
 endef
74
 
125
 
75
-define Package/transmission-daemon/conffiles
126
+define Package/transmission-daemon-openssl/conffiles
76
 /etc/config/transmission
127
 /etc/config/transmission
77
 endef
128
 endef
129
+Package/transmission-daemon-polarssl/conffiles = $(Package/transmission-daemon-openssl/conffiles)
130
+
78
 
131
 
79
 CONFIGURE_VARS += \
132
 CONFIGURE_VARS += \
80
 	LIBEVENT_LIBS="$(STAGING_DIR)/usr/lib/libevent-2.0.so.5"
133
 	LIBEVENT_LIBS="$(STAGING_DIR)/usr/lib/libevent-2.0.so.5"
86
 	--enable-largefile \
139
 	--enable-largefile \
87
 	--enable-lightweight
140
 	--enable-lightweight
88
 
141
 
142
+ifeq ($(BUILD_VARIANT),openssl)
143
+  CONFIGURE_ARGS += \
144
+	--with-crypto=openssl
145
+endif
146
+
147
+ifeq ($(BUILD_VARIANT),polarssl)
148
+  CONFIGURE_ARGS += \
149
+	--with-crypto=polarssl
150
+endif
151
+
89
 MAKE_FLAGS += \
152
 MAKE_FLAGS += \
90
 	CFLAGS="$(TARGET_CFLAGS) -D_GNU_SOURCE"
153
 	CFLAGS="$(TARGET_CFLAGS) -D_GNU_SOURCE"
91
 
154
 
92
 TARGET_CFLAGS += -std=gnu99
155
 TARGET_CFLAGS += -std=gnu99
93
 
156
 
94
-define Package/transmission-daemon/install
157
+define Package/transmission-daemon-openssl/install
95
 	$(INSTALL_DIR) $(1)/usr/bin
158
 	$(INSTALL_DIR) $(1)/usr/bin
96
 	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/transmission-daemon $(1)/usr/bin/
159
 	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/transmission-daemon $(1)/usr/bin/
97
 	$(INSTALL_DIR) $(1)/etc/init.d/
160
 	$(INSTALL_DIR) $(1)/etc/init.d/
99
 	$(INSTALL_DIR) $(1)/etc/config
162
 	$(INSTALL_DIR) $(1)/etc/config
100
 	$(INSTALL_CONF) files/transmission.config $(1)/etc/config/transmission
163
 	$(INSTALL_CONF) files/transmission.config $(1)/etc/config/transmission
101
 endef
164
 endef
165
+Package/transmission-daemon-polarssl/install = $(Package/transmission-daemon-openssl/install)
102
 
166
 
103
-define Package/transmission-cli/install
167
+define Package/transmission-cli-openssl/install
104
 	$(INSTALL_DIR) $(1)/usr/bin
168
 	$(INSTALL_DIR) $(1)/usr/bin
105
 	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/transmission-cli \
169
 	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/transmission-cli \
106
 			$(PKG_INSTALL_DIR)/usr/bin/transmission-create \
170
 			$(PKG_INSTALL_DIR)/usr/bin/transmission-create \
108
 			$(PKG_INSTALL_DIR)/usr/bin/transmission-show \
172
 			$(PKG_INSTALL_DIR)/usr/bin/transmission-show \
109
 			$(1)/usr/bin/
173
 			$(1)/usr/bin/
110
 endef
174
 endef
175
+Package/transmission-cli-polarssl/install = $(Package/transmission-cli-openssl/install)
111
 
176
 
112
-define Package/transmission-remote/install
177
+define Package/transmission-remote-openssl/install
113
 	$(INSTALL_DIR) $(1)/usr/bin
178
 	$(INSTALL_DIR) $(1)/usr/bin
114
 	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/transmission-remote $(1)/usr/bin/
179
 	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/transmission-remote $(1)/usr/bin/
115
 endef
180
 endef
181
+Package/transmission-remote-polarssl/install = $(Package/transmission-remote-openssl/install)
116
 
182
 
117
 define Package/transmission-web/install
183
 define Package/transmission-web/install
118
 	$(INSTALL_DIR) $(1)/usr/share/transmission
184
 	$(INSTALL_DIR) $(1)/usr/share/transmission
119
 	$(CP) $(PKG_INSTALL_DIR)/usr/share/transmission/web $(1)/usr/share/transmission/
185
 	$(CP) $(PKG_INSTALL_DIR)/usr/share/transmission/web $(1)/usr/share/transmission/
120
 endef
186
 endef
121
 
187
 
122
-$(eval $(call BuildPackage,transmission-daemon))
123
-$(eval $(call BuildPackage,transmission-cli))
124
-$(eval $(call BuildPackage,transmission-remote))
188
+$(eval $(call BuildPackage,transmission-daemon-openssl))
189
+$(eval $(call BuildPackage,transmission-daemon-polarssl))
190
+$(eval $(call BuildPackage,transmission-cli-openssl))
191
+$(eval $(call BuildPackage,transmission-cli-polarssl))
192
+$(eval $(call BuildPackage,transmission-remote-openssl))
193
+$(eval $(call BuildPackage,transmission-remote-polarssl))
125
 $(eval $(call BuildPackage,transmission-web))
194
 $(eval $(call BuildPackage,transmission-web))