madwifi: add patch for building all modules (except for the HAL) into a single module...
[openwrt.git] / package / fuse / Makefile
1 #
2 # Copyright (C) 2006-2009 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9 include $(INCLUDE_DIR)/kernel.mk
10
11 PKG_NAME:=fuse
12 PKG_VERSION:=2.7.4
13 PKG_RELEASE:=2
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=@SF/$(PKG_NAME)
17 PKG_MD5SUM:=4879f06570d2225667534c37fea04213
18
19 include $(INCLUDE_DIR)/package.mk
20
21 define Package/fuse/Default
22 TITLE:=FUSE
23 URL:=http://fuse.sourceforge.net/
24 endef
25
26 define Package/fuse/Default/description
27 FUSE (Filesystem in UserSpacE)
28 endef
29
30 define Package/fuse-utils
31 $(call Package/fuse/Default)
32 SECTION:=utils
33 CATEGORY:=Utilities
34 DEPENDS:=+libfuse
35 TITLE+= (utilities)
36 SUBMENU:=Filesystem
37 endef
38
39 define Package/fuse-utils/description
40 $(call Package/fuse/Default/description)
41 This package contains the FUSE utility 'fusermount'.
42 endef
43
44 define KernelPackage/fuse
45 $(call Package/fuse/Default)
46 SUBMENU:=Filesystems
47 DEPENDS:=@LINUX_2_6
48 TITLE+= (kernel module)
49 KCONFIG:= CONFIG_FUSE_FS
50 FILES:=$(LINUX_DIR)/fs/fuse/fuse.$(LINUX_KMOD_SUFFIX)
51 AUTOLOAD:=$(call AutoLoad,80,fuse)
52 VERSION:=$(LINUX_VERSION)
53 endef
54
55 define KernelPackage/fuse/description
56 $(call Package/fuse/Default/description)
57 This package contains the FUSE kernel module.
58 endef
59
60 define Package/libfuse
61 $(call Package/fuse/Default)
62 SECTION:=libs
63 CATEGORY:=Libraries
64 TITLE+= (library)
65 DEPENDS:=+LINUX_2_4:kmod-fuse24 +LINUX_2_6:kmod-fuse
66 SUBMENU:=Filesystem
67 endef
68
69 define Package/libfuse/description
70 $(call Package/fuse/Default/description)
71 This package contains the FUSE shared library, needed by other programs.
72 endef
73
74 CONFIGURE_VARS += \
75 kernsrcver="$(LINUX_VERSION)"
76
77 CONFIGURE_ARGS += \
78 --enable-shared \
79 --enable-static \
80 --disable-rpath \
81 --enable-lib \
82 --enable-util \
83 --disable-example \
84 --disable-auto-modprobe \
85 --with-kernel="$(LINUX_DIR)" \
86 --disable-mtab
87
88 # Since kernel 2.6.14 the fuse module is officially part of the kernel.
89 # Generally it is better to use the kernel's module. Because it is patched
90 # against the DCACHE BUG on arm architectures (currently brcm-2.4, brcm-47xx)
91 # and from fuse 2.8.0 on it will be removed from the fuse package anyway.
92 #
93 CONFIGURE_ARGS += --disable-kernel-module
94
95 define Build/Configure
96 (cd $(PKG_BUILD_DIR); rm -f config.cache; \
97 touch configure.in ; \
98 touch aclocal.m4 ; \
99 touch Makefile.in ; \
100 touch include/config.h.in ; \
101 touch configure ; \
102 )
103 $(call Build/Configure/Default)
104 endef
105
106 define Build/Compile
107 $(MAKE) -C $(PKG_BUILD_DIR) \
108 ARCH="$(LINUX_KARCH)" \
109 CROSS_COMPILE="$(TARGET_CROSS)" \
110 DESTDIR="$(PKG_INSTALL_DIR)" \
111 AM_CFLAGS="$(TARGET_CFLAGS) -DDISABLE_COMPAT=1" \
112 EXTRA_DIST="" \
113 all install
114 endef
115
116 define Build/InstallDev
117 mkdir -p $(1)/usr/include
118 $(CP) $(PKG_INSTALL_DIR)/usr/include/fuse{,.h} $(1)/usr/include/
119 mkdir -p $(1)/usr/lib
120 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfuse.{a,so*} $(1)/usr/lib/
121 mkdir -p $(1)/usr/lib/pkgconfig
122 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/fuse.pc $(1)/usr/lib/pkgconfig/
123 $(SED) 's,-I$$$${includedir}/fuse,,g' $(1)/usr/lib/pkgconfig/fuse.pc
124 $(SED) 's,-L$$$${libdir},,g' $(1)/usr/lib/pkgconfig/fuse.pc
125 endef
126
127 define Package/fuse-utils/install
128 $(INSTALL_DIR) $(1)/usr/bin
129 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/fusermount $(1)/usr/bin/
130 endef
131
132 define Package/libfuse/install
133 $(INSTALL_DIR) $(1)/usr/lib
134 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfuse.so.* $(1)/usr/lib/
135 endef
136
137 $(eval $(call BuildPackage,fuse-utils))
138 $(eval $(call BuildPackage,libfuse))
139 $(eval $(call KernelPackage,fuse))
This page took 0.0535 seconds and 5 git commands to generate.