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.
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
:=98563fc7b265b7479a3178181cbcf59a
19 include $(INCLUDE_DIR
)/package.mk
21 define Package
/fuse
/Default
24 URL
:=http
://fuse.sourceforge.net
/
27 define Package
/fuse
/Default
/description
28 FUSE
(Filesystem in UserSpacE
)
31 define Package
/fuse-utils
32 $(call Package
/fuse
/Default
)
35 DEPENDS
:=+libfuse
+kmod-fuse @LINUX_2_6
40 define Package
/fuse-utils
/description
41 $(call Package
/fuse
/Default
/description
)
42 This package contains the FUSE utilities.
45 define KernelPackage
/fuse
46 $(call Package
/fuse
/Default
)
49 TITLE
+= (kernel module
)
50 KCONFIG
:= CONFIG_FUSE_FS
51 FILES
:=$(LINUX_DIR
)/fs
/fuse
/fuse.
$(LINUX_KMOD_SUFFIX
)
52 AUTOLOAD
:=$(call AutoLoad
,80,fuse
)
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
)
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 ifeq ($(strip $(call CompareKernelPatchVer
,$(KERNEL_PATCHVER
),lt
,2.6.25)),1)
89 define KernelPackage
/fuse
/2.6
91 FILES
:=$(PKG_INSTALL_DIR
)/lib
/modules
/$(LINUX_VERSION
)/kernel
/fs
/fuse
/fuse.
$(LINUX_KMOD_SUFFIX
)
94 CONFIGURE_ARGS
+= --enable-kernel-module
96 CONFIGURE_ARGS
+= --disable-kernel-module
99 define Build
/Configure
100 (cd
$(PKG_BUILD_DIR
); rm -f config.cache
; \
101 touch configure.in
; \
103 touch Makefile.in
; \
104 touch
include/config.h.in
; \
107 $(call Build
/Configure
/Default
)
111 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
112 ARCH
="$(LINUX_KARCH)" \
113 CROSS_COMPILE
="$(TARGET_CROSS)" \
114 DESTDIR
="$(PKG_INSTALL_DIR)" \
115 AM_CFLAGS
="$(TARGET_CFLAGS) -DDISABLE_COMPAT=1" \
120 define Build
/InstallDev
121 mkdir
-p
$(1)/usr
/include
122 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/fuse
{,.h
} $(1)/usr
/include/
123 mkdir
-p
$(1)/usr
/lib
124 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libfuse.
{a
,so
*} $(1)/usr
/lib
/
125 mkdir
-p
$(1)/usr
/lib
/pkgconfig
126 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/fuse.
pc $(1)/usr
/lib
/pkgconfig
/
127 $(SED
) 's,-I$$$${includedir}/fuse,,g' $(1)/usr
/lib
/pkgconfig
/fuse.
pc
128 $(SED
) 's,-L$$$${libdir},,g' $(1)/usr
/lib
/pkgconfig
/fuse.
pc
131 define Package
/fuse-utils
/install
132 $(INSTALL_DIR
) $(1)/usr
/bin
133 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/fusermount
$(1)/usr
/bin
/
136 define Package
/libfuse
/install
137 $(INSTALL_DIR
) $(1)/usr
/lib
138 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libfuse.so.
* $(1)/usr
/lib
/
141 $(eval
$(call BuildPackage
,fuse-utils
))
142 $(eval
$(call BuildPackage
,libfuse
))
143 $(eval
$(call KernelPackage
,fuse
))