Changeset 9325


Ignore:
Timestamp:
2007-10-15T13:37:54+02:00 (10 years ago)
Author:
olli
Message:

pure-ftpd:

  • Migrate configuration to UCI
  • Cleanup Makefile
  • Refresh patch
Location:
packages/net/pure-ftpd
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • packages/net/pure-ftpd/Makefile

    r9304 r9325  
    11# 
    2 # Copyright (C) 2006 OpenWrt.org 
     2# Copyright (C) 2007 OpenWrt.org 
    33# 
    44# This is free software, licensed under the GNU General Public License v2. 
     
    1111PKG_VERSION:=1.0.21 
    1212PKG_RELEASE:=1 
     13 
     14PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 
     15PKG_SOURCE_URL:=http://download.pureftpd.org/pub/pure-ftpd/releases/ 
    1316PKG_MD5SUM:=ca8a8dbec0cd9c8ea92fc4c37ea9c410 
    14  
    15 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) 
    16 PKG_SOURCE_URL:=http://download.pureftpd.org/pub/pure-ftpd/releases/ 
    17 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 
    18  
    19 PKG_CAT:=bzcat 
    20  
    21 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install 
    2217 
    2318include $(INCLUDE_DIR)/package.mk 
     
    3328 
    3429define Package/pure-ftpd/description 
    35         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 efficiency and ease of use.\      It provides simple answers to common needs, plus unique useful features for personal users\     as well as hosting providers. 
     30 Pure-FTPd is a free (BSD), secure, production-quality and standard-conformant 
     31 FTP server. It doesn't provide useless bells and whistles, but focuses on 
     32 efficiency and ease of use. 
     33 It provides simple answers to common needs, plus unique  useful features for 
     34 personal users as well as hosting providers. 
    3635endef 
    3736 
    38 define Build/Configure 
    39         $(call Build/Configure/Default,--with-everything) 
    40 endef 
     37CONFIGURE_ARGS += \ 
     38        --with-everything \ 
    4139 
    4240define Package/pure-ftpd/install 
    43         $(INSTALL_DIR) $(1)/etc/init.d $(1)/usr/sbin 
    44         install -m0755 ./files/$(PKG_NAME).init $(1)/etc/init.d/$(PKG_NAME) 
    45         $(CP) $(PKG_BUILD_DIR)/src/pure-{ftpd,pw,ftpwho,mrtginfo,pwconvert,quotacheck,statsdecode,uploadscript,authd} $(1)/usr/sbin/ 
    46         $(CP) $(PKG_BUILD_DIR)/src/ptracetest $(1)/usr/sbin/ 
     41        $(INSTALL_DIR) $(1)/etc/config $(1)/etc/init.d $(1)/usr/sbin 
     42        $(INSTALL_DATA) ./files/$(PKG_NAME).config $(1)/etc/config/$(PKG_NAME) 
     43        $(INSTALL_BIN) ./files/$(PKG_NAME).init $(1)/etc/init.d/$(PKG_NAME) 
     44        $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ptracetest $(1)/usr/sbin 
     45        $(INSTALL_BIN) $(foreach i,ftpd pw ftpwho mrtginfo pwconvert quotacheck statsdecode uploadscript authd, \ 
     46                $(PKG_BUILD_DIR)/src/pure-$(i)) $(1)/usr/sbin 
    4747endef 
    4848 
  • packages/net/pure-ftpd/files/pure-ftpd.init

    r7164 r9325  
    33START=50 
    44 
    5 BIN=pure-ftpd 
    6 DEFAULT=/etc/default/$BIN 
    7 LOG_D=/var/log/$BIN 
    8 RUN_D=/var/run 
    9 PID_F=$RUN_D/$BIN.pid 
    10 OPTIONS="-A -B -c 10 -C 4 -E -lunix -U 133:022 -g $PID_F -y 3:4" 
    11 [ -f $DEFAULT ] && . $DEFAULT 
     5SSD=start-stop-daemon 
     6PIDF=/var/run/pure-ftpd.pid 
     7PROG=/usr/sbin/pure-ftpd 
     8 
     9append_bool() { 
     10        local section="$1" 
     11        local option="$2" 
     12        local value="$3" 
     13        local _val 
     14        config_get_bool _val "$section" "$option" '0' 
     15        [ "$_val" -gt 0 ] && append args "$3" 
     16} 
     17 
     18append_string() { 
     19        local section="$1" 
     20        local option="$2" 
     21        local value="$3" 
     22        local _val 
     23        config_get _val "$section" "$option" 
     24        [ -n "$_val" ] && append args "$3 $_val" 
     25} 
     26 
     27start_service() { 
     28        local section="$1" 
     29        args="" 
     30 
     31        append_string "$section" port "-S" 
     32        append_bool "$section" noanonymous "-E" 
     33        append_bool "$section" chrooteveryone "-A" 
     34        append_string "$section" maxclientsperip "-c" 
     35        append_string "$section" maxclientsnumber "-C" 
     36        append_string "$section" peruserlimits "-y" 
     37        append_string "$section" umask "-U" 
     38        append_string "$section" authentication "-l" 
     39        config_get_bool "enabled" "$section" "enabled" '1' 
     40        [ "$enabled" -gt 0 ] && $SSD -S -p $PIDF -q -x $PROG -- -g $PIDF -B $args 
     41} 
     42 
     43stop_service() { 
     44        killall pure-ftpd 2>&1 > /dev/null 
     45 
     46        # FIXME: Fix Busybox start-stop-daemon to work with multiple PIDs 
     47        # $SSD -K -p $PIDF -q 
     48} 
    1249 
    1350start() { 
    14         mkdir -p $LOG_D 
    15         mkdir -p $RUN_D 
    16         $BIN $OPTIONS 
     51        config_load "pure-ftpd" 
     52        config_foreach start_service "pure-ftpd" 
    1753} 
    1854 
    1955stop() { 
    20         [ -f $PID_F ] && kill $(cat $PID_F) 
     56        config_load "pure-ftpd" 
     57        config_foreach stop_service "pure-ftpd" 
    2158} 
  • packages/net/pure-ftpd/patches/001-cross_compile.patch

    r6526 r9325  
    1 --- pure-ftpd-1.0.21/configure  2006-02-19 15:33:05.000000000 +0100 
    2 +++ pure-ftpd-1.0.21.new/configure      2006-12-11 16:07:29.000000000 +0100 
     1Index: pure-ftpd-1.0.21/configure 
     2=================================================================== 
     3--- pure-ftpd-1.0.21.orig/configure     2007-10-14 22:03:46.000000000 +0200 
     4+++ pure-ftpd-1.0.21/configure  2007-10-14 22:03:46.000000000 +0200 
    35@@ -9273,7 +9273,7 @@ 
    46   if test "$cross_compiling" = yes; then 
Note: See TracChangeset for help on using the changeset viewer.