[PATCH] sysupgrade-ext2 sync before writing image, not after
[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:=1
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 # This section is disabled; since kernel 2.6.14 the fuse module is officially
89 # part of the kernel. The following enables this fuse packages kernel module
90 # instead of the kernel's, if the kernel is younger than 2.6.25.
91 # Generally it is better to use the kernel's module. Because it is DCACHE BUG
92 # patched and from fuse 2.8.0 on it will be removed from the fuse package
93 # anyway.
94 #
95 #ifeq ($(strip $(call CompareKernelPatchVer,$(KERNEL_PATCHVER),lt,2.6.25)),1)
96 # define KernelPackage/fuse/2.6
97 # KCONFIG:=
98 # FILES:=$(PKG_INSTALL_DIR)/lib/modules/$(LINUX_VERSION)/kernel/fs/fuse/fuse.$(LINUX_KMOD_SUFFIX)
99 # endef
100 #
101 # CONFIGURE_ARGS += --enable-kernel-module
102 #else
103 # CONFIGURE_ARGS += --disable-kernel-module
104 #endif
105
106 define Build/Configure
107 (cd $(PKG_BUILD_DIR); rm -f config.cache; \
108 touch configure.in ; \
109 touch aclocal.m4 ; \
110 touch Makefile.in ; \
111 touch include/config.h.in ; \
112 touch configure ; \
113 )
114 $(call Build/Configure/Default)
115 endef
116
117 define Build/Compile
118 $(MAKE) -C $(PKG_BUILD_DIR) \
119 ARCH="$(LINUX_KARCH)" \
120 CROSS_COMPILE="$(TARGET_CROSS)" \
121 DESTDIR="$(PKG_INSTALL_DIR)" \
122 AM_CFLAGS="$(TARGET_CFLAGS) -DDISABLE_COMPAT=1" \
123 EXTRA_DIST="" \
124 all install
125 endef
126
127 define Build/InstallDev
128 mkdir -p $(1)/usr/include
129 $(CP) $(PKG_INSTALL_DIR)/usr/include/fuse{,.h} $(1)/usr/include/
130 mkdir -p $(1)/usr/lib
131 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfuse.{a,so*} $(1)/usr/lib/
132 mkdir -p $(1)/usr/lib/pkgconfig
133 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/fuse.pc $(1)/usr/lib/pkgconfig/
134 $(SED) 's,-I$$$${includedir}/fuse,,g' $(1)/usr/lib/pkgconfig/fuse.pc
135 $(SED) 's,-L$$$${libdir},,g' $(1)/usr/lib/pkgconfig/fuse.pc
136 endef
137
138 define Package/fuse-utils/install
139 $(INSTALL_DIR) $(1)/usr/bin
140 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/fusermount $(1)/usr/bin/
141 endef
142
143 define Package/libfuse/install
144 $(INSTALL_DIR) $(1)/usr/lib
145 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfuse.so.* $(1)/usr/lib/
146 endef
147
148 $(eval $(call BuildPackage,fuse-utils))
149 $(eval $(call BuildPackage,libfuse))
150 $(eval $(call KernelPackage,fuse))
This page took 0.060463 seconds and 5 git commands to generate.