You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

86 lines
2.0 KiB

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