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
29 FUSE
(Filesystem in UserSpacE
)
30 URL
:=http
://fuse.sourceforge.net
/
33 define Package
/fuse-utils
34 $(call Package
/fuse
/Default
)
37 DEPENDS
:=+libfuse
+kmod-fuse
41 This package contains the FUSE utilities.
44 define KernelPackage
/fuse
46 $(call Package
/fuse
/Default
)
47 TITLE
+= (kernel module
)
50 This package contains the FUSE kernel module.
51 VERSION
:=$(LINUX_VERSION
)+$(PKG_VERSION
)-$(BOARD
)-$(PKG_RELEASE
)
52 AUTOLOAD
:=$(call AutoLoad
,80,fuse
)
55 define KernelPackage
/fuse
/2.4
56 FILES
:=$(PKG_BUILD_DIR
)/lib
/fuse.
$(LINUX_KMOD_SUFFIX
)
59 define KernelPackage
/fuse
/2.6
60 FILES
:=$(PKG_INSTALL_DIR
)/lib
/modules
/$(LINUX_VERSION
)/kernel
/fs
/fuse
/fuse.
$(LINUX_KMOD_SUFFIX
)
63 define Package
/libfuse
64 $(call Package
/fuse
/Default
)
71 This package contains the FUSE shared library
, needed by other programs.
78 --enable-kernel-module \
82 --disable-auto-modprobe \
83 --with-kernel
="$(LINUX_DIR)" \
86 define Build
/Configure
87 (cd
$(PKG_BUILD_DIR
); rm -f config.cache
; \
88 touch configure.in
; \
91 touch
include/config.h.in
; \
94 $(call Build
/Configure
/Default
)
98 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
99 ARCH
="$(LINUX_KARCH)" \
100 CROSS_COMPILE
="$(TARGET_CROSS)" \
101 DESTDIR
="$(PKG_INSTALL_DIR)" \
102 AM_CFLAGS
="$(TARGET_CFLAGS) -DDISABLE_COMPAT=1" \
107 define Build
/InstallDev
108 mkdir
-p
$(STAGING_DIR
)/usr
/include
109 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/fuse
{,.h
} $(STAGING_DIR
)/usr
/include/
110 mkdir
-p
$(STAGING_DIR
)/usr
/lib
111 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libfuse.
{a
,so
*} $(STAGING_DIR
)/usr
/lib
/
112 mkdir
-p
$(STAGING_DIR
)/usr
/lib
/pkgconfig
113 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/fuse.
pc $(STAGING_DIR
)/usr
/lib
/pkgconfig
/
114 $(SED
) 's,-I$$$${includedir}/fuse,,g' $(STAGING_DIR
)/usr
/lib
/pkgconfig
/fuse.
pc
115 $(SED
) 's,-L$$$${libdir},,g' $(STAGING_DIR
)/usr
/lib
/pkgconfig
/fuse.
pc
118 define Build
/UninstallDev
119 rm -rf
$(STAGING_DIR
)/usr
/include/fuse
{,.h
} \
120 $(STAGING_DIR
)/usr
/lib
/libfuse.
{a
,so
*} \
121 $(STAGING_DIR
)/usr
/lib
/pkgconfig
/fuse.
pc
124 define Package
/fuse-utils
/install
125 $(INSTALL_DIR
) $(1)/usr
/bin
126 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/fusermount
$(1)/usr
/bin
/
129 define Package
/libfuse
/install
130 $(INSTALL_DIR
) $(1)/usr
/lib
131 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libfuse.so.
* $(1)/usr
/lib
/
134 $(eval
$(call BuildPackage
,fuse-utils
))
135 $(eval
$(call BuildPackage
,libfuse
))
136 $(eval
$(call KernelPackage
,fuse
))