2 # Copyright (C) 2006-2009 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
9 include $(INCLUDE_DIR
)/kernel.mk
15 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
16 PKG_SOURCE_URL
:=@SF
/$(PKG_NAME
)
17 PKG_MD5SUM
:=4879f06570d2225667534c37fea04213
19 include $(INCLUDE_DIR
)/package.mk
21 define Package
/fuse
/Default
23 URL
:=http
://fuse.sourceforge.net
/
26 define Package
/fuse
/Default
/description
27 FUSE
(Filesystem in UserSpacE
)
30 define Package
/fuse-utils
31 $(call Package
/fuse
/Default
)
39 define Package
/fuse-utils
/description
40 $(call Package
/fuse
/Default
/description
)
41 This package contains the FUSE utility
'fusermount'.
44 define KernelPackage
/fuse
45 $(call Package
/fuse
/Default
)
48 TITLE
+= (kernel module
)
49 KCONFIG
:= CONFIG_FUSE_FS
50 FILES
:=$(LINUX_DIR
)/fs
/fuse
/fuse.
$(LINUX_KMOD_SUFFIX
)
51 AUTOLOAD
:=$(call AutoLoad
,80,fuse
)
52 VERSION
:=$(LINUX_VERSION
)
55 define KernelPackage
/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
)
65 DEPENDS
:=+LINUX_2_4
:kmod-fuse24
+LINUX_2_6
:kmod-fuse
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)"
84 --disable-auto-modprobe \
85 --with-kernel
="$(LINUX_DIR)" \
88 # Since kernel 2.6.14 the fuse module is officially part of the kernel.
89 # Generally it is better to use the kernel's module. Because it is patched
90 # against the DCACHE BUG on arm architectures (currently brcm-2.4, brcm-47xx)
91 # and from fuse 2.8.0 on it will be removed from the fuse package anyway.
93 CONFIGURE_ARGS
+= --disable-kernel-module
95 define Build
/Configure
96 (cd
$(PKG_BUILD_DIR
); rm -f config.cache
; \
97 touch configure.in
; \
100 touch
include/config.h.in
; \
103 $(call Build
/Configure
/Default
)
107 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
108 ARCH
="$(LINUX_KARCH)" \
109 CROSS_COMPILE
="$(TARGET_CROSS)" \
110 DESTDIR
="$(PKG_INSTALL_DIR)" \
111 AM_CFLAGS
="$(TARGET_CFLAGS) -DDISABLE_COMPAT=1" \
116 define Build
/InstallDev
117 mkdir
-p
$(1)/usr
/include
118 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/fuse
{,.h
} $(1)/usr
/include/
119 mkdir
-p
$(1)/usr
/lib
120 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libfuse.
{a
,so
*} $(1)/usr
/lib
/
121 mkdir
-p
$(1)/usr
/lib
/pkgconfig
122 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/fuse.
pc $(1)/usr
/lib
/pkgconfig
/
123 $(SED
) 's,-I$$$${includedir}/fuse,,g' $(1)/usr
/lib
/pkgconfig
/fuse.
pc
124 $(SED
) 's,-L$$$${libdir},,g' $(1)/usr
/lib
/pkgconfig
/fuse.
pc
127 define Package
/fuse-utils
/install
128 $(INSTALL_DIR
) $(1)/usr
/bin
129 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/fusermount
$(1)/usr
/bin
/
132 define Package
/libfuse
/install
133 $(INSTALL_DIR
) $(1)/usr
/lib
134 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libfuse.so.
* $(1)/usr
/lib
/
137 $(eval
$(call BuildPackage
,fuse-utils
))
138 $(eval
$(call BuildPackage
,libfuse
))
139 $(eval
$(call KernelPackage
,fuse
))