瀏覽代碼

mailsend: split into 2 packages - with SSL and without SSL

Signed-off-by: Ted Hess <thess@kitschensync.net>
Ted Hess 10 年之前
父節點
當前提交
0b2e43d07b
共有 1 個檔案被更改,包括 26 行新增13 行删除
  1. 26
    13
      mail/mailsend/Makefile

+ 26
- 13
mail/mailsend/Makefile 查看文件

1
 #
1
 #
2
-# Copyright (C) 2014 OpenWrt.org
2
+# Copyright (C) 2014-2015 OpenWrt.org
3
 #
3
 #
4
 # This is free software, licensed under the GNU General Public License v2.
4
 # This is free software, licensed under the GNU General Public License v2.
5
 # See /LICENSE for more information.
5
 # See /LICENSE for more information.
9
 
9
 
10
 PKG_NAME:=mailsend
10
 PKG_NAME:=mailsend
11
 PKG_VERSION:=1.17b15
11
 PKG_VERSION:=1.17b15
12
-PKG_RELEASE:=1
12
+PKG_RELEASE:=2
13
 
13
 
14
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
14
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15
 PKG_SOURCE_URL:=https://github.com/muquit/mailsend/archive/$(PKG_VERSION)
15
 PKG_SOURCE_URL:=https://github.com/muquit/mailsend/archive/$(PKG_VERSION)
20
 PKG_LICENSE:=BSD-3-Clause
20
 PKG_LICENSE:=BSD-3-Clause
21
 PKG_LICENSE_FILES:=COPYRIGHT
21
 PKG_LICENSE_FILES:=COPYRIGHT
22
 
22
 
23
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
24
+
23
 include $(INCLUDE_DIR)/package.mk
25
 include $(INCLUDE_DIR)/package.mk
24
 
26
 
25
-define Package/mailsend
27
+define Package/mailsend/default
26
 	SECTION:=mail
28
 	SECTION:=mail
27
 	CATEGORY:=Mail
29
 	CATEGORY:=Mail
28
 	TITLE:=A command-line mail sender
30
 	TITLE:=A command-line mail sender
29
-	DEPENDS:=+MAILSEND_SSL:libopenssl
30
 	URL:=https://github.com/muquit/mailsend
31
 	URL:=https://github.com/muquit/mailsend
31
 endef
32
 endef
32
 
33
 
33
-define Package/mailsend/config
34
-config MAILSEND_SSL
35
-        bool "SSL support"
36
-        depends on PACKAGE_mailsend
37
-        default n
38
-        help
39
-          Implements SSL support in mailsend (using libopenssl).
34
+define Package/mailsend-nossl
35
+	$(call Package/mailsend/default)
36
+	TITLE+= (without SSL)
37
+	VARIANT:=nossl
38
+endef
39
+
40
+define Package/mailsend
41
+	$(call Package/mailsend/default)
42
+	TITLE+= (with SSL)
43
+	DEPENDS:=+libopenssl
44
+	VARIANT:=ssl
40
 endef
45
 endef
41
 
46
 
42
-ifeq ($(CONFIG_MAILSEND_SSL),y)
47
+ifeq ($(BUILD_VARIANT),ssl)
43
   CONFIGURE_ARGS+= --with-openssl=$(STAGING_DIR)/usr
48
   CONFIGURE_ARGS+= --with-openssl=$(STAGING_DIR)/usr
44
 endif
49
 endif
45
 
50
 
46
 define Package/mailsend/description
51
 define Package/mailsend/description
52
+  $(call Package/mailsend-nossl/description)
53
+  .
54
+  SSL supported is provided by OpenSSL.
55
+endef
56
+
57
+define Package/mailsend-nossl/description
47
   Mailsend is a simple command line program to send mail via SMTP protocol.
58
   Mailsend is a simple command line program to send mail via SMTP protocol.
48
-  SSL is supported via OpenSSL (optional).
49
 endef
59
 endef
50
 
60
 
51
 define Build/Compile
61
 define Build/Compile
57
 	$(INSTALL_BIN) $(PKG_BUILD_DIR)/mailsend $(1)/usr/bin/
67
 	$(INSTALL_BIN) $(PKG_BUILD_DIR)/mailsend $(1)/usr/bin/
58
 endef
68
 endef
59
 
69
 
70
+Package/mailsend-nossl/install=$(Package/mailsend/install)
71
+
60
 $(eval $(call BuildPackage,mailsend))
72
 $(eval $(call BuildPackage,mailsend))
73
+$(eval $(call BuildPackage,mailsend-nossl))