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
42 This package contains the FUSE utilities.
45 define KernelPackage
/fuse
47 $(call Package
/fuse
/Default
)
48 TITLE
+= (kernel module
)
51 This package contains the FUSE kernel module.
52 VERSION
:=$(LINUX_VERSION
)+$(PKG_VERSION
)-$(BOARD
)-$(PKG_RELEASE
)
53 FILES
:=$(PKG_INSTALL_DIR
)/lib
/modules
/$(LINUX_VERSION
)/kernel
/fs
/fuse
/fuse.
$(LINUX_KMOD_SUFFIX
)
56 define Package
/libfuse
57 $(call Package
/fuse
/Default
)
63 This package contains the FUSE shared library
, needed by other programs.
66 define Build
/Configure
67 (cd
$(PKG_BUILD_DIR
); rm -f config.cache
; \
68 touch configure.in
; \
71 touch
include/config.h.in
; \
73 $(TARGET_CONFIGURE_OPTS
) \
74 CFLAGS
="$(TARGET_CFLAGS)" \
76 --target
=$(GNU_TARGET_NAME
) \
77 --host
=$(GNU_TARGET_NAME
) \
78 --build
=$(GNU_HOST_NAME
) \
84 --datadir=/usr
/share \
85 --includedir=/usr
/include \
86 --infodir=/usr
/share
/info \
88 --libexecdir
=/usr
/lib \
89 --localstatedir
=/var \
90 --mandir=/usr
/share
/man \
93 $(DISABLE_LARGEFILE
) \
98 --enable-kernel-module \
102 --disable-auto-modprobe \
103 --with-kernel
="$(LINUX_DIR)" \
109 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
110 ARCH
="$(LINUX_KARCH)" \
111 CROSS_COMPILE
="$(TARGET_CROSS)" \
112 DESTDIR
="$(PKG_INSTALL_DIR)" \
116 define Build
/InstallDev
117 mkdir
-p
$(STAGING_DIR
)/usr
/include
118 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/fuse
{,.h
} $(STAGING_DIR
)/usr
/include/
119 mkdir
-p
$(STAGING_DIR
)/usr
/lib
120 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libfuse.
{a
,so
*} $(STAGING_DIR
)/usr
/lib
/
121 mkdir
-p
$(STAGING_DIR
)/usr
/lib
/pkgconfig
122 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/fuse.
pc $(STAGING_DIR
)/usr
/lib
/pkgconfig
/
123 $(SED
) 's,-I$$$${includedir}/fuse,,g' $(STAGING_DIR
)/usr
/lib
/pkgconfig
/fuse.
pc
124 $(SED
) 's,-L$$$${libdir},,g' $(STAGING_DIR
)/usr
/lib
/pkgconfig
/fuse.
pc
127 define Build
/UninstallDev
128 rm -rf
$(STAGING_DIR
)/usr
/include/fuse
{,.h
} \
129 $(STAGING_DIR
)/usr
/lib
/libfuse.
{a
,so
*} \
130 $(STAGING_DIR
)/usr
/lib
/pkgconfig
/fuse.
pc
133 define Package
/fuse-utils
/install
134 $(INSTALL_DIR
) $(1)/usr
/bin
135 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/fusermount
$(1)/usr
/bin
/
138 define Package
/libfuse
/install
139 $(INSTALL_DIR
) $(1)/usr
/lib
140 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libfuse.so.
* $(1)/usr
/lib
/
143 $(eval
$(call BuildPackage
,fuse-utils
))
144 $(eval
$(call BuildPackage
,libfuse
))
145 $(eval
$(call KernelPackage
,fuse
))