aboutsummaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
Diffstat (limited to 'package')
-rw-r--r--package/shfs/Config.in24
-rw-r--r--package/shfs/Makefile52
-rw-r--r--package/shfs/ipkg/kmod-shfs/CONTROL/control8
-rw-r--r--package/shfs/ipkg/rules111
-rw-r--r--package/shfs/ipkg/shfs-utils/CONTROL/control9
-rw-r--r--package/shfs/ipkg/version1
-rw-r--r--package/shfs/patches/101-kmod-build.patch103
-rw-r--r--package/shfs/patches/102-utils-build-fixes.patch40
8 files changed, 348 insertions, 0 deletions
diff --git a/package/shfs/Config.in b/package/shfs/Config.in
new file mode 100644
index 0000000000..a6b50935cc
--- /dev/null
+++ b/package/shfs/Config.in
@@ -0,0 +1,24 @@
+config BR2_PACKAGE_SHFS
+ tristate "shfs (SHell FileSystem kernel module and utilities)"
+ default n
+ help
+ ShFS is a simple and easy to use Linux kernel module which
+ allows you to mount remote filesystems using a plain shell
+ (SSH) connection. When using ShFS, you can access all remote
+ files just like the local ones, only the access is governed
+ through the transport security of SSH.
+
+ ShFS supports some nice features:
+
+ * file cache for access speedup
+ * perl and shell code for the remote (server) side
+ * could preserve uid/gid (root connection)
+ * number of remote host platforms (Linux, Solaris, Cygwin, ...)
+ * Linux kernel 2.4.10+ and 2.6
+ * arbitrary command used for connection (instead of SSH)
+ * persistent connection (reconnect after SSH dies)
+
+
+ http://shfs.sourceforge.net/
+
+
diff --git a/package/shfs/Makefile b/package/shfs/Makefile
new file mode 100644
index 0000000000..b0b02c0657
--- /dev/null
+++ b/package/shfs/Makefile
@@ -0,0 +1,52 @@
+# $Id$
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME := shfs
+PKG_VERSION := 0.35
+PKG_RELEASE := 2
+PKG_MD5SUM := 016f49d71bc32eee2b5d11fc1600cfbe
+
+PKG_SOURCE_SITE := @SF/shfs
+PKG_SOURCE_FILE := $(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_CAT := zcat
+PKG_SOURCE_DIR := $(PKG_NAME)-$(PKG_VERSION)
+PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_SOURCE_DIR)
+
+I_KMOD_SHFS := $(PACKAGE_DIR)/kmod-shfs_$(LINUX_VERSION)+$(PKG_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk
+I_SHFS_UTILS := $(PACKAGE_DIR)/shfs-utils_$(PKG_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk
+
+
+$(DL_DIR)/$(PKG_SOURCE_FILE):
+ mkdir -p $(DL_DIR)
+ $(SCRIPT_DIR)/download.pl $(DL_DIR) $(PKG_SOURCE_FILE) $(PKG_MD5SUM) $(PKG_SOURCE_SITE)
+
+$(PKG_BUILD_DIR)/ipkg/rules: $(DL_DIR)/$(PKG_SOURCE_FILE)
+ mkdir -p $(TOOL_BUILD_DIR)
+ rm -rf $(PKG_BUILD_DIR)
+ $(PKG_SOURCE_CAT) $(DL_DIR)/$(PKG_SOURCE_FILE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
+ $(PATCH) $(PKG_BUILD_DIR) ./patches
+ cp -fpR ./ipkg $(PKG_BUILD_DIR)/
+ chmod a+x $(PKG_BUILD_DIR)/ipkg/rules
+ touch $(PKG_BUILD_DIR)/ipkg/rules
+
+$(I_KMOD_SHFS) $(I_SHFS_UTILS): $(PKG_BUILD_DIR)/ipkg/rules
+ cd $(PKG_BUILD_DIR); \
+ TOPDIR="$(TOPDIR)" IPKG_RULES_INC="$(TOPDIR)/rules.mk" \
+ ./ipkg/rules package
+
+$(IPKG_STATE_DIR)/info/kmod-shfs.list: $(I_KMOD_SHFS)
+ $(IPKG) install $(I_KMOD_SHFS)
+
+$(IPKG_STATE_DIR)/info/shfs-utils.list: $(I_SHFS_UTILS)
+ $(IPKG) install $(I_SHFS_UTILS)
+
+source: $(DL_DIR)/$(PKG_SOURCE_FILE)
+prepare: $(PKG_BUILD_DIR)/ipkg/rules
+compile: $(I_KMOD_SHFS) $(I_SHFS_UTILS)
+install: $(IPKG_STATE_DIR)/info/kmod-shfs.list $(IPKG_STATE_DIR)/info/shfs-utils.list
+
+clean:
+ rm -rf $(PKG_BUILD_DIR)
+ rm -f $(I_KMOD_SHFS) $(I_SHFS_UTILS)
+
diff --git a/package/shfs/ipkg/kmod-shfs/CONTROL/control b/package/shfs/ipkg/kmod-shfs/CONTROL/control
new file mode 100644
index 0000000000..b7ce612933
--- /dev/null
+++ b/package/shfs/ipkg/kmod-shfs/CONTROL/control
@@ -0,0 +1,8 @@
+Package: kmod-shfs
+Priority: optional
+Section: net
+Version: [TBDL]
+Architecture: [TBDL]
+Maintainer: Nico <nthill@free.fr>
+Source: http://nthill.free.fr/openwrt/sources/shfs/
+Description: SHell FileSystem Linux kernel module
diff --git a/package/shfs/ipkg/rules b/package/shfs/ipkg/rules
new file mode 100644
index 0000000000..2297c98880
--- /dev/null
+++ b/package/shfs/ipkg/rules
@@ -0,0 +1,111 @@
+#!/usr/bin/make -f
+
+ifneq ($(strip ${IPKG_RULES_INC}),)
+ include $(IPKG_RULES_INC)
+endif
+
+##
+
+PKG_VERSION := $(shell cat ./ipkg/version)
+CURRENT_DIR := $(shell pwd)
+INSTALL_DIR ?= $(CURRENT_DIR)/ipkg-install
+
+unexport INSTALL_DIR
+
+I_KMOD_SHFS := ipkg/kmod-shfs
+I_SHFS_UTILS := ipkg/shfs-utils
+
+BUILD_DEPS = \
+
+##
+
+all: package
+
+
+.stamp-configured: $(BUILD_DEPS)
+
+ touch .stamp-configured
+
+
+.stamp-built: .stamp-configured
+
+ $(MAKE) \
+ OFLAGS="$(TARGET_CFLAGS)" \
+ CC="$(TARGET_CC)" \
+ LINKER="$(TARGET_CC)" \
+ KERNEL="$(LINUX_VERSION)" \
+ KERNEL_SOURCES="$(LINUX_DIR)" \
+ all
+
+ touch .stamp-built
+
+
+$(INSTALL_DIR)/lib/modules/$(LINUX_VERSION)/shfs.o: .stamp-built
+
+ mkdir -p $(INSTALL_DIR)
+
+ $(MAKE) \
+ ROOT="$(INSTALL_DIR)" \
+ KERNEL="$(LINUX_VERSION)" \
+ KERNEL_SOURCES="$(LINUX_DIR)" \
+ install
+
+
+configure: .stamp-configured
+
+
+build: .stamp-built
+
+
+install: $(INSTALL_DIR)/lib/modules/$(LINUX_VERSION)/shfs.o
+
+
+package: $(INSTALL_DIR)/lib/modules/$(LINUX_VERSION)/shfs.o
+
+ mkdir -p $(I_KMOD_SHFS)/lib/modules/$(LINUX_VERSION)
+ cp -fpR $(INSTALL_DIR)/lib/modules/$(LINUX_VERSION)/kernel/fs/shfs/shfs.o \
+ $(I_KMOD_SHFS)/lib/modules/$(LINUX_VERSION)/
+ $(TARGET_CROSS)strip --remove-section=.comment --remove-section=.note \
+ $(I_KMOD_SHFS)/lib/modules/$(LINUX_VERSION)/*.o
+
+ mkdir -p $(I_SHFS_UTILS)/usr/sbin
+ cp -fpR $(INSTALL_DIR)/usr/sbin/shfs{,u}mount $(I_SHFS_UTILS)/usr/sbin/
+ cp -fpR $(INSTALL_DIR)/usr/sbin/mount.shfs $(I_SHFS_UTILS)/usr/sbin/
+ $(STRIP) $(I_SHFS_UTILS)/usr/sbin/shfs*
+
+ chmod 0755 ipkg/*/CONTROL/
+ chmod 0644 ipkg/*/CONTROL/control
+
+ perl -pi -e "s/^Arch.*:.*/Architecture: $(ARCH)/g" ipkg/*/CONTROL/control
+ifneq ($(strip $(PKG_VERSION)),)
+ perl -pi -e "s/^Vers.*:.*/Version: $(PKG_VERSION)/g" ipkg/*/CONTROL/control
+ perl -pi -e "s/^Vers.*:.*/Version: $(LINUX_VERSION)+$(PKG_VERSION)/g" $(I_KMOD_SHFS)/CONTROL/control
+endif
+
+ $(IPKG_BUILD) $(I_KMOD_SHFS) $(IPKG_TARGET_DIR)
+ $(IPKG_BUILD) $(I_SHFS_UTILS) $(IPKG_TARGET_DIR)
+
+
+clean:
+
+ -$(MAKE) \
+ ROOT="$(INSTALL_DIR)" \
+ KERNEL="$(LINUX_VERSION)" \
+ KERNEL_SOURCES="$(LINUX_DIR)" \
+ uninstall clean
+
+ rm -rf .stamp-* \
+ $(INSTALL_DIR) \
+ $(I_KMOD_SHFS)/lib \
+ $(I_SHFS_UTILS)/usr \
+
+
+control:
+
+ @cat $(I_KMOD_SHFS)/CONTROL/control
+ @echo
+ @cat $(I_SHFS_UTILS)/CONTROL/control
+ @echo
+
+
+.PHONY: configure build install package clean control
diff --git a/package/shfs/ipkg/shfs-utils/CONTROL/control b/package/shfs/ipkg/shfs-utils/CONTROL/control
new file mode 100644
index 0000000000..af3b897f2d
--- /dev/null
+++ b/package/shfs/ipkg/shfs-utils/CONTROL/control
@@ -0,0 +1,9 @@
+Package: shfs-utils
+Priority: optional
+Section: net
+Version: [TBDL]
+Architecture: [TBDL]
+Maintainer: Nico <nthill@free.fr>
+Source: http://nthill.free.fr/openwrt/sources/shfs/
+Description: SHell FileSystem Linux mount/umount utilities
+Depends: kmod-shfs
diff --git a/package/shfs/ipkg/version b/package/shfs/ipkg/version
new file mode 100644
index 0000000000..3a36fd6788
--- /dev/null
+++ b/package/shfs/ipkg/version
@@ -0,0 +1 @@
+0.35-2
diff --git a/package/shfs/patches/101-kmod-build.patch b/package/shfs/patches/101-kmod-build.patch
new file mode 100644
index 0000000000..635900472d
--- /dev/null
+++ b/package/shfs/patches/101-kmod-build.patch
@@ -0,0 +1,103 @@
+--- shfs-0.35-orig/shfs/Linux-2.4/Makefile 2004-06-01 15:16:19.000000000 +0200
++++ shfs-0.35-2/shfs/Linux-2.4/Makefile 2005-04-09 02:34:35.000000000 +0200
+@@ -1,3 +1,17 @@
++#
++# the original Makefile was trashed and replaced by this one
++# The main reason is that loadable modules should be built with
++# the same compile flags the kernel was built with, so we'd better
++# let the kernel tree build the module for us, like that :
++#
++# make -C $(KERNEL_DIR) SUBDIRS="$(shell pwd)" modules
++# make -C $(KERNEL_DIR) SUBDIRS="$(shell pwd)" modules_install
++#
++#
++# $(TOPDIR)/lib/string.o is needed at link time because the memchr function
++# is not exported on mips (insmod: unresolved symbol memchr)
++#
++
+ ifndef KERNEL
+ KERNEL=$(shell uname -r)
+ endif
+@@ -10,67 +24,30 @@
+ KERNEL_SOURCES=${MODULESDIR}/build
+ endif
+
+-ifeq (${MODVERSIONS},detect)
+- ifeq ($(shell test -e ${KERNEL_SOURCES}/include/linux/modversions.h; echo $$?),0)
+- MODVERSIONS=yes
+- endif
+-endif
+-
+-ifeq (${MODVERSIONS},yes)
+-MVER=-DMODVERSIONS -DEXPORT_SYMTAB
+-endif
+-
+-LINVER=linux-${KERNEL}
+-
+-ALL_TARGETS := shfs.o
+-
+-SEARCHDIRS := -I- -I. -I${KERNEL_SOURCES}/include #-I/usr/src/linux/include/
++all: all-y
+
+-CC := gcc
+-CFLAGS = -O2 -fomit-frame-pointer -fno-strict-aliasing -pipe -Wall ${SEARCHDIRS} -DMODULE ${MVER} -D__KERNEL__ -DLINUX
+-LINKER := ld
+-LDFLAGS = -r
+-LOADLIBES :=
++O_TARGET := shfs.o
+
+-all: ${ALL_TARGETS}
++shfs-objs := dcache.o dir.o fcache.o file.o inode.o ioctl.o proc.o shell.o symlink.o
+
+-%.o: %.c $(wildcard *.h)
+- ${CC} ${CFLAGS} -c $< -o $@
++obj-y := $(shfs-objs)
++obj-m := $(O_TARGET)
+
+-shfs.o: dcache.o dir.o fcache.o file.o inode.o ioctl.o proc.o shell.o symlink.o
+- ${LINKER} ${LDFLAGS} -o $@ ${filter-out %.a %.so, $^} ${LOADLIBES}
+-
+-tidy:
+- ${RM} core dcache.o dir.o fcache.o file.o inode.o ioctl.o proc.o shell.o symlink.o
+-
+-clean: tidy patch-clean
+- ${RM} shfs.o
++-include $(TOPDIR)/Rules.make
+
++all-y:
++ make -C ${KERNEL_SOURCES} TOPDIR="${KERNEL_SOURCES}" SUBDIRS="$(shell pwd)" modules
++
+ install: shfs.o
+ rm -f ${MODULESDIR}/kernel/fs/shfs/shfs.o
+ install -m644 -b -D shfs.o ${MODULESDIR}/kernel/fs/shfs/shfs.o
+- if [ -x /sbin/depmod -a "${ROOT}" = "/" ]; then /sbin/depmod -aq; fi
+
+ uninstall:
+ rm -rf ${MODULESDIR}/kernel/fs/shfs
+- if [ -x /sbin/depmod -a "${ROOT}" = "/" ]; then /sbin/depmod -aq; fi
+
+-patch:
+- rm -rf ${LINVER} ${LINVER}.orig; mkdir ${LINVER};
+- for i in Documentation fs/shfs include/linux; do \
+- mkdir -p ${LINVER}/$$i; \
+- done
+- cp ${KERNEL_SOURCES}/Documentation/Configure.help ${LINVER}/Documentation
+- cp ${KERNEL_SOURCES}/fs/{Makefile,Config.in} ${LINVER}/fs
+- cp -r ${LINVER} ${LINVER}.orig
+- cp ../../Changelog *.c shfs_debug.h proc.h ${LINVER}/fs/shfs/
+- cp shfs.h shfs_fs* ${LINVER}/include/linux/
+- (cd ${LINVER}; patch -p1 <../kernel-config.diff)
+- find . -type f -name "*.orig" -print | xargs rm -f
+- diff -urN ${LINVER}.orig ${LINVER} >${LINVER}.diff; true
+-
+-patch-clean:
+- rm -rf ${LINVER} ${LINVER}.orig;
+- rm -f ${LINVER}.diff
+-
+-.PHONY : all tidy clean install uninstall patch patch-clean
++clean:
++ rm -f core *.o *.a *.s
++
++shfs.o: $(shfs-objs)
++ $(LD) -r -o $@ $(shfs-objs) $(TOPDIR)/lib/string.o
++
diff --git a/package/shfs/patches/102-utils-build-fixes.patch b/package/shfs/patches/102-utils-build-fixes.patch
new file mode 100644
index 0000000000..affce43570
--- /dev/null
+++ b/package/shfs/patches/102-utils-build-fixes.patch
@@ -0,0 +1,40 @@
+--- shfs-0.35-orig/shfsmount/Makefile 2004-06-01 15:16:19.000000000 +0200
++++ shfs-0.35-2/shfsmount/Makefile 2005-04-09 01:27:22.000000000 +0200
+@@ -2,15 +2,16 @@
+ SHFS_VERSION=unknown
+ endif
+
+-SHFSMOUNT := /usr/bin/shfsmount
+-SHFSUMOUNT := /usr/bin/shfsumount
++SHFSMOUNT := /usr/sbin/shfsmount
++SHFSUMOUNT := /usr/sbin/shfsumount
+
+ ALL_TARGETS := shfsmount shfsumount
+
+ SEARCHDIRS := -I- -I. -I../shfs/Linux-2.4/
+
+ CC := gcc
+-CFLAGS = -g -Wall ${SEARCHDIRS} -DSHFS_VERSION=\"${SHFS_VERSION}\"
++OFLAGS = -g
++CFLAGS = $(OFLAGS) -Wall ${SEARCHDIRS} -DSHFS_VERSION=\"${SHFS_VERSION}\"
+
+ LINKER := gcc
+ LDFLAGS =
+@@ -40,12 +41,12 @@
+
+
+ install: shfsmount shfsumount
+- install -m755 -b -D shfsmount ${ROOT}${SHFSMOUNT}
+- install -m755 -b -D shfsumount ${ROOT}${SHFSUMOUNT}
+- if [ ! -d ${ROOT}/sbin ]; then mkdir ${ROOT}/sbin; fi
+- ln -fs ${SHFSMOUNT} ${ROOT}/sbin/mount.shfs
++ install -m755 -D shfsmount ${ROOT}${SHFSMOUNT}
++ install -m755 -D shfsumount ${ROOT}${SHFSUMOUNT}
++ if [ ! -d ${ROOT}/usr/sbin ]; then mkdir ${ROOT}/usr/sbin; fi
++ ln -fs ${SHFSMOUNT} ${ROOT}/usr/sbin/mount.shfs
+
+ uninstall:
+- rm -f ${ROOT}${SHFSMOUNT} ${ROOT}${SHFSUMOUNT} ${ROOT}/sbin/mount.shfs
++ rm -f ${ROOT}${SHFSMOUNT} ${ROOT}${SHFSUMOUNT} ${ROOT}/usr/sbin/mount.shfs
+
+ .PHONY : all tidy clean install uninstall