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 DESTDIR
="$(PKG_INSTALL_DIR)" \
89 define Build
/InstallDev
90 mkdir
-p
$(STAGING_DIR
)/usr
/include
91 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/fuse
{,.h
} \
92 $(STAGING_DIR
)/usr
/include/
93 mkdir
-p
$(STAGING_DIR
)/usr
/lib
94 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libfuse.
{a
,so
*} \
95 $(STAGING_DIR
)/usr
/lib
/
96 mkdir
-p
$(STAGING_DIR
)/usr
/lib
/pkgconfig
97 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/fuse.
pc $(STAGING_DIR
)/usr
/lib
/pkgconfig
/
98 $(SED
) 's,-I$${includedir}/fuse,,g' $(STAGING_DIR
)/usr
/lib
/pkgconfig
/fuse.
pc
99 $(SED
) 's,-L$${libdir},,g' $(STAGING_DIR
)/usr
/lib
/pkgconfig
/fuse.
pc
102 define Build
/UninstallDev
103 rm -rf
$(STAGING_DIR
)/usr
/include/fuse
{,.h
} \
104 $(STAGING_DIR
)/usr
/lib
/libfuse.
{a
,so
*} \
105 $(STAGING_DIR
)/usr
/lib
/pkgconfig
/fuse.
pc
108 define Package
/kmod-fuse
/install
109 install -d
-m0755
$(1)/lib
/modules
/$(LINUX_VERSION
)
110 $(CP
) $(PKG_INSTALL_DIR
)/lib
/modules
/$(LINUX_VERSION
)/kernel
/fs
/fuse
/fuse.
$(LINUX_KMOD_SUFFIX
) \
111 $(1)/lib
/modules
/$(LINUX_VERSION
)/
112 install -d
-m0755
$(1)/usr
/lib
113 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libfuse.so.
* $(1)/usr
/lib
/
114 install -d
-m0755
$(1)/usr
/bin
115 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/fusermount
$(1)/usr
/bin
/
118 $(eval
$(call BuildPackage
,kmod-fuse
))