2 # Copyright (C) 2006-2008 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 KCONFIG
:= CONFIG_FUSE_FS
52 FILES
:=$(LINUX_DIR
)/fs
/fuse
/fuse.
$(LINUX_KMOD_SUFFIX
)
53 AUTOLOAD
:=$(call AutoLoad
,80,fuse
)
56 define KernelPackage
/fuse
/description
57 $(call Package
/fuse
/Default
/description
)
58 This package contains the FUSE kernel module.
61 define Package
/libfuse
62 $(call Package
/fuse
/Default
)
70 define Package
/libfuse
/description
71 $(call Package
/fuse
/Default
/description
)
72 This package contains the FUSE shared library
, needed by other programs.
76 kernsrcver
="$(LINUX_VERSION)"
85 --disable-auto-modprobe \
86 --with-kernel
="$(LINUX_DIR)" \
89 ifeq ($(strip $(call CompareKernelPatchVer
,$(KERNEL_PATCHVER
),lt
,2.6.25)),1)
90 define KernelPackage
/fuse
/2.6
92 FILES
:=$(PKG_INSTALL_DIR
)/lib
/modules
/$(LINUX_VERSION
)/kernel
/fs
/fuse
/fuse.
$(LINUX_KMOD_SUFFIX
)
95 CONFIGURE_ARGS
+= --enable-kernel-module
97 CONFIGURE_ARGS
+= --disable-kernel-module
100 define Build
/Configure
101 (cd
$(PKG_BUILD_DIR
); rm -f config.cache
; \
102 touch configure.in
; \
104 touch Makefile.in
; \
105 touch
include/config.h.in
; \
108 $(call Build
/Configure
/Default
)
112 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
113 ARCH
="$(LINUX_KARCH)" \
114 CROSS_COMPILE
="$(TARGET_CROSS)" \
115 DESTDIR
="$(PKG_INSTALL_DIR)" \
116 AM_CFLAGS
="$(TARGET_CFLAGS) -DDISABLE_COMPAT=1" \
121 define Build
/InstallDev
122 mkdir
-p
$(1)/usr
/include
123 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/fuse
{,.h
} $(1)/usr
/include/
124 mkdir
-p
$(1)/usr
/lib
125 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libfuse.
{a
,so
*} $(1)/usr
/lib
/
126 mkdir
-p
$(1)/usr
/lib
/pkgconfig
127 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/fuse.
pc $(1)/usr
/lib
/pkgconfig
/
128 $(SED
) 's,-I$$$${includedir}/fuse,,g' $(1)/usr
/lib
/pkgconfig
/fuse.
pc
129 $(SED
) 's,-L$$$${libdir},,g' $(1)/usr
/lib
/pkgconfig
/fuse.
pc
132 define Package
/fuse-utils
/install
133 $(INSTALL_DIR
) $(1)/usr
/bin
134 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/fusermount
$(1)/usr
/bin
/
137 define Package
/libfuse
/install
138 $(INSTALL_DIR
) $(1)/usr
/lib
139 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libfuse.so.
* $(1)/usr
/lib
/
142 $(eval
$(call BuildPackage
,fuse-utils
))
143 $(eval
$(call BuildPackage
,libfuse
))
144 $(eval
$(call KernelPackage
,fuse
))