Makefile 2.3 KB

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