Makefile 2.3 KB

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