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