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
:=3f4f5d07d12dedc0a3fd23472171fe94
21 PKG_BUILD_DIR
:=$(KERNEL_BUILD_DIR
)/$(PKG_NAME
)-$(PKG_VERSION
)
22 PKG_INSTALL_DIR
:=$(PKG_BUILD_DIR
)/ipkg-install
24 include $(INCLUDE_DIR
)/package.mk
26 define Package
/fuse
/Default
30 FUSE
(Filesystem in UserSpacE
)
31 URL
:=http
://fuse.sourceforge.net
/
34 define Package
/fuse-utils
35 $(call Package
/fuse
/Default
)
38 DEPENDS
:=+libfuse
+kmod-fuse @LINUX_2_6
42 This package contains the FUSE utilities.
45 define KernelPackage
/fuse
47 $(call Package
/fuse
/Default
)
49 TITLE
+= (kernel module
)
52 This package contains the FUSE kernel module.
53 FILES
:=$(PKG_INSTALL_DIR
)/lib
/modules
/$(LINUX_VERSION
)/kernel
/fs
/fuse
/fuse.
$(LINUX_KMOD_SUFFIX
)
54 VERSION
:=$(LINUX_VERSION
)+$(PKG_VERSION
)-$(BOARD
)-$(PKG_RELEASE
)
55 AUTOLOAD
:=$(call AutoLoad
,80,fuse
)
58 define Package
/libfuse
59 $(call Package
/fuse
/Default
)
66 This package contains the FUSE shared library
, needed by other programs.
73 --enable-kernel-module \
77 --disable-auto-modprobe \
78 --with-kernel
="$(LINUX_DIR)" \
81 define Build
/Configure
82 (cd
$(PKG_BUILD_DIR
); rm -f config.cache
; \
83 touch configure.in
; \
86 touch
include/config.h.in
; \
89 $(call Build
/Configure
/Default
)
93 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
94 ARCH
="$(LINUX_KARCH)" \
95 CROSS_COMPILE
="$(TARGET_CROSS)" \
96 DESTDIR
="$(PKG_INSTALL_DIR)" \
97 AM_CFLAGS
="$(TARGET_CFLAGS) -DDISABLE_COMPAT=1" \
102 define Build
/InstallDev
103 mkdir
-p
$(STAGING_DIR
)/usr
/include
104 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/fuse
{,.h
} $(STAGING_DIR
)/usr
/include/
105 mkdir
-p
$(STAGING_DIR
)/usr
/lib
106 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libfuse.
{a
,so
*} $(STAGING_DIR
)/usr
/lib
/
107 mkdir
-p
$(STAGING_DIR
)/usr
/lib
/pkgconfig
108 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/fuse.
pc $(STAGING_DIR
)/usr
/lib
/pkgconfig
/
109 $(SED
) 's,-I$$$${includedir}/fuse,,g' $(STAGING_DIR
)/usr
/lib
/pkgconfig
/fuse.
pc
110 $(SED
) 's,-L$$$${libdir},,g' $(STAGING_DIR
)/usr
/lib
/pkgconfig
/fuse.
pc
113 define Build
/UninstallDev
114 rm -rf
$(STAGING_DIR
)/usr
/include/fuse
{,.h
} \
115 $(STAGING_DIR
)/usr
/lib
/libfuse.
{a
,so
*} \
116 $(STAGING_DIR
)/usr
/lib
/pkgconfig
/fuse.
pc
119 define Package
/fuse-utils
/install
120 $(INSTALL_DIR
) $(1)/usr
/bin
121 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/fusermount
$(1)/usr
/bin
/
124 define Package
/libfuse
/install
125 $(INSTALL_DIR
) $(1)/usr
/lib
126 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libfuse.so.
* $(1)/usr
/lib
/
129 $(eval
$(call BuildPackage
,fuse-utils
))
130 $(eval
$(call BuildPackage
,libfuse
))
131 $(eval
$(call KernelPackage
,fuse
))