replace lots of manual install commands with INSTALL_* variables
[packages.git] / net / vsftpd / Makefile
1
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=vsftpd
12 PKG_VERSION:=2.0.4
13 PKG_RELEASE:=1
14
15 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
16 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
17 PKG_SOURCE_URL:=ftp://vsftpd.beasts.org/users/cevans/
18 PKG_MD5SUM:=c0bf8c7b8e15ab15827172786fc56115
19 PKG_CAT:=zcat
20
21 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/vsftpd
26   SECTION:=net
27   CATEGORY:=Network
28   TITLE:=A fast and secure FTP server
29   URL:=http://vsftpd.beasts.org/
30 endef
31
32 define Package/vsftpd/conffiles
33 /etc/vsftpd.conf
34 endef
35
36 define Build/Configure
37 endef
38
39 define Build/Compile
40         rm -rf $(PKG_INSTALL_DIR)
41         mkdir -p $(PKG_INSTALL_DIR)
42         $(MAKE) -C $(PKG_BUILD_DIR) \
43                 $(TARGET_CONFIGURE_OPTS) \
44                 CFLAGS="$(TARGET_CFLAGS)" \
45                 DESTDIR="$(PKG_INSTALL_DIR)" \
46                 vsftpd install
47 endef
48
49 define Package/vsftpd/install
50         $(INSTALL_DIR) $(1)/usr/sbin
51         $(CP) $(PKG_INSTALL_DIR)/usr/sbin/vsftpd $(1)/usr/sbin/
52         $(INSTALL_DIR) $(1)/etc
53         $(INSTALL_DATA) ./files/vsftpd.conf $(1)/etc/vsftpd.conf
54         $(INSTALL_DIR) $(1)/etc/init.d
55         $(INSTALL_BIN) ./files/vsftpd.init $(1)/etc/init.d/vsftpd
56 endef
57
58 $(eval $(call BuildPackage,vsftpd))