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,7 +9,7 @@ include $(TOPDIR)/rules.mk
9 9
 
10 10
 PKG_NAME:=transmission
11 11
 PKG_VERSION:=2.92
12
-PKG_RELEASE:=1
12
+PKG_RELEASE:=2
13 13
 
14 14
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
15 15
 PKG_SOURCE_URL:=http://download-origin.transmissionbt.com/files/ http://mirrors.m0k.org/transmission/files
@@ -19,62 +19,115 @@ PKG_FIXUP:=autoreconf
19 19
 PKG_INSTALL:=1
20 20
 PKG_BUILD_PARALLEL:=1
21 21
 
22
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
23
+
22 24
 include $(INCLUDE_DIR)/package.mk
23 25
 
24 26
 define Package/transmission/template
25 27
   SUBMENU:=BitTorrent
26 28
   SECTION:=net
27 29
   CATEGORY:=Network
28
-  TITLE:=A free, lightweight BitTorrent client
30
+  TITLE:=BitTorrent client
29 31
   URL:=http://www.transmissionbt.com
30 32
   MAINTAINER:=Cezary Jackiewicz <cezary@eko.one.pl>
31 33
 endef
32 34
 
33
-define Package/transmission-daemon
35
+define Package/transmission-daemon/Default
34 36
   $(call Package/transmission/template)
35
-  DEPENDS:=+libcurl +libopenssl +libpthread +libevent2 +librt
36
-  MENU:=1
37
+  DEPENDS:=+libcurl +libpthread +libevent2 +librt
37 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 54
 endef
39 55
 
40
-define Package/transmission-cli
56
+define Package/transmission-cli/Default
41 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 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 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 92
 endef
49 93
 
50 94
 define Package/transmission-web
51 95
   $(call Package/transmission/template)
96
+  TITLE+= (webinterface)
52 97
   DEPENDS:=transmission-daemon
53 98
 endef
54 99
 
55 100
 
56
-define Package/transmission-daemon/description
101
+define Package/transmission-daemon/Default/description
57 102
  Transmission is a simple BitTorrent client.
58 103
  It features a very simple, intuitive interface
59 104
  on top on an efficient, cross-platform back-end.
60 105
  This package contains the daemon itself.
61 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 111
  CLI utilities for transmission.
65 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 117
  CLI remote interface for transmission.
69 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 122
 define Package/transmission-web/description
72 123
  Webinterface resources for transmission.
73 124
 endef
74 125
 
75
-define Package/transmission-daemon/conffiles
126
+define Package/transmission-daemon-openssl/conffiles
76 127
 /etc/config/transmission
77 128
 endef
129
+Package/transmission-daemon-polarssl/conffiles = $(Package/transmission-daemon-openssl/conffiles)
130
+
78 131
 
79 132
 CONFIGURE_VARS += \
80 133
 	LIBEVENT_LIBS="$(STAGING_DIR)/usr/lib/libevent-2.0.so.5"
@@ -86,12 +139,22 @@ CONFIGURE_ARGS += \
86 139
 	--enable-largefile \
87 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 152
 MAKE_FLAGS += \
90 153
 	CFLAGS="$(TARGET_CFLAGS) -D_GNU_SOURCE"
91 154
 
92 155
 TARGET_CFLAGS += -std=gnu99
93 156
 
94
-define Package/transmission-daemon/install
157
+define Package/transmission-daemon-openssl/install
95 158
 	$(INSTALL_DIR) $(1)/usr/bin
96 159
 	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/transmission-daemon $(1)/usr/bin/
97 160
 	$(INSTALL_DIR) $(1)/etc/init.d/
@@ -99,8 +162,9 @@ define Package/transmission-daemon/install
99 162
 	$(INSTALL_DIR) $(1)/etc/config
100 163
 	$(INSTALL_CONF) files/transmission.config $(1)/etc/config/transmission
101 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 168
 	$(INSTALL_DIR) $(1)/usr/bin
105 169
 	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/transmission-cli \
106 170
 			$(PKG_INSTALL_DIR)/usr/bin/transmission-create \
@@ -108,18 +172,23 @@ define Package/transmission-cli/install
108 172
 			$(PKG_INSTALL_DIR)/usr/bin/transmission-show \
109 173
 			$(1)/usr/bin/
110 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 178
 	$(INSTALL_DIR) $(1)/usr/bin
114 179
 	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/transmission-remote $(1)/usr/bin/
115 180
 endef
181
+Package/transmission-remote-polarssl/install = $(Package/transmission-remote-openssl/install)
116 182
 
117 183
 define Package/transmission-web/install
118 184
 	$(INSTALL_DIR) $(1)/usr/share/transmission
119 185
 	$(CP) $(PKG_INSTALL_DIR)/usr/share/transmission/web $(1)/usr/share/transmission/
120 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 194
 $(eval $(call BuildPackage,transmission-web))