d0334499a776e1d62279659e5fd9c023ed72649d
[openwrt.git] / package / fuse / Makefile
1 #
2 # Copyright (C) 2006 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.6.5
14 PKG_RELEASE:=1
15
16 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
17 PKG_SOURCE_URL:=@SF/$(PKG_NAME)
18 PKG_MD5SUM:=66bd30503df55a87b9868835ca5a45bc
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 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 FILES:=$(PKG_INSTALL_DIR)/lib/modules/$(LINUX_VERSION)/kernel/fs/fuse/fuse.$(LINUX_KMOD_SUFFIX)
51 AUTOLOAD:=$(call AutoLoad,80,fuse)
52 endef
53
54 define Kernel/Package/fuse/description
55 $(call Package/fuse/Default/description)
56 This package contains the FUSE kernel module.
57 endef
58
59 define Package/libfuse
60 $(call Package/fuse/Default)
61 SECTION:=libs
62 CATEGORY:=Libraries
63 DEPENDS:=@LINUX_2_6
64 TITLE+= (library)
65 endef
66
67 define Package/libfuse/description
68 $(call Package/fuse/Default/description)
69 This package contains the FUSE shared library, needed by other programs.
70 endef
71
72 CONFIGURE_VARS += \
73 kernsrcver="$(LINUX_VERSION)"
74
75 CONFIGURE_ARGS += \
76 --enable-shared \
77 --enable-static \
78 --disable-rpath \
79 --enable-kernel-module \
80 --enable-lib \
81 --enable-util \
82 --disable-example \
83 --disable-auto-modprobe \
84 --with-kernel="$(LINUX_DIR)" \
85 --disable-mtab
86
87 define Build/Configure
88 (cd $(PKG_BUILD_DIR); rm -f config.cache; \
89 touch configure.in ; \
90 touch aclocal.m4 ; \
91 touch Makefile.in ; \
92 touch include/config.h.in ; \
93 touch configure ; \
94 )
95 $(call Build/Configure/Default)
96 endef
97
98 define Build/Compile
99 $(MAKE) -C $(PKG_BUILD_DIR) \
100 ARCH="$(LINUX_KARCH)" \
101 CROSS_COMPILE="$(TARGET_CROSS)" \
102 DESTDIR="$(PKG_INSTALL_DIR)" \
103 AM_CFLAGS="$(TARGET_CFLAGS) -DDISABLE_COMPAT=1" \
104 EXTRA_DIST="" \
105 all install
106 endef
107
108 define Build/InstallDev
109 mkdir -p $(STAGING_DIR)/usr/include
110 $(CP) $(PKG_INSTALL_DIR)/usr/include/fuse{,.h} $(STAGING_DIR)/usr/include/
111 mkdir -p $(STAGING_DIR)/usr/lib
112 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfuse.{a,so*} $(STAGING_DIR)/usr/lib/
113 mkdir -p $(STAGING_DIR)/usr/lib/pkgconfig
114 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/fuse.pc $(STAGING_DIR)/usr/lib/pkgconfig/
115 $(SED) 's,-I$$$${includedir}/fuse,,g' $(STAGING_DIR)/usr/lib/pkgconfig/fuse.pc
116 $(SED) 's,-L$$$${libdir},,g' $(STAGING_DIR)/usr/lib/pkgconfig/fuse.pc
117 endef
118
119 define Build/UninstallDev
120 rm -rf $(STAGING_DIR)/usr/include/fuse{,.h} \
121 $(STAGING_DIR)/usr/lib/libfuse.{a,so*} \
122 $(STAGING_DIR)/usr/lib/pkgconfig/fuse.pc
123 endef
124
125 define Package/fuse-utils/install
126 $(INSTALL_DIR) $(1)/usr/bin
127 $(CP) $(PKG_INSTALL_DIR)/usr/bin/fusermount $(1)/usr/bin/
128 endef
129
130 define Package/libfuse/install
131 $(INSTALL_DIR) $(1)/usr/lib
132 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfuse.so.* $(1)/usr/lib/
133 endef
134
135 $(eval $(call BuildPackage,fuse-utils))
136 $(eval $(call BuildPackage,libfuse))
137 $(eval $(call KernelPackage,fuse))
This page took 0.048368 seconds and 3 git commands to generate.