aboutsummaryrefslogtreecommitdiffstats
path: root/package/proftpd
diff options
context:
space:
mode:
author"Steven J. Hill" <sjhill@realitydiluted.com>2007-01-14 01:48:49 +0000
committer"Steven J. Hill" <sjhill@realitydiluted.com>2007-01-14 01:48:49 +0000
commit5d173ec4122b89857e6d93fc337311b1f87631c9 (patch)
treeb4e193384077baa5fbf1033358bb1b6806d824a7 /package/proftpd
parent72f3ebce22536705f9eb90c6b570a9e19be4eb43 (diff)
downloadbuildroot-novena-5d173ec4122b89857e6d93fc337311b1f87631c9.tar.gz
buildroot-novena-5d173ec4122b89857e6d93fc337311b1f87631c9.zip
Add ProFTPD package with working init script.
Diffstat (limited to 'package/proftpd')
-rw-r--r--package/proftpd/Config.in6
-rwxr-xr-xpackage/proftpd/init-proftpd47
-rw-r--r--package/proftpd/proftpd.mk79
3 files changed, 132 insertions, 0 deletions
diff --git a/package/proftpd/Config.in b/package/proftpd/Config.in
new file mode 100644
index 000000000..0c3ed1231
--- /dev/null
+++ b/package/proftpd/Config.in
@@ -0,0 +1,6 @@
+config BR2_PACKAGE_PROFTPD
+ bool "proftpd"
+ default n
+ help
+ ProFTPD, a highly configurable FTP server.
+
diff --git a/package/proftpd/init-proftpd b/package/proftpd/init-proftpd
new file mode 100755
index 000000000..550e0a6ad
--- /dev/null
+++ b/package/proftpd/init-proftpd
@@ -0,0 +1,47 @@
+#!/bin/sh
+
+DAEMON=/usr/sbin/proftpd
+trap "" 1
+trap "" 15
+test -f $DAEMON || exit 0
+[ ! -d /var/run/proftpd ] && mkdir /var/run/proftpd
+[ ! -f /var/log/wtmp ] && touch /var/log/wtmp
+
+start() {
+ echo -n "Starting ProFTPD: "
+ $DAEMON
+ if [ $? != 0 ]; then
+ echo "FAILED"
+ exit 1
+ else
+ echo "done"
+ fi
+}
+
+stop() {
+ echo -n "Stopping ProFTPD: "
+ killall proftpd
+ echo "done"
+}
+
+case "$1" in
+ start)
+ start
+ ;;
+
+ stop)
+ stop
+ ;;
+
+ restart)
+ stop
+ start
+ ;;
+
+ *)
+ echo "Usage: /etc/init.d/S50proftpd {start|stop|restart}"
+ exit 1
+ ;;
+esac
+
+exit 0
diff --git a/package/proftpd/proftpd.mk b/package/proftpd/proftpd.mk
new file mode 100644
index 000000000..d2e7fada7
--- /dev/null
+++ b/package/proftpd/proftpd.mk
@@ -0,0 +1,79 @@
+#############################################################
+#
+# proftpd
+#
+#############################################################
+PROFTPD_VER:=1.3.0a
+PROFTPD_SOURCE:=proftpd-$(PROFTPD_VER).tar.bz2
+PROFTPD_SITE:=ftp://ftp.proftpd.org/distrib/source/
+PROFTPD_DIR:=$(BUILD_DIR)/proftpd-$(PROFTPD_VER)
+PROFTPD_CAT:=bzcat
+PROFTPD_BINARY:=proftpd
+PROFTPD_TARGET_BINARY:=usr/sbin/proftpd
+
+$(DL_DIR)/$(PROFTPD_SOURCE):
+ $(WGET) -P $(DL_DIR) $(PROFTPD_SITE)/$(PROFTPD_SOURCE)
+
+proftpd-source: $(DL_DIR)/$(PROFTPD_SOURCE)
+
+$(PROFTPD_DIR)/.unpacked: $(DL_DIR)/$(PROFTPD_SOURCE)
+ $(PROFTPD_CAT) $(DL_DIR)/$(PROFTPD_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
+ touch $(PROFTPD_DIR)/.unpacked
+
+$(PROFTPD_DIR)/.configured: $(PROFTPD_DIR)/.unpacked
+ (cd $(PROFTPD_DIR); rm -rf config.cache; \
+ $(TARGET_CONFIGURE_OPTS) \
+ CFLAGS="$(TARGET_CFLAGS)" \
+ LDFLAGS="$(TARGET_LDFLAGS)" \
+ ac_cv_func_setpgrp_void=yes \
+ ac_cv_func_setgrent_void=yes \
+ ./configure \
+ --target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_TARGET_NAME) \
+ --build=$(GNU_HOST_NAME) \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --localstatedir=/var/run \
+ --disable-static \
+ --disable-curses \
+ --disable-ncurses \
+ --disable-facl \
+ --disable-dso \
+ --enable-shadow \
+ $(DISABLE_LARGEFILE) \
+ --with-gnu-ld \
+ );
+ touch $(PROFTPD_DIR)/.configured
+
+$(PROFTPD_DIR)/$(PROFTPD_BINARY): $(PROFTPD_DIR)/.configured
+ $(MAKE) CC="$(HOSTCC)" CFLAGS="" LDFLAGS="" \
+ -C $(PROFTPD_DIR)/lib/libcap _makenames
+ $(MAKE) -C $(PROFTPD_DIR)
+
+$(TARGET_DIR)/$(PROFTPD_TARGET_BINARY): $(PROFTPD_DIR)/$(PROFTPD_BINARY)
+ cp -a $(PROFTPD_DIR)/$(PROFTPD_BINARY) \
+ $(TARGET_DIR)/$(PROFTPD_TARGET_BINARY)
+ @if [ ! -f $(TARGET_DIR)/etc/proftpd.conf ] ; then \
+ $(INSTALL) -m 0644 -D $(PROFTPD_DIR)/sample-configurations/basic.conf $(TARGET_DIR)/etc/proftpd.conf; \
+ fi;
+ $(INSTALL) -m 0755 -D package/proftpd/init-proftpd $(TARGET_DIR)/etc/init.d/S50proftpd
+
+proftpd: uclibc $(TARGET_DIR)/$(PROFTPD_TARGET_BINARY)
+
+proftpd-clean:
+ rm -f $(TARGET_DIR)/$(PROFTPD_TARGET_BINARY)
+ rm -f $(TARGET_DIR)/etc/init.d/S50proftpd
+ rm -f $(TARGET_DIR)/etc/proftpd.conf
+ -$(MAKE) -C $(PROFTPD_DIR) clean
+
+proftpd-dirclean:
+ rm -rf $(PROFTPD_DIR)
+
+#############################################################
+#
+# Toplevel Makefile options
+#
+#############################################################
+ifeq ($(strip $(BR2_PACKAGE_PROFTPD)),y)
+TARGETS+=proftpd
+endif