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
)
48 TITLE
+= (kernel module
)
52 This package contains the FUSE kernel module.
53 VERSION
:=$(LINUX_VERSION
)+$(PKG_VERSION
)-$(BOARD
)-$(PKG_RELEASE
)
54 FILES
:=$(PKG_INSTALL_DIR
)/lib
/modules
/$(LINUX_VERSION
)/kernel
/fs
/fuse
/fuse.
$(LINUX_KMOD_SUFFIX
)
57 define Package
/libfuse
58 $(call Package
/fuse
/Default
)
65 This package contains the FUSE shared library
, needed by other programs.
72 --enable-kernel-module \
76 --disable-auto-modprobe \
77 --with-kernel
="$(LINUX_DIR)" \
80 define Build
/Configure
81 (cd
$(PKG_BUILD_DIR
); rm -f config.cache
; \
82 touch configure.in
; \
85 touch
include/config.h.in
; \
88 $(call Build
/Configure
/Default
)
92 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
93 ARCH
="$(LINUX_KARCH)" \
94 CROSS_COMPILE
="$(TARGET_CROSS)" \
95 DESTDIR
="$(PKG_INSTALL_DIR)" \
96 AM_CFLAGS
="$(TARGET_CFLAGS) -DDISABLE_COMPAT=1" \
101 define Build
/InstallDev
102 mkdir
-p
$(STAGING_DIR
)/usr
/include
103 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/fuse
{,.h
} $(STAGING_DIR
)/usr
/include/
104 mkdir
-p
$(STAGING_DIR
)/usr
/lib
105 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libfuse.
{a
,so
*} $(STAGING_DIR
)/usr
/lib
/
106 mkdir
-p
$(STAGING_DIR
)/usr
/lib
/pkgconfig
107 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/fuse.
pc $(STAGING_DIR
)/usr
/lib
/pkgconfig
/
108 $(SED
) 's,-I$$$${includedir}/fuse,,g' $(STAGING_DIR
)/usr
/lib
/pkgconfig
/fuse.
pc
109 $(SED
) 's,-L$$$${libdir},,g' $(STAGING_DIR
)/usr
/lib
/pkgconfig
/fuse.
pc
112 define Build
/UninstallDev
113 rm -rf
$(STAGING_DIR
)/usr
/include/fuse
{,.h
} \
114 $(STAGING_DIR
)/usr
/lib
/libfuse.
{a
,so
*} \
115 $(STAGING_DIR
)/usr
/lib
/pkgconfig
/fuse.
pc
118 define Package
/fuse-utils
/install
119 $(INSTALL_DIR
) $(1)/usr
/bin
120 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/fusermount
$(1)/usr
/bin
/
123 define Package
/libfuse
/install
124 $(INSTALL_DIR
) $(1)/usr
/lib
125 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libfuse.so.
* $(1)/usr
/lib
/
128 $(eval
$(call BuildPackage
,fuse-utils
))
129 $(eval
$(call BuildPackage
,libfuse
))
130 $(eval
$(call KernelPackage
,fuse
))