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 # This section is disabled; since kernel 2.6.14 the fuse module is officially
89 # part of the kernel. The following enables this fuse packages kernel module
90 # instead of the kernel's, if the kernel is younger than 2.6.25.
91 # Generally it is better to use the kernel's module. Because it is DCACHE BUG
92 # patched and from fuse 2.8.0 on it will be removed from the fuse package
95 #ifeq ($(strip $(call CompareKernelPatchVer,$(KERNEL_PATCHVER),lt,2.6.25)),1)
96 # define KernelPackage/fuse/2.6
98 # FILES:=$(PKG_INSTALL_DIR)/lib/modules/$(LINUX_VERSION)/kernel/fs/fuse/fuse.$(LINUX_KMOD_SUFFIX)
101 # CONFIGURE_ARGS += --enable-kernel-module
103 # CONFIGURE_ARGS += --disable-kernel-module
106 define Build
/Configure
107 (cd
$(PKG_BUILD_DIR
); rm -f config.cache
; \
108 touch configure.in
; \
110 touch Makefile.in
; \
111 touch
include/config.h.in
; \
114 $(call Build
/Configure
/Default
)
118 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
119 ARCH
="$(LINUX_KARCH)" \
120 CROSS_COMPILE
="$(TARGET_CROSS)" \
121 DESTDIR
="$(PKG_INSTALL_DIR)" \
122 AM_CFLAGS
="$(TARGET_CFLAGS) -DDISABLE_COMPAT=1" \
127 define Build
/InstallDev
128 mkdir
-p
$(1)/usr
/include
129 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/fuse
{,.h
} $(1)/usr
/include/
130 mkdir
-p
$(1)/usr
/lib
131 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libfuse.
{a
,so
*} $(1)/usr
/lib
/
132 mkdir
-p
$(1)/usr
/lib
/pkgconfig
133 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/fuse.
pc $(1)/usr
/lib
/pkgconfig
/
134 $(SED
) 's,-I$$$${includedir}/fuse,,g' $(1)/usr
/lib
/pkgconfig
/fuse.
pc
135 $(SED
) 's,-L$$$${libdir},,g' $(1)/usr
/lib
/pkgconfig
/fuse.
pc
138 define Package
/fuse-utils
/install
139 $(INSTALL_DIR
) $(1)/usr
/bin
140 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/fusermount
$(1)/usr
/bin
/
143 define Package
/libfuse
/install
144 $(INSTALL_DIR
) $(1)/usr
/lib
145 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libfuse.so.
* $(1)/usr
/lib
/
148 $(eval
$(call BuildPackage
,fuse-utils
))
149 $(eval
$(call BuildPackage
,libfuse
))
150 $(eval
$(call KernelPackage
,fuse
))