Makefile 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. #
  2. # Copyright (C) 2006-2009 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. include $(INCLUDE_DIR)/kernel.mk
  9. PKG_NAME:=fuse
  10. PKG_VERSION:=2.7.4
  11. PKG_RELEASE:=2
  12. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  13. PKG_SOURCE_URL:=@SF/$(PKG_NAME)
  14. PKG_MD5SUM:=4879f06570d2225667534c37fea04213
  15. include $(INCLUDE_DIR)/package.mk
  16. define Package/fuse/Default
  17. TITLE:=FUSE
  18. URL:=http://fuse.sourceforge.net/
  19. endef
  20. define Package/fuse/Default/description
  21. FUSE (Filesystem in UserSpacE)
  22. endef
  23. define Package/fuse-utils
  24. $(call Package/fuse/Default)
  25. SECTION:=utils
  26. CATEGORY:=Utilities
  27. DEPENDS:=+libfuse
  28. TITLE+= (utilities)
  29. SUBMENU:=Filesystem
  30. endef
  31. define Package/fuse-utils/description
  32. $(call Package/fuse/Default/description)
  33. This package contains the FUSE utility 'fusermount'.
  34. endef
  35. define KernelPackage/fuse
  36. $(call Package/fuse/Default)
  37. SUBMENU:=Filesystems
  38. DEPENDS:=@LINUX_2_6
  39. TITLE+= (kernel module)
  40. KCONFIG:= CONFIG_FUSE_FS
  41. FILES:=$(LINUX_DIR)/fs/fuse/fuse.$(LINUX_KMOD_SUFFIX)
  42. AUTOLOAD:=$(call AutoLoad,80,fuse)
  43. VERSION:=$(LINUX_VERSION)
  44. endef
  45. define KernelPackage/fuse/description
  46. $(call Package/fuse/Default/description)
  47. This package contains the FUSE kernel module.
  48. endef
  49. define Package/libfuse
  50. $(call Package/fuse/Default)
  51. SECTION:=libs
  52. CATEGORY:=Libraries
  53. TITLE+= (library)
  54. DEPENDS:=+LINUX_2_4:kmod-fuse24 +LINUX_2_6:kmod-fuse
  55. SUBMENU:=Filesystem
  56. endef
  57. define Package/libfuse/description
  58. $(call Package/fuse/Default/description)
  59. This package contains the FUSE shared library, needed by other programs.
  60. endef
  61. CONFIGURE_VARS += \
  62. kernsrcver="$(LINUX_VERSION)"
  63. CONFIGURE_ARGS += \
  64. --enable-shared \
  65. --enable-static \
  66. --disable-rpath \
  67. --enable-lib \
  68. --enable-util \
  69. --disable-example \
  70. --disable-auto-modprobe \
  71. --with-kernel="$(LINUX_DIR)" \
  72. --disable-mtab
  73. # Since kernel 2.6.14 the fuse module is officially part of the kernel.
  74. # Generally it is better to use the kernel's module. Because it is patched
  75. # against the DCACHE BUG on arm architectures (currently brcm-2.4, brcm-47xx)
  76. # and from fuse 2.8.0 on it will be removed from the fuse package anyway.
  77. #
  78. CONFIGURE_ARGS += --disable-kernel-module
  79. define Build/Configure
  80. (cd $(PKG_BUILD_DIR); rm -f config.cache; \
  81. touch configure.in ; \
  82. touch aclocal.m4 ; \
  83. touch Makefile.in ; \
  84. touch include/config.h.in ; \
  85. touch configure ; \
  86. )
  87. $(call Build/Configure/Default)
  88. endef
  89. define Build/Compile
  90. $(MAKE) -C $(PKG_BUILD_DIR) \
  91. ARCH="$(LINUX_KARCH)" \
  92. CROSS_COMPILE="$(TARGET_CROSS)" \
  93. DESTDIR="$(PKG_INSTALL_DIR)" \
  94. AM_CFLAGS="$(TARGET_CFLAGS) -DDISABLE_COMPAT=1" \
  95. EXTRA_DIST="" \
  96. all install
  97. endef
  98. define Build/InstallDev
  99. mkdir -p $(1)/usr/include
  100. $(CP) $(PKG_INSTALL_DIR)/usr/include/fuse{,.h} $(1)/usr/include/
  101. mkdir -p $(1)/usr/lib
  102. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfuse.{a,so*} $(1)/usr/lib/
  103. mkdir -p $(1)/usr/lib/pkgconfig
  104. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/fuse.pc $(1)/usr/lib/pkgconfig/
  105. $(SED) 's,-I$$$${includedir}/fuse,,g' $(1)/usr/lib/pkgconfig/fuse.pc
  106. $(SED) 's,-L$$$${libdir},,g' $(1)/usr/lib/pkgconfig/fuse.pc
  107. endef
  108. define Package/fuse-utils/install
  109. $(INSTALL_DIR) $(1)/usr/bin
  110. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/fusermount $(1)/usr/bin/
  111. endef
  112. define Package/libfuse/install
  113. $(INSTALL_DIR) $(1)/usr/lib
  114. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfuse.so.* $(1)/usr/lib/
  115. endef
  116. $(eval $(call BuildPackage,fuse-utils))
  117. $(eval $(call BuildPackage,libfuse))
  118. $(eval $(call KernelPackage,fuse))