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_BUILD_DIR
:=$(KERNEL_BUILD_DIR
)/$(PKG_NAME
)-$(PKG_VERSION
)
17 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
18 PKG_SOURCE_URL
:=@SF
/$(PKG_NAME
)
19 PKG_MD5SUM
:=9c7e8b6606b9f158ae20b8521ba2867c
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
)
40 This package contains the FUSE utilities.
43 define Package
/kmod-fuse
44 $(call Package
/fuse
/Default
)
46 CATEGORY
:=Kernel drivers
47 TITLE
+= (kernel module
)
50 This package contains the FUSE kernel module.
51 VERSION
:=$(LINUX_VERSION
)+$(PKG_VERSION
)-$(BOARD
)-$(PKG_RELEASE
)
54 define Package
/libfuse
55 $(call Package
/fuse
/Default
)
61 This package contains the FUSE shared library
, needed by other programs.
64 define Build
/Configure
65 (cd
$(PKG_BUILD_DIR
); rm -f config.cache
; \
66 touch configure.in
; \
69 touch
include/config.h.in
; \
71 $(TARGET_CONFIGURE_OPTS
) \
72 CFLAGS
="$(TARGET_CFLAGS)" \
74 --target
=$(GNU_TARGET_NAME
) \
75 --host
=$(GNU_TARGET_NAME
) \
76 --build
=$(GNU_HOST_NAME
) \
82 --datadir=/usr
/share \
83 --includedir=/usr
/include \
84 --infodir=/usr
/share
/info \
86 --libexecdir
=/usr
/lib \
87 --localstatedir
=/var \
88 --mandir=/usr
/share
/man \
91 $(DISABLE_LARGEFILE
) \
96 --enable-kernel-module \
100 --disable-auto-modprobe \
101 --with-kernel
="$(LINUX_DIR)" \
107 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
108 ARCH
="$(LINUX_KARCH)" \
109 CROSS_COMPILE
="$(TARGET_CROSS)" \
110 DESTDIR
="$(PKG_INSTALL_DIR)" \
114 define Build
/InstallDev
115 mkdir
-p
$(STAGING_DIR
)/usr
/include
116 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/fuse
{,.h
} $(STAGING_DIR
)/usr
/include/
117 mkdir
-p
$(STAGING_DIR
)/usr
/lib
118 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libfuse.
{a
,so
*} $(STAGING_DIR
)/usr
/lib
/
119 mkdir
-p
$(STAGING_DIR
)/usr
/lib
/pkgconfig
120 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/fuse.
pc $(STAGING_DIR
)/usr
/lib
/pkgconfig
/
121 $(SED
) 's,-I$$$${includedir}/fuse,,g' $(STAGING_DIR
)/usr
/lib
/pkgconfig
/fuse.
pc
122 $(SED
) 's,-L$$$${libdir},,g' $(STAGING_DIR
)/usr
/lib
/pkgconfig
/fuse.
pc
125 define Build
/UninstallDev
127 $(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 -d
-m0755
$(1)/usr
/bin
134 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/fusermount
$(1)/usr
/bin
/
137 define Package
/kmod-fuse
/install
138 install -d
-m0755
$(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 -d
-m0755
$(1)/usr
/lib
142 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libfuse.so.
* $(1)/usr
/lib
/
143 install -d
-m0755
$(1)/usr
/bin
144 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/fusermount
$(1)/usr
/bin
/
147 define Package
/libfuse
/install
148 install -d
-m0755
$(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
))