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
:=13e1873086a1d7a95f470bbc7428c528
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
)
41 This package contains the FUSE utilities.
44 define Package
/kmod-fuse
45 $(call Package
/fuse
/Default
)
47 CATEGORY
:=Kernel drivers
48 TITLE
+= (kernel module
)
51 This package contains the FUSE kernel module.
52 VERSION
:=$(LINUX_VERSION
)+$(PKG_VERSION
)-$(BOARD
)-$(PKG_RELEASE
)
55 define Package
/libfuse
56 $(call Package
/fuse
/Default
)
62 This package contains the FUSE shared library
, needed by other programs.
65 define Build
/Configure
66 (cd
$(PKG_BUILD_DIR
); rm -f config.cache
; \
67 touch configure.in
; \
70 touch
include/config.h.in
; \
72 $(TARGET_CONFIGURE_OPTS
) \
73 CFLAGS
="$(TARGET_CFLAGS)" \
75 --target
=$(GNU_TARGET_NAME
) \
76 --host
=$(GNU_TARGET_NAME
) \
77 --build
=$(GNU_HOST_NAME
) \
83 --datadir=/usr
/share \
84 --includedir=/usr
/include \
85 --infodir=/usr
/share
/info \
87 --libexecdir
=/usr
/lib \
88 --localstatedir
=/var \
89 --mandir=/usr
/share
/man \
92 $(DISABLE_LARGEFILE
) \
97 --enable-kernel-module \
101 --disable-auto-modprobe \
102 --with-kernel
="$(LINUX_DIR)" \
108 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
109 ARCH
="$(LINUX_KARCH)" \
110 CROSS_COMPILE
="$(TARGET_CROSS)" \
111 DESTDIR
="$(PKG_INSTALL_DIR)" \
115 define Build
/InstallDev
116 mkdir
-p
$(STAGING_DIR
)/usr
/include
117 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/fuse
{,.h
} $(STAGING_DIR
)/usr
/include/
118 mkdir
-p
$(STAGING_DIR
)/usr
/lib
119 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libfuse.
{a
,so
*} $(STAGING_DIR
)/usr
/lib
/
120 mkdir
-p
$(STAGING_DIR
)/usr
/lib
/pkgconfig
121 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/fuse.
pc $(STAGING_DIR
)/usr
/lib
/pkgconfig
/
122 $(SED
) 's,-I$$$${includedir}/fuse,,g' $(STAGING_DIR
)/usr
/lib
/pkgconfig
/fuse.
pc
123 $(SED
) 's,-L$$$${libdir},,g' $(STAGING_DIR
)/usr
/lib
/pkgconfig
/fuse.
pc
126 define Build
/UninstallDev
127 rm -rf
$(STAGING_DIR
)/usr
/include/fuse
{,.h
} \
128 $(STAGING_DIR
)/usr
/lib
/libfuse.
{a
,so
*} \
129 $(STAGING_DIR
)/usr
/lib
/pkgconfig
/fuse.
pc
132 define Package
/fuse-utils
/install
133 $(INSTALL_DIR
) $(1)/usr
/bin
134 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/fusermount
$(1)/usr
/bin
/
137 define Package
/kmod-fuse
/install
138 $(INSTALL_DIR
) $(1)/lib
/modules
/$(LINUX_VERSION
)
139 $(CP
) $(PKG_INSTALL_DIR
)/lib
/modules
/$(LINUX_VERSION
)/kernel
/fs
/fuse
/fuse.
$(LINUX_KMOD_SUFFIX
) \
140 $(1)/lib
/modules
/$(LINUX_VERSION
)/
141 $(INSTALL_DIR
) $(1)/usr
/lib
142 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libfuse.so.
* $(1)/usr
/lib
/
143 $(INSTALL_DIR
) $(1)/usr
/bin
144 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/fusermount
$(1)/usr
/bin
/
147 define Package
/libfuse
/install
148 $(INSTALL_DIR
) $(1)/usr
/lib
149 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libfuse.so.
* $(1)/usr
/lib
/
152 $(eval
$(call BuildPackage
,fuse-utils
))
153 $(eval
$(call BuildPackage
,kmod-fuse
))
154 $(eval
$(call BuildPackage
,libfuse
))