horst: moved to github
[packages.git] / net / pure-ftpd / Makefile
index dac3462..3b2403b 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2007-2010 OpenWrt.org
+# Copyright (C) 2007-2011 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,26 +8,41 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=pure-ftpd
-PKG_VERSION:=1.0.29
-PKG_RELEASE:=2
+PKG_VERSION:=1.0.36
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=http://download.pureftpd.org/pub/pure-ftpd/releases
-PKG_MD5SUM:=12a074824b509f9e7684fab333ed6915
+PKG_MD5SUM:=7899c75c1fed7dbad0352eb31080e066
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
 
 PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
-define Package/pure-ftpd
-  SUBMENU:=FTP
+define Package/pure-ftpd/Default
+  SUBMENU:=File Transfer
   SECTION:=net
   CATEGORY:=Network
-  DEPENDS:=+libelf
+  DEPENDS:=+libelf1
   TITLE:=Secure FTP made easy!
   URL:=http://www.pureftpd.org/project/pure-ftpd
 endef
 
+define Package/pure-ftpd
+  $(call Package/pure-ftpd/Default)
+  TITLE+= (no TLS)
+  VARIANT:=notls
+endef
+
+define Package/pure-ftpd-tls
+  $(call Package/pure-ftpd/Default)
+  TITLE+= (TLS)
+  VARIANT:=tls
+  DEPENDS+=+libopenssl
+endef
+
 define Package/pure-ftpd/description
  Pure-FTPd is a free (BSD), secure, production-quality and standard-conformant
  FTP server. It doesn't provide useless bells and whistles, but focuses on
@@ -36,13 +51,24 @@ define Package/pure-ftpd/description
  personal users as well as hosting providers.
 endef
 
+Package/pure-ftpd-tls/description=$(Package/pure-ftpd/description)
+
 define Package/pure-ftpd/conffiles
 /etc/config/pure-ftpd
 endef
 
+Package/pure-ftpd-tls/conffiles=$(Package/pure-ftpd/conffiles)
+
 CONFIGURE_ARGS += \
        --with-everything \
        --with-virtualchroot \
+       --without-capabilities \
+
+ifeq ($(BUILD_VARIANT),tls)
+CONFIGURE_ARGS += \
+       --with-certfile=/etc/ssl/private/pure-ftpd.pem \
+       --with-tls
+endif
 
 define Package/pure-ftpd/install
        $(INSTALL_DIR) $(1)/etc/config
@@ -60,4 +86,7 @@ define Package/pure-ftpd/install
                $(1)/usr/sbin/
 endef
 
+Package/pure-ftpd-tls/install=$(Package/pure-ftpd/install)
+
 $(eval $(call BuildPackage,pure-ftpd))
+$(eval $(call BuildPackage,pure-ftpd-tls))