add ftpd-topfield (patch by Andreas Thienemann)
authorFelix Fietkau <nbd@openwrt.org>
Mon, 22 Dec 2008 22:22:37 +0000 (22:22 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Mon, 22 Dec 2008 22:22:37 +0000 (22:22 +0000)
SVN-Revision: 13726

multimedia/ftpd-topfield/Makefile [new file with mode: 0644]
multimedia/ftpd-topfield/files/ftpd-topfield.conf [new file with mode: 0644]
multimedia/ftpd-topfield/files/ftpd-topfield.sh [new file with mode: 0644]
multimedia/ftpd-topfield/patches/001-kernel_header_rename.patch [new file with mode: 0644]

diff --git a/multimedia/ftpd-topfield/Makefile b/multimedia/ftpd-topfield/Makefile
new file mode 100644 (file)
index 0000000..726045e
--- /dev/null
@@ -0,0 +1,42 @@
+#$Id: Makefile 5624 2006-11-23 00:29:07Z nbd $
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=ftpd-topfield
+PKG_VERSION:=0.7.4
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=@SF/puppy
+PKG_MD5SUM:=4a29f04fd41aaa5890e2f202d936e270
+PKG_CAT:=zcat
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/ftpd-topfield
+  SECTION:=multimedia
+  CATEGORY:=Multimedia
+  DEPENDS:=@USB_SUPPORT
+  TITLE:=Topfield PVR access via FTP
+  URL:=http://puppy.sourceforge.net/
+endef
+
+define Package/ftpd-topfield/description
+FTP server to export the filesystem of a connected Topfield PVR
+endef
+
+define Build/Configure
+endef
+
+define Package/ftpd-topfield/install
+       $(INSTALL_DIR) $(1)/usr/sbin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/ftpd $(1)/usr/sbin/ftpd-topfield
+       $(INSTALL_DIR) $(1)/etc/init.d
+       $(INSTALL_BIN) ./files/ftpd-topfield.sh $(1)/etc/init.d/ftpd-topfield
+       $(INSTALL_DIR) $(1)/etc/config
+       $(INSTALL_DATA) ./files/ftpd-topfield.conf $(1)/etc/init.d/ftpd-topfield
+endef
+
+$(eval $(call BuildPackage,ftpd-topfield))
diff --git a/multimedia/ftpd-topfield/files/ftpd-topfield.conf b/multimedia/ftpd-topfield/files/ftpd-topfield.conf
new file mode 100644 (file)
index 0000000..ec5ef2e
--- /dev/null
@@ -0,0 +1,4 @@
+config 'ftpd-topfield'
+       option 'port' '21'
+       option 'turbo' 'disabled'
+       option 'elpf' 'disabled'
diff --git a/multimedia/ftpd-topfield/files/ftpd-topfield.sh b/multimedia/ftpd-topfield/files/ftpd-topfield.sh
new file mode 100644 (file)
index 0000000..c359003
--- /dev/null
@@ -0,0 +1,35 @@
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006 OpenWrt.org
+
+START=50
+
+config_cb() {
+       local cfg="$CONFIG_SECTION"
+       local cfgt
+       config_get cfgt "$cfg" TYPE
+
+       case "$cfgt" in
+               ftpd-topfield)
+                       config_get turbo $cfg turbo
+                       config_get port $cfg port
+                       config_get elpf $cfg elpf
+
+                       case "$turbo" in
+                               yes|on|enabled|1) turbo=1;;
+                       esac
+                       case "$elpf" in
+                               yes|on|enabled|1) elpf=1;;
+                       esac
+                       TOPFIELD_ARGS="-D ${turbo:+--turbo }${port:+-p $port }${elpf:+-E}"
+               ;;
+       esac
+}
+                                                                                                                                                                                                            
+start() {
+       config_load ftpd-topfield
+       /usr/sbin/ftpd-topfield $TOPFIELD_ARGS 
+}
+  
+stop() {
+    killall ftpd-topfield
+}
diff --git a/multimedia/ftpd-topfield/patches/001-kernel_header_rename.patch b/multimedia/ftpd-topfield/patches/001-kernel_header_rename.patch
new file mode 100644 (file)
index 0000000..dedfbba
--- /dev/null
@@ -0,0 +1,14 @@
+diff -up ftpd-topfield-0.7.4/libtopfield/usb_io.h.orig ftpd-topfield-0.7.4/libtopfield/usb_io.h
+--- ftpd-topfield-0.7.4/libtopfield/usb_io.h.orig      2008-11-24 10:19:56.000000000 +0100
++++ ftpd-topfield-0.7.4/libtopfield/usb_io.h   2008-11-24 10:22:27.000000000 +0100
+@@ -35,7 +35,9 @@
+ #include <linux/version.h>
+ /* linux/usb_ch9.h wasn't separated out until 2.4.23 */
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,23)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20)
++#include <linux/usb/ch9.h>
++#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,23)
+ #include <linux/usb_ch9.h>
+ #else
+ #include <linux/usb.h>