aa24d7e39b0a00d36b10783071acf768fab71c0b
[openwrt.git] / package / shfs / 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 include $(INCLUDE_DIR)/kernel.mk
11
12 PKG_NAME:=shfs
13 PKG_VERSION:=0.35
14 PKG_RELEASE:=2
15
16 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
17 PKG_SOURCE_URL:=@SF/shfs
18 PKG_MD5SUM:=016f49d71bc32eee2b5d11fc1600cfbe
19
20 include $(INCLUDE_DIR)/package.mk
21
22 define Package/shfs/Default
23   TITLE:=ShFS
24   URL:=http://shfs.sourceforge.net/
25 endef
26
27 define Package/shfs/Default/description
28  ShFS is a simple and easy to use Linux kernel module which allows you to 
29  mount remote filesystems using a plain shell (SSH) connection. When using 
30  ShFS, you can access all remote files just like the local ones, only the 
31  access is governed through the transport security of SSH.
32 endef
33
34 define KernelPackage/shfs
35 $(call Package/shfs/Default)
36   TITLE+= (kernel module)
37   DEPENDS:=@LINUX_2_4
38   FILES:=$(PKG_INSTALL_DIR)/lib/modules/$(LINUX_VERSION)/kernel/fs/shfs/shfs.$(LINUX_KMOD_SUFFIX)
39   SUBMENU:=Filesystems
40   AUTOLOAD:=$(call AutoLoad,40,shfs)
41 endef
42
43 define KernelPackage/shfs/description
44 $(call Package/shfs/Default/description)
45  This package contains the ShFS kernel module.
46 endef
47
48 define Package/shfs-utils
49 $(call Package/shfs/Default)
50   SECTION:=utils
51   CATEGORY:=Utilities
52   DEPENDS+=+kmod-shfs
53   TITLE+= (utilities)
54 endef
55
56 define Package/shfs-utils/description
57 $(call Package/shfs/Default/description)
58  This package contains the ShFS utilities.
59 endef
60
61 define Build/Compile
62         $(MAKE) -C $(PKG_BUILD_DIR) \
63                 ARCH="$(LINUX_KARCH)" \
64                 CROSS_COMPILE="$(TARGET_CROSS)" \
65                 OFLAGS="$(TARGET_CFLAGS)" \
66                 CC="$(TARGET_CC)" \
67                 LINKER="$(TARGET_CC)" \
68                 KERNEL="$(LINUX_VERSION)" \
69                 KERNEL_SOURCES="$(LINUX_DIR)" \
70                 ROOT="$(PKG_INSTALL_DIR)" \
71                 module module-install
72         $(MAKE) -C $(PKG_BUILD_DIR) \
73                 OFLAGS="$(TARGET_CFLAGS)" \
74                 CC="$(TARGET_CC)" \
75                 LINKER="$(TARGET_CC)" \
76                 KERNEL_SOURCES="$(LINUX_DIR)" \
77                 ROOT="$(PKG_INSTALL_DIR)" \
78                 utils utils-install
79 endef
80
81 define Package/shfs-utils/install
82         $(INSTALL_DIR) $(1)/usr/bin
83         $(CP) $(PKG_INSTALL_DIR)/usr/bin/shfs{,u}mount $(1)/usr/bin/
84         $(INSTALL_DIR) $(1)/sbin
85         $(CP) $(PKG_INSTALL_DIR)/sbin/mount.shfs $(1)/sbin/
86 endef
87
88 $(eval $(call KernelPackage,shfs))
89 $(eval $(call BuildPackage,shfs-utils))