2 # Copyright (C) 2006 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
9 include $(TOPDIR)/rules.mk
10 include $(INCLUDE_DIR)/kernel.mk
16 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
17 PKG_SOURCE_URL:=@SF/$(PKG_NAME)
18 PKG_MD5SUM:=98563fc7b265b7479a3178181cbcf59a
20 include $(INCLUDE_DIR)/package.mk
22 define Package/fuse/Default
25 URL:=http://fuse.sourceforge.net/
28 define Package/fuse/Default/description
29 FUSE (Filesystem in UserSpacE)
32 define Package/fuse-utils
33 $(call Package/fuse/Default)
36 DEPENDS:=+libfuse +kmod-fuse @LINUX_2_6
41 define Package/fuse-utils/description
42 $(call Package/fuse/Default/description)
43 This package contains the FUSE utilities.
46 define KernelPackage/fuse
47 $(call Package/fuse/Default)
50 TITLE+= (kernel module)
51 FILES:=$(PKG_INSTALL_DIR)/lib/modules/$(LINUX_VERSION)/kernel/fs/fuse/fuse.$(LINUX_KMOD_SUFFIX)
52 AUTOLOAD:=$(call AutoLoad,80,fuse)
55 define Kernel/Package/fuse/description
56 $(call Package/fuse/Default/description)
57 This package contains the FUSE kernel module.
60 define Package/libfuse
61 $(call Package/fuse/Default)
69 define Package/libfuse/description
70 $(call Package/fuse/Default/description)
71 This package contains the FUSE shared library, needed by other programs.
75 kernsrcver="$(LINUX_VERSION)"
81 --enable-kernel-module \
85 --disable-auto-modprobe \
86 --with-kernel="$(LINUX_DIR)" \
89 define Build/Configure
90 (cd $(PKG_BUILD_DIR); rm -f config.cache; \
91 touch configure.in ; \
94 touch include/config.h.in ; \
97 $(call Build/Configure/Default)
101 $(MAKE) -C $(PKG_BUILD_DIR) \
102 ARCH="$(LINUX_KARCH)" \
103 CROSS_COMPILE="$(TARGET_CROSS)" \
104 DESTDIR="$(PKG_INSTALL_DIR)" \
105 AM_CFLAGS="$(TARGET_CFLAGS) -DDISABLE_COMPAT=1" \
110 define Build/InstallDev
111 mkdir -p $(1)/usr/include
112 $(CP) $(PKG_INSTALL_DIR)/usr/include/fuse{,.h} $(1)/usr/include/
113 mkdir -p $(1)/usr/lib
114 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfuse.{a,so*} $(1)/usr/lib/
115 mkdir -p $(1)/usr/lib/pkgconfig
116 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/fuse.pc $(1)/usr/lib/pkgconfig/
117 $(SED) 's,-I$$$${includedir}/fuse,,g' $(1)/usr/lib/pkgconfig/fuse.pc
118 $(SED) 's,-L$$$${libdir},,g' $(1)/usr/lib/pkgconfig/fuse.pc
121 define Package/fuse-utils/install
122 $(INSTALL_DIR) $(1)/usr/bin
123 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/fusermount $(1)/usr/bin/
126 define Package/libfuse/install
127 $(INSTALL_DIR) $(1)/usr/lib
128 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfuse.so.* $(1)/usr/lib/
131 $(eval $(call BuildPackage,fuse-utils))
132 $(eval $(call BuildPackage,libfuse))
133 $(eval $(call KernelPackage,fuse))