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.

85 lines
2.0 KiB

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