finally move buildroot-ng to trunk
[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 PKG_CAT:=zcat
20
21 PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
22 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
23
24 include $(INCLUDE_DIR)/package.mk
25
26 define Package/shfs/Default
27   TITLE:=ShFS
28   DESCRIPTION:=\
29         ShFS is a simple and easy to use Linux kernel module which allows you to \\\
30         mount remote filesystems using a plain shell (SSH) connection. When using \\\
31         ShFS, you can access all remote files just like the local ones, only the \\\
32         access is governed through the transport security of SSH.
33   URL:=http://shfs.sourceforge.net/
34 endef
35
36 define Package/kmod-shfs
37   $(call Package/shfs/Default)
38   SECTION:=kernel
39   CATEGORY:=Kernel drivers
40   DEPENDS:=
41   TITLE+= (kernel module)
42   DESCRIPTION+=\\\
43         \\\
44         This package contains the ShFS kernel module.
45   VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE)
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   DESCRIPTION+=\\\
55         \\\
56         This package contains the ShFS utilities.
57 endef
58
59 define Build/Compile
60         $(MAKE) -C $(PKG_BUILD_DIR) \
61                 ARCH="$(LINUX_KARCH)" \
62                 CROSS_COMPILE="$(TARGET_CROSS)" \
63                 OFLAGS="$(TARGET_CFLAGS)" \
64                 CC="$(TARGET_CC)" \
65                 LINKER="$(TARGET_CC)" \
66                 KERNEL="$(LINUX_VERSION)" \
67                 KERNEL_SOURCES="$(LINUX_DIR)" \
68                 ROOT="$(PKG_INSTALL_DIR)" \
69                 module module-install
70         $(MAKE) -C $(PKG_BUILD_DIR) \
71                 OFLAGS="$(TARGET_CFLAGS)" \
72                 CC="$(TARGET_CC)" \
73                 LINKER="$(TARGET_CC)" \
74                 KERNEL_SOURCES="$(LINUX_DIR)" \
75                 ROOT="$(PKG_INSTALL_DIR)" \
76                 utils utils-install
77 endef
78
79 define Package/kmod-shfs/install
80         install -m0755 -d $(1)/lib/modules/$(LINUX_VERSION)
81         $(CP) $(PKG_INSTALL_DIR)/lib/modules/$(LINUX_VERSION)/kernel/fs/shfs/shfs.$(LINUX_KMOD_SUFFIX) \
82                 $(1)/lib/modules/$(LINUX_VERSION)/
83 endef
84
85 define Package/shfs-utils/install
86         install -m0755 -d $(1)/usr/bin
87         $(CP) $(PKG_INSTALL_DIR)/usr/bin/shfs{,u}mount $(1)/usr/bin/
88         install -m0755 -d $(1)/sbin
89         $(CP) $(PKG_INSTALL_DIR)/sbin/mount.shfs $(1)/sbin/
90 endef
91
92 $(eval $(call BuildPackage,kmod-shfs))
93 $(eval $(call BuildPackage,shfs-utils))