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
:=9c7e8b6606b9f158ae20b8521ba2867c
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
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
126 rm -rf
$(STAGING_DIR
)/usr
/include/fuse
{,.h
} \
127 $(STAGING_DIR
)/usr
/lib
/libfuse.
{a
,so
*} \
128 $(STAGING_DIR
)/usr
/lib
/pkgconfig
/fuse.
pc
131 define Package
/fuse-utils
/install
132 install -d
-m0755
$(1)/usr
/bin
133 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/fusermount
$(1)/usr
/bin
/
136 define Package
/kmod-fuse
/install
137 install -d
-m0755
$(1)/lib
/modules
/$(LINUX_VERSION
)
138 $(CP
) $(PKG_INSTALL_DIR
)/lib
/modules
/$(LINUX_VERSION
)/kernel
/fs
/fuse
/fuse.
$(LINUX_KMOD_SUFFIX
) \
139 $(1)/lib
/modules
/$(LINUX_VERSION
)/
140 install -d
-m0755
$(1)/usr
/lib
141 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libfuse.so.
* $(1)/usr
/lib
/
142 install -d
-m0755
$(1)/usr
/bin
143 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/fusermount
$(1)/usr
/bin
/
146 define Package
/libfuse
/install
147 install -d
-m0755
$(1)/usr
/lib
148 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libfuse.so.
* $(1)/usr
/lib
/
151 $(eval
$(call BuildPackage
,fuse-utils
))
152 $(eval
$(call BuildPackage
,kmod-fuse
))
153 $(eval
$(call BuildPackage
,libfuse
))