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