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.
68 define Build
/Configure
69 (cd
$(PKG_BUILD_DIR
); rm -f config.cache
; \
70 touch configure.in
; \
73 touch
include/config.h.in
; \
75 $(TARGET_CONFIGURE_OPTS
) \
76 CFLAGS
="$(TARGET_CFLAGS)" \
78 --target
=$(GNU_TARGET_NAME
) \
79 --host
=$(GNU_TARGET_NAME
) \
80 --build
=$(GNU_HOST_NAME
) \
86 --datadir=/usr
/share \
87 --includedir=/usr
/include \
88 --infodir=/usr
/share
/info \
90 --libexecdir
=/usr
/lib \
91 --localstatedir
=/var \
92 --mandir=/usr
/share
/man \
95 $(DISABLE_LARGEFILE
) \
100 --enable-kernel-module \
104 --disable-auto-modprobe \
105 --with-kernel
="$(LINUX_DIR)" \
111 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
112 ARCH
="$(LINUX_KARCH)" \
113 CROSS_COMPILE
="$(TARGET_CROSS)" \
114 DESTDIR
="$(PKG_INSTALL_DIR)" \
118 define Build
/InstallDev
119 mkdir
-p
$(STAGING_DIR
)/usr
/include
120 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/fuse
{,.h
} $(STAGING_DIR
)/usr
/include/
121 mkdir
-p
$(STAGING_DIR
)/usr
/lib
122 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libfuse.
{a
,so
*} $(STAGING_DIR
)/usr
/lib
/
123 mkdir
-p
$(STAGING_DIR
)/usr
/lib
/pkgconfig
124 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/fuse.
pc $(STAGING_DIR
)/usr
/lib
/pkgconfig
/
125 $(SED
) 's,-I$$$${includedir}/fuse,,g' $(STAGING_DIR
)/usr
/lib
/pkgconfig
/fuse.
pc
126 $(SED
) 's,-L$$$${libdir},,g' $(STAGING_DIR
)/usr
/lib
/pkgconfig
/fuse.
pc
129 define Build
/UninstallDev
130 rm -rf
$(STAGING_DIR
)/usr
/include/fuse
{,.h
} \
131 $(STAGING_DIR
)/usr
/lib
/libfuse.
{a
,so
*} \
132 $(STAGING_DIR
)/usr
/lib
/pkgconfig
/fuse.
pc
135 define Package
/fuse-utils
/install
136 $(INSTALL_DIR
) $(1)/usr
/bin
137 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/fusermount
$(1)/usr
/bin
/
140 define Package
/libfuse
/install
141 $(INSTALL_DIR
) $(1)/usr
/lib
142 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libfuse.so.
* $(1)/usr
/lib
/
145 $(eval
$(call BuildPackage
,fuse-utils
))
146 $(eval
$(call BuildPackage
,libfuse
))
147 $(eval
$(call KernelPackage
,fuse
))