pwrtray: Compilefix on avr32
[openwrt/svn-archive/archive.git] / net / pure-ftpd / Makefile
1 #
2 # Copyright (C) 2007-2010 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.29
12 PKG_RELEASE:=2
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:=12a074824b509f9e7684fab333ed6915
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:=FTP
26 SECTION:=net
27 CATEGORY:=Network
28 DEPENDS:=+libelf
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 endef
44
45 define Package/pure-ftpd/description
46 Pure-FTPd is a free (BSD), secure, production-quality and standard-conformant
47 FTP server. It doesn't provide useless bells and whistles, but focuses on
48 efficiency and ease of use.
49 It provides simple answers to common needs, plus unique useful features for
50 personal users as well as hosting providers.
51 endef
52
53 Package/pure-ftpd-tls/description=$(Package/pure-ftpd/description)
54
55 define Package/pure-ftpd/conffiles
56 /etc/config/pure-ftpd
57 endef
58
59 Package/pure-ftpd-tls/conffiles=$(Package/pure-ftpd/conffiles)
60
61 CONFIGURE_ARGS += \
62 --with-everything \
63 --with-virtualchroot
64
65 ifeq ($(BUILD_VARIANT),tls)
66 CONFIGURE_ARGS += \
67 --with-certfile=/etc/ssl/private/pure-ftpd.pem \
68 --with-tls
69 endif
70
71 define Package/pure-ftpd/install
72 $(INSTALL_DIR) $(1)/etc/config
73 $(INSTALL_CONF) ./files/$(PKG_NAME).config $(1)/etc/config/$(PKG_NAME)
74 $(INSTALL_DIR) $(1)/etc/init.d
75 $(INSTALL_BIN) ./files/$(PKG_NAME).init $(1)/etc/init.d/$(PKG_NAME)
76 $(INSTALL_DIR) $(1)/usr/bin
77 $(INSTALL_BIN) \
78 $(PKG_INSTALL_DIR)/usr/bin/pure-{pw,pwconvert,statsdecode} \
79 $(1)/usr/bin/
80 $(INSTALL_DIR) $(1)/usr/sbin
81 $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ptracetest $(1)/usr/sbin/
82 $(INSTALL_BIN) \
83 $(PKG_INSTALL_DIR)/usr/sbin/pure-{authd,ftpd,ftpwho,mrtginfo,quotacheck,uploadscript} \
84 $(1)/usr/sbin/
85 endef
86
87 Package/pure-ftpd-tls/install=$(Package/pure-ftpd/install)
88
89 $(eval $(call BuildPackage,pure-ftpd))
90 $(eval $(call BuildPackage,pure-ftpd-tls))