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
15 PKG_MD5SUM
:=9c7e8b6606b9f158ae20b8521ba2867c
17 PKG_BUILD_DIR
:=$(KERNEL_BUILD_DIR
)/$(PKG_NAME
)-$(PKG_VERSION
)
18 PKG_SOURCE_URL
:=@SF
/$(PKG_NAME
)
19 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
22 PKG_INSTALL_DIR
:=$(PKG_BUILD_DIR
)/ipkg-install
24 include $(INCLUDE_DIR
)/package.mk
26 define Package
/kmod-fuse
30 TITLE
:=FUSE
(Filesystem in UserSpacE
)
31 DESCRIPTION
:=FUSE
(Filesystem in UserSpacE
)
32 URL
:=http
://fuse.sourceforge.net
/
33 VERSION
:=$(LINUX_VERSION
)+$(PKG_VERSION
)-$(BOARD
)-$(PKG_RELEASE
)
36 define Build
/Configure
37 (cd
$(PKG_BUILD_DIR
); \
38 rm -rf config.
{cache
,status
} ; \
39 touch configure.in
; \
42 touch
include/config.h.in
; \
44 $(TARGET_CONFIGURE_OPTS
) \
45 CFLAGS
="$(TARGET_CFLAGS)" \
47 --target
=$(GNU_TARGET_NAME
) \
48 --host
=$(GNU_TARGET_NAME
) \
49 --build
=$(GNU_HOST_NAME
) \
55 --datadir=/usr
/share \
56 --includedir=/usr
/include \
57 --infodir=/usr
/share
/info \
59 --libexecdir
=/usr
/lib \
60 --localstatedir
=/var \
61 --mandir=/usr
/share
/man \
64 $(DISABLE_LARGEFILE
) \
69 --enable-kernel-module \
73 --disable-auto-modprobe \
74 --with-kernel
=$(LINUX_DIR
) \
80 rm -rf
$(PKG_INSTALL_DIR
)
81 mkdir
-p
$(PKG_INSTALL_DIR
)
82 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
83 ARCH
="$(LINUX_KARCH)" \
84 CROSS_COMPILE
="$(TARGET_CROSS)" \
85 PATH
="$(TARGET_PATH)" \
86 DESTDIR
="$(PKG_INSTALL_DIR)" \
90 define Build
/InstallDev
91 mkdir
-p
$(STAGING_DIR
)/usr
/include
92 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/fuse
{,.h
} \
93 $(STAGING_DIR
)/usr
/include/
94 mkdir
-p
$(STAGING_DIR
)/usr
/lib
95 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libfuse.
{a
,so
*} \
96 $(STAGING_DIR
)/usr
/lib
/
97 mkdir
-p
$(STAGING_DIR
)/usr
/lib
/pkgconfig
98 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/fuse.
pc $(STAGING_DIR
)/usr
/lib
/pkgconfig
/
99 $(SED
) 's,-I$${includedir}/fuse,,g' $(STAGING_DIR
)/usr
/lib
/pkgconfig
/fuse.
pc
100 $(SED
) 's,-L$${libdir},,g' $(STAGING_DIR
)/usr
/lib
/pkgconfig
/fuse.
pc
103 define Build
/UninstallDev
104 rm -rf
$(STAGING_DIR
)/usr
/include/fuse
{,.h
} \
105 $(STAGING_DIR
)/usr
/lib
/libfuse.
{a
,so
*} \
106 $(STAGING_DIR
)/usr
/lib
/pkgconfig
/fuse.
pc
109 define Package
/kmod-fuse
/install
110 install -d
-m0755
$(1)/lib
/modules
/$(LINUX_VERSION
)
111 $(CP
) $(PKG_INSTALL_DIR
)/lib
/modules
/$(LINUX_VERSION
)/kernel
/fs
/fuse
/fuse.
$(LINUX_KMOD_SUFFIX
) \
112 $(1)/lib
/modules
/$(LINUX_VERSION
)/
113 install -d
-m0755
$(1)/usr
/lib
114 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libfuse.so.
* $(1)/usr
/lib
/
115 install -d
-m0755
$(1)/usr
/bin
116 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/fusermount
$(1)/usr
/bin
/
119 $(eval
$(call BuildPackage
,kmod-fuse
))