[package] firewall: actually copy firewall.user to image
[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
8 include $(TOPDIR)/rules.mk
9 include $(INCLUDE_DIR)/kernel.mk
10
11 PKG_NAME:=fuse
12 PKG_VERSION:=2.7.3
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=@SF/$(PKG_NAME)
17 PKG_MD5SUM:=98563fc7b265b7479a3178181cbcf59a
18
19 include $(INCLUDE_DIR)/package.mk
20
21 define Package/fuse/Default
22 TITLE:=FUSE
23 DEPENDS:=@LINUX_2_6
24 URL:=http://fuse.sourceforge.net/
25 endef
26
27 define Package/fuse/Default/description
28 FUSE (Filesystem in UserSpacE)
29 endef
30
31 define Package/fuse-utils
32 $(call Package/fuse/Default)
33 SECTION:=utils
34 CATEGORY:=Utilities
35 DEPENDS:=+libfuse +kmod-fuse @LINUX_2_6
36 TITLE+= (utilities)
37 SUBMENU:=disc
38 endef
39
40 define Package/fuse-utils/description
41 $(call Package/fuse/Default/description)
42 This package contains the FUSE utilities.
43 endef
44
45 define KernelPackage/fuse
46 $(call Package/fuse/Default)
47 SUBMENU:=Filesystems
48 DEPENDS:=@LINUX_2_6
49 TITLE+= (kernel module)
50 KCONFIG:= CONFIG_FUSE_FS
51 FILES:=$(LINUX_DIR)/fs/fuse/fuse.$(LINUX_KMOD_SUFFIX)
52 AUTOLOAD:=$(call AutoLoad,80,fuse)
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 DEPENDS:=@LINUX_2_6
65 TITLE+= (library)
66 SUBMENU:=disc
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 ifeq ($(strip $(call CompareKernelPatchVer,$(KERNEL_PATCHVER),lt,2.6.25)),1)
89 define KernelPackage/fuse/2.6
90 KCONFIG:=
91 FILES:=$(PKG_INSTALL_DIR)/lib/modules/$(LINUX_VERSION)/kernel/fs/fuse/fuse.$(LINUX_KMOD_SUFFIX)
92 endef
93
94 CONFIGURE_ARGS += --enable-kernel-module
95 else
96 CONFIGURE_ARGS += --disable-kernel-module
97 endif
98
99 define Build/Configure
100 (cd $(PKG_BUILD_DIR); rm -f config.cache; \
101 touch configure.in ; \
102 touch aclocal.m4 ; \
103 touch Makefile.in ; \
104 touch include/config.h.in ; \
105 touch configure ; \
106 )
107 $(call Build/Configure/Default)
108 endef
109
110 define Build/Compile
111 $(MAKE) -C $(PKG_BUILD_DIR) \
112 ARCH="$(LINUX_KARCH)" \
113 CROSS_COMPILE="$(TARGET_CROSS)" \
114 DESTDIR="$(PKG_INSTALL_DIR)" \
115 AM_CFLAGS="$(TARGET_CFLAGS) -DDISABLE_COMPAT=1" \
116 EXTRA_DIST="" \
117 all install
118 endef
119
120 define Build/InstallDev
121 mkdir -p $(1)/usr/include
122 $(CP) $(PKG_INSTALL_DIR)/usr/include/fuse{,.h} $(1)/usr/include/
123 mkdir -p $(1)/usr/lib
124 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfuse.{a,so*} $(1)/usr/lib/
125 mkdir -p $(1)/usr/lib/pkgconfig
126 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/fuse.pc $(1)/usr/lib/pkgconfig/
127 $(SED) 's,-I$$$${includedir}/fuse,,g' $(1)/usr/lib/pkgconfig/fuse.pc
128 $(SED) 's,-L$$$${libdir},,g' $(1)/usr/lib/pkgconfig/fuse.pc
129 endef
130
131 define Package/fuse-utils/install
132 $(INSTALL_DIR) $(1)/usr/bin
133 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/fusermount $(1)/usr/bin/
134 endef
135
136 define Package/libfuse/install
137 $(INSTALL_DIR) $(1)/usr/lib
138 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfuse.so.* $(1)/usr/lib/
139 endef
140
141 $(eval $(call BuildPackage,fuse-utils))
142 $(eval $(call BuildPackage,libfuse))
143 $(eval $(call KernelPackage,fuse))
This page took 0.042581 seconds and 5 git commands to generate.