|
@@ -0,0 +1,85 @@
|
|
1
|
+#
|
|
2
|
+# Copyright (C) 2006-2013 OpenWrt.org
|
|
3
|
+#
|
|
4
|
+# This is free software, licensed under the GNU General Public License v2.
|
|
5
|
+# See /LICENSE for more information.
|
|
6
|
+#
|
|
7
|
+
|
|
8
|
+include $(TOPDIR)/rules.mk
|
|
9
|
+
|
|
10
|
+PKG_NAME:=vsftpd
|
|
11
|
+PKG_VERSION:=3.0.2
|
|
12
|
+PKG_RELEASE:=3
|
|
13
|
+
|
|
14
|
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
|
15
|
+PKG_SOURCE_URL:=https://security.appspot.com/downloads/
|
|
16
|
+PKG_MD5SUM:=8b00c749719089401315bd3c44dddbb2
|
|
17
|
+
|
|
18
|
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
|
|
19
|
+
|
|
20
|
+include $(INCLUDE_DIR)/package.mk
|
|
21
|
+
|
|
22
|
+define Package/vsftpd/Default
|
|
23
|
+ SUBMENU:=File Transfer
|
|
24
|
+ SECTION:=net
|
|
25
|
+ CATEGORY:=Network
|
|
26
|
+ TITLE:=A fast and secure FTP server
|
|
27
|
+ URL:=http://vsftpd.beasts.org/
|
|
28
|
+ MAINTAINER:=Cezary Jackiewicz <cezary@eko.one.pl>
|
|
29
|
+endef
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+define Package/vsftpd
|
|
33
|
+$(call Package/vsftpd/Default)
|
|
34
|
+ VARIANT:=notls
|
|
35
|
+ TITLE+= (no TLS)
|
|
36
|
+endef
|
|
37
|
+
|
|
38
|
+define Package/vsftpd-tls
|
|
39
|
+$(call Package/vsftpd/Default)
|
|
40
|
+ VARIANT:=tls
|
|
41
|
+ TITLE+= (TLS)
|
|
42
|
+ DEPENDS+=+libopenssl
|
|
43
|
+endef
|
|
44
|
+
|
|
45
|
+define Package/vsftpd/conffiles
|
|
46
|
+/etc/vsftpd.conf
|
|
47
|
+endef
|
|
48
|
+
|
|
49
|
+Package/vsftpd-tls/conffiles=$(Package/vsftpd/conffiles)
|
|
50
|
+
|
|
51
|
+ifeq ($(BUILD_VARIANT),notls)
|
|
52
|
+ define Build/Compile
|
|
53
|
+ $(MAKE) -C $(PKG_BUILD_DIR) \
|
|
54
|
+ CC="$(TARGET_CC)" \
|
|
55
|
+ CFLAGS="$(TARGET_CFLAGS)" \
|
|
56
|
+ LDFLAGS="$(TARGET_LDFLAGS)" \
|
|
57
|
+ vsftpd
|
|
58
|
+ endef
|
|
59
|
+endif
|
|
60
|
+
|
|
61
|
+ifeq ($(BUILD_VARIANT),tls)
|
|
62
|
+ define Build/Compile
|
|
63
|
+ $(SED) 's/#undef VSF_BUILD_SSL/#define VSF_BUILD_SSL/' $(PKG_BUILD_DIR)/builddefs.h
|
|
64
|
+ $(SED) 's/-lcrypt -lnsl/-lcrypt -lnsl -lssl -lcrypto/' $(PKG_BUILD_DIR)/Makefile
|
|
65
|
+ $(MAKE) -C $(PKG_BUILD_DIR) \
|
|
66
|
+ CC="$(TARGET_CC)" \
|
|
67
|
+ CFLAGS="$(TARGET_CFLAGS)" \
|
|
68
|
+ LDFLAGS="$(TARGET_LDFLAGS)" \
|
|
69
|
+ vsftpd
|
|
70
|
+ endef
|
|
71
|
+endif
|
|
72
|
+
|
|
73
|
+define Package/vsftpd/install
|
|
74
|
+ $(INSTALL_DIR) $(1)/usr/sbin
|
|
75
|
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/usr/sbin/
|
|
76
|
+ $(INSTALL_DIR) $(1)/etc
|
|
77
|
+ $(INSTALL_CONF) ./files/$(PKG_NAME).conf $(1)/etc/$(PKG_NAME).conf
|
|
78
|
+ $(INSTALL_DIR) $(1)/etc/init.d
|
|
79
|
+ $(INSTALL_BIN) ./files/$(PKG_NAME).init $(1)/etc/init.d/$(PKG_NAME)
|
|
80
|
+endef
|
|
81
|
+
|
|
82
|
+Package/vsftpd-tls/install=$(Package/vsftpd/install)
|
|
83
|
+
|
|
84
|
+$(eval $(call BuildPackage,vsftpd))
|
|
85
|
+$(eval $(call BuildPackage,vsftpd-tls))
|