horst: moved to github
[packages.git] / net / pure-ftpd / Makefile
1 #
2 # Copyright (C) 2007-2011 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:=pure-ftpd
11 PKG_VERSION:=1.0.36
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15 PKG_SOURCE_URL:=http://download.pureftpd.org/pub/pure-ftpd/releases
16 PKG_MD5SUM:=7899c75c1fed7dbad0352eb31080e066
17
18 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
19
20 PKG_INSTALL:=1
21
22 include $(INCLUDE_DIR)/package.mk
23
24 define Package/pure-ftpd/Default
25   SUBMENU:=File Transfer
26   SECTION:=net
27   CATEGORY:=Network
28   DEPENDS:=+libelf1
29   TITLE:=Secure FTP made easy!
30   URL:=http://www.pureftpd.org/project/pure-ftpd
31 endef
32
33 define Package/pure-ftpd
34   $(call Package/pure-ftpd/Default)
35   TITLE+= (no TLS)
36   VARIANT:=notls
37 endef
38
39 define Package/pure-ftpd-tls
40   $(call Package/pure-ftpd/Default)
41   TITLE+= (TLS)
42   VARIANT:=tls
43   DEPENDS+=+libopenssl
44 endef
45
46 define Package/pure-ftpd/description
47  Pure-FTPd is a free (BSD), secure, production-quality and standard-conformant
48  FTP server. It doesn't provide useless bells and whistles, but focuses on
49  efficiency and ease of use.
50  It provides simple answers to common needs, plus unique  useful features for
51  personal users as well as hosting providers.
52 endef
53
54 Package/pure-ftpd-tls/description=$(Package/pure-ftpd/description)
55
56 define Package/pure-ftpd/conffiles
57 /etc/config/pure-ftpd
58 endef
59
60 Package/pure-ftpd-tls/conffiles=$(Package/pure-ftpd/conffiles)
61
62 CONFIGURE_ARGS += \
63         --with-everything \
64         --with-virtualchroot \
65         --without-capabilities \
66
67 ifeq ($(BUILD_VARIANT),tls)
68 CONFIGURE_ARGS += \
69         --with-certfile=/etc/ssl/private/pure-ftpd.pem \
70         --with-tls
71 endif
72
73 define Package/pure-ftpd/install
74         $(INSTALL_DIR) $(1)/etc/config
75         $(INSTALL_CONF) ./files/$(PKG_NAME).config $(1)/etc/config/$(PKG_NAME)
76         $(INSTALL_DIR) $(1)/etc/init.d
77         $(INSTALL_BIN) ./files/$(PKG_NAME).init $(1)/etc/init.d/$(PKG_NAME)
78         $(INSTALL_DIR) $(1)/usr/bin
79         $(INSTALL_BIN) \
80                 $(PKG_INSTALL_DIR)/usr/bin/pure-{pw,pwconvert,statsdecode} \
81                 $(1)/usr/bin/
82         $(INSTALL_DIR) $(1)/usr/sbin
83         $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ptracetest $(1)/usr/sbin/
84         $(INSTALL_BIN) \
85                 $(PKG_INSTALL_DIR)/usr/sbin/pure-{authd,ftpd,ftpwho,mrtginfo,quotacheck,uploadscript} \
86                 $(1)/usr/sbin/
87 endef
88
89 Package/pure-ftpd-tls/install=$(Package/pure-ftpd/install)
90
91 $(eval $(call BuildPackage,pure-ftpd))
92 $(eval $(call BuildPackage,pure-ftpd-tls))